From d0b9b1f1cda622059bd3e1d2efad2935d2aa882e Mon Sep 17 00:00:00 2001 From: JoshuaNavarro Date: Wed, 24 Jul 2019 14:51:12 -0700 Subject: [PATCH] Added in game modes for Revitalize. Also fixed bug where players wouldn't update when moving left. --- .../Framework/Menus/InventoryMenu.cs | 1 + .../SeasideScrambleMinigame/SSCEnums.cs | 8 ++ .../SeasideScrambleMinigame/SSCMenus/Loby.cs | 87 +++++++++--- .../SeasideScrambleMinigame/SSCPlayer.cs | 128 +++++++++++++++--- .../SSCProjectiles/SSCProjectile.cs | 56 +++++++- .../SeasideScramble.cs | 122 ++++++++++++++--- 6 files changed, 338 insertions(+), 64 deletions(-) diff --git a/GeneralMods/Revitalize/Framework/Menus/InventoryMenu.cs b/GeneralMods/Revitalize/Framework/Menus/InventoryMenu.cs index 23c2b0fd..0056bb65 100644 --- a/GeneralMods/Revitalize/Framework/Menus/InventoryMenu.cs +++ b/GeneralMods/Revitalize/Framework/Menus/InventoryMenu.cs @@ -37,6 +37,7 @@ namespace Revitalize.Framework.Menus /// /// //TODO: Combine two of these to make an item grab menu. + /// TODO: Display Item information on hover. /// public class InventoryMenu : IClickableMenuExtended { diff --git a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCEnums.cs b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCEnums.cs index 91040364..bfadf8d0 100644 --- a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCEnums.cs +++ b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCEnums.cs @@ -24,5 +24,13 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame Four } + public enum SSCGameMode + { + None, + ShootingGallery, + PVP, + Story + } + } } diff --git a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCMenus/Loby.cs b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCMenus/Loby.cs index 0a1fb9fa..9310b710 100644 --- a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCMenus/Loby.cs +++ b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCMenus/Loby.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; using Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCEnemies.Spawners; using StardustCore.UIUtilities; using StardustCore.UIUtilities.MenuComponents; @@ -12,8 +13,14 @@ using StardustCore.UIUtilities.MenuComponents.ComponentsV1; namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCMenus { - public class Loby:IClickableMenuExtended + /// + /// A nice little loby screen so that players can select their game modes. + /// + public class Loby : IClickableMenuExtended { + /// + /// The background for the menu. + /// StardustCore.UIUtilities.Texture2DExtended background; string menuText; Button shootingGalleryButton; @@ -27,32 +34,29 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCMenus public Loby(int x, int y, int width, int height) : base(x, y, width, height, false) { this.background = SeasideScramble.self.textureUtils.getExtendedTexture("SSCMaps", "TitleScreenBackground"); - this.menuText = "The Loby"+System.Environment.NewLine+System.Environment.NewLine+"Choose a game mode"; - this.shootingGalleryButton = new Button(new Rectangle(100, 300, 64*4, 32*4), SeasideScramble.self.textureUtils.getExtendedTexture("SSCUI", "ShootingGalleryButton"), new Rectangle(0, 0, 64, 32), 4f); - this.backButton = new Button(new Rectangle(100, 100, 64, 64), SeasideScramble.self.textureUtils.getExtendedTexture("SSCUI", "BackButton"),new Rectangle(0, 0, 16, 16), 4f); + this.menuText = "The Loby" + System.Environment.NewLine + System.Environment.NewLine + "Choose a game mode"; + this.shootingGalleryButton = new Button(new Rectangle(100, 300, 64 * 4, 32 * 4), SeasideScramble.self.textureUtils.getExtendedTexture("SSCUI", "ShootingGalleryButton"), new Rectangle(0, 0, 64, 32), 4f); + this.backButton = new Button(new Rectangle(100, 100, 64, 64), SeasideScramble.self.textureUtils.getExtendedTexture("SSCUI", "BackButton"), new Rectangle(0, 0, 16, 16), 4f); } + /// + /// What happens when the menu is clicked with the left mouse button. + /// + /// + /// + /// public override void receiveLeftClick(int x, int y, bool playSound = true) { if (this.shootingGalleryButton.containsPoint(x, y)) { - foreach (SSCPlayer p in SeasideScramble.self.players.Values) - { - p.HUD.displayHUD(); - //p.statusEffects.addStatusEffect(SE_Burn.SpawnBurnEffect(new Vector2(p.HUD.xPositionOnScreen,p.HUD.yPositionOnScreen),10*1000,1000,1.00d,1)); - } - - SeasideScramble.self.entities.addSpawner(new Target_Spawner(new Vector2(SeasideScrambleMap.TileSize * -1, SeasideScrambleMap.TileSize * 4), new Vector2(1, 0), Color.White, true, 1000, 5000, true, 0.25f, 3f, true)); - SeasideScramble.self.entities.addSpawner(new Target_Spawner(new Vector2(SeasideScrambleMap.TileSize * 17, SeasideScrambleMap.TileSize * 5), new Vector2(-1, 0), Color.White, true, 1000, 5000, true, 0.25f, 3f, true)); - - SeasideScramble.self.currentMap.spawnPlayersAtPositions(); - //SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(100, 100), Color.Blue); - //SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(200, 100), Color.Red); - //SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(300, 100), Color.Green); - SeasideScramble.self.menuManager.closeAllMenus(); + this.setUpForGameplay(); } } + /// + /// Checks if the menu is ready to close. + /// + /// public override bool readyToClose() { return false; @@ -60,12 +64,55 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCMenus public override void update(GameTime time) { - + GamePadState p1 = SeasideScramble.self.getGamepadState(PlayerIndex.One); + GamePadState p2 = SeasideScramble.self.getGamepadState(PlayerIndex.Two); + GamePadState p3 = SeasideScramble.self.getGamepadState(PlayerIndex.Three); + GamePadState p4 = SeasideScramble.self.getGamepadState(PlayerIndex.Four); + if (p1.IsButtonDown(Buttons.A)) + { + + this.receiveGamepadLeftClick(SSCEnums.PlayerID.One, SeasideScramble.self.getPlayer(SSCEnums.PlayerID.One).mouseCursor.position); + + } + if (p2.IsButtonDown(Buttons.A)) + { + this.receiveGamepadLeftClick(SSCEnums.PlayerID.Two, SeasideScramble.self.getPlayer(SSCEnums.PlayerID.Two).mouseCursor.position); + } + if (p3.IsButtonDown(Buttons.A)) + { + this.receiveGamepadLeftClick(SSCEnums.PlayerID.Three, SeasideScramble.self.getPlayer(SSCEnums.PlayerID.Three).mouseCursor.position); + } + if (p4.IsButtonDown(Buttons.A)) + { + this.receiveGamepadLeftClick(SSCEnums.PlayerID.Four, SeasideScramble.self.getPlayer(SSCEnums.PlayerID.Four).mouseCursor.position); + } + } + + public void receiveGamepadLeftClick(SSCEnums.PlayerID Player,Vector2 position) + { + this.receiveLeftClick((int)position.X, (int)position.Y); } private void setUpForGameplay() { + SeasideScramble.self.setMode(SSCEnums.SSCGameMode.ShootingGallery); + + foreach (SSCPlayer p in SeasideScramble.self.players.Values) + { + p.HUD.displayHUD(); + //p.statusEffects.addStatusEffect(SE_Burn.SpawnBurnEffect(new Vector2(p.HUD.xPositionOnScreen,p.HUD.yPositionOnScreen),10*1000,1000,1.00d,1)); + } + + SeasideScramble.self.entities.addSpawner(new Target_Spawner(new Vector2(SeasideScrambleMap.TileSize * -1, SeasideScrambleMap.TileSize * 4), new Vector2(1, 0), Color.White, true, 1000, 5000, true, 0.25f, 3f, true)); + SeasideScramble.self.entities.addSpawner(new Target_Spawner(new Vector2(SeasideScrambleMap.TileSize * 17, SeasideScrambleMap.TileSize * 5), new Vector2(-1, 0), Color.White, true, 1000, 5000, true, 0.25f, 3f, true)); + + SeasideScramble.self.currentMap.spawnPlayersAtPositions(); + //SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(100, 100), Color.Blue); + //SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(200, 100), Color.Red); + //SSCEnemies.SSCE_Target.Spawn_SSCE_Target(new Vector2(300, 100), Color.Green); + SeasideScramble.self.menuManager.closeAllMenus(); + } @@ -74,7 +121,7 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCMenus //Draw background. b.Draw(this.background.texture, new Vector2(this.xPositionOnScreen, this.yPositionOnScreen), SeasideScramble.self.camera.getXNARect(), Color.White); Vector2 offset = StardewValley.Game1.dialogueFont.MeasureString(this.menuText); - b.DrawString(StardewValley.Game1.dialogueFont,this.menuText,new Vector2((this.width / 2) - (offset.X / 2), this.height *.1f), Color.White); + b.DrawString(StardewValley.Game1.dialogueFont, this.menuText, new Vector2((this.width / 2) - (offset.X / 2), this.height * .1f), Color.White); this.shootingGalleryButton.draw(b); this.backButton.draw(b); diff --git a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCPlayer.cs b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCPlayer.cs index 44ab1b9a..6e6eddb7 100644 --- a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCPlayer.cs +++ b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCPlayer.cs @@ -13,37 +13,104 @@ using Revitalize.Framework.Minigame.SeasideScrambleMinigame.Interfaces; namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame { + /// + /// Deals with handling a player. + /// public class SSCPlayer : ISSCLivingEntity { + + /// + /// The character animator. + /// public AnimationManager characterSpriteController; + /// + /// Should the sprite be flipped? + /// public bool flipSprite; + /// + /// The facing direction for the player. + /// public SSCEnums.FacingDirection facingDirection; + /// + /// The position for the player. + /// public Microsoft.Xna.Framework.Vector2 position; + /// + /// Is the player moving? + /// public bool isMoving; + /// + /// Did the player move this frame? + /// private bool movedThisFrame; + /// + /// The draw color for the player. + /// public Color playerColor; + /// + /// The player's id. + /// public SSCEnums.PlayerID playerID; + /// + /// The frame speed for the junimo walking. + /// public const int junimoWalkingAnimationSpeed = 10; + /// + /// The mouse cursor. + /// public StardustCore.Animations.AnimatedSprite mouseCursor; + /// + /// The sensitivity for the mouse. + /// public Vector2 mouseSensitivity; + /// + /// Should the mouse cursor be shown? + /// public bool showMouseCursor; + /// + /// The delay to show the mouse but I dont think I use this. + /// public int maxMouseSleepTime = 300; + /// + /// The current gun the player is holding. UPDATE THIS TO WEILD MULTIPLE GUNS!!! + /// public SSCGuns.SSCGun gun; + /// + /// The hitbox for the player. + /// public Rectangle hitBox; + /// + /// The HUD for the player. + /// public SSCMenus.HUD.CharacterHUD HUD; + /// + /// The current health for the player. + /// public int currentHealth; + /// + /// The max health for the player. + /// public int maxHealth; + /// + /// The movement speed for the player. + /// public float movementSpeed; + /// + /// The status effects on the player. + /// public SSCStatusEffects.StatusEffectManager statusEffects; + /// + /// Is the player dead? + /// public bool isDead { get @@ -57,6 +124,10 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame public int MaxHealth { get => this.maxHealth; set => this.maxHealth = value; } public Rectangle HitBox { get => this.hitBox; set => this.hitBox = value; } + /// + /// Constructor. + /// + /// Which player is this? One, two, etc... public SSCPlayer(SSCEnums.PlayerID PlayerID) { this.playerID = PlayerID; @@ -226,6 +297,20 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame /// public void update(GameTime Time) { + if (this.playerID == SSCEnums.PlayerID.One) + { + if (SeasideScramble.self.getMouseDelta().X != 0 || SeasideScramble.self.getMouseDelta().Y != 0) + { + this.mouseCursor.position = new Vector2(Game1.getMousePosition().X, Game1.getMousePosition().Y); + this.showMouseCursor = true; + } + } + if (this.currentHealth < 0) this.currentHealth = 0; + + this.gun.update(Time); + this.HUD.update(Time); + this.statusEffects.update(Time); + this.movedThisFrame = false; if (this.isMoving == false) { @@ -272,19 +357,7 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame this.flipSprite = false; } - if (this.playerID == SSCEnums.PlayerID.One) - { - if (SeasideScramble.self.getMouseDelta().X != 0 || SeasideScramble.self.getMouseDelta().Y != 0) - { - this.mouseCursor.position = new Vector2(Game1.getMousePosition().X, Game1.getMousePosition().Y); - this.showMouseCursor = true; - } - } - if (this.currentHealth < 0) this.currentHealth = 0; - this.gun.update(Time); - this.HUD.update(Time); - this.statusEffects.update(Time); } /// @@ -543,6 +616,10 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame #endregion + /// + /// Shoots a bullet in the given direction using projectile information stored in the gun. + /// + /// private void shoot(Vector2 direction) { if (SeasideScramble.self.menuManager.isMenuUp) return; @@ -553,6 +630,10 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame } + /// + /// Have this player take damage. + /// + /// public void takeDamage(int amount) { this.currentHealth -= amount; @@ -562,16 +643,28 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame } } + /// + /// Heal the player a certain amount of HP/ + /// + /// public void heal(int amount) { this.takeDamage(amount * -1); + if (this.currentHealth > this.maxHealth) this.currentHealth = this.maxHealth; } + /// + /// Heal the player to full HP. + /// public void healToFull() { this.currentHealth = this.maxHealth; } + /// + /// What happens when the player collides with a projectile. + /// + /// public void onCollision(SSCProjectiles.SSCProjectile projectile) { @@ -585,13 +678,14 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame //ModCore.log("Can't get hit by own projectile."); return; } - /*if projectile.owner is player and friendly fire is off do nothing. - * - * - */ + //if projectile.owner is player and friendly fire is off do nothing. + if(projectile.owner is SSCPlayer && SeasideScramble.self.friendlyFireEnabled==false) + { + return; + } } ModCore.log("Big oof. Player hit by projectile."); - this.CurrentHealth -= projectile.damage; + this.takeDamage(projectile.damage); this.statusEffects.addStatusEffect(projectile.effect); } } diff --git a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCProjectiles/SSCProjectile.cs b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCProjectiles/SSCProjectile.cs index 8bf98c38..2388fd28 100644 --- a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCProjectiles/SSCProjectile.cs +++ b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SSCProjectiles/SSCProjectile.cs @@ -11,12 +11,33 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCProjectiles { public class SSCProjectile { + /// + /// The sprite for the projectile/ + /// public AnimatedSprite sprite; + /// + /// The direction the projectile travels. + /// public Vector2 direction; + /// + /// The speed for the projectile. + /// public float speed; + /// + /// The scale of the projectile. + /// public float scale; + /// + /// The hitbox for the projectile. + /// public Rectangle hitBox; + /// + /// The damage the projectile does upon contact. + /// public int damage; + /// + /// The position of the projectile. Also resets the bounding box x,y location. + /// public Vector2 position { get @@ -28,6 +49,9 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCProjectiles this.sprite.position = value; } } + /// + /// The color of the projectile. + /// public Color color { get @@ -40,7 +64,13 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCProjectiles } } + /// + /// The max amount of frames this projectile lives for. + /// public int maxLifeSpan; + /// + /// The current lifespan for the projectile. + /// public int currentLifeSpan; /// @@ -48,6 +78,9 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCProjectiles /// public object owner; + /// + /// The velocity of the projectile. + /// public Vector2 Velocity { get @@ -55,9 +88,14 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCProjectiles return this.direction * this.speed; } } - + /// + /// The status effect the projectile inflicts upon contact. + /// public SSCStatusEffects.StatusEffect effect; + /// + /// Constructor. + /// public SSCProjectile() { @@ -153,9 +191,12 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCProjectiles this.die(); } + /// + /// What happens when the projectile collides with something. + /// + /// public virtual void onCollision(object other) { - //Move this if to the player class.???? if(other is SSCPlayer) { if (this.hasOwner()) @@ -165,12 +206,13 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame.SSCProjectiles //ModCore.log("Can't get hit by own projectile."); return; } - /*if projectile.owner is player and friendly fire is off do nothing. - * - * - */ + + //if projectile.owner is player and friendly fire is off do nothing. + else if (SeasideScramble.self.friendlyFireEnabled == false && this.owner!=other) + { + return; + } } - ModCore.log("Big oof. Player hit by projectile."); } this.collisionLogic(); } diff --git a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SeasideScramble.cs b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SeasideScramble.cs index 4a6d7821..20f95184 100644 --- a/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SeasideScramble.cs +++ b/GeneralMods/Revitalize/Framework/Minigame/SeasideScrambleMinigame/SeasideScramble.cs @@ -65,6 +65,15 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame public SSCFonts.SSCFont gameFont; + /// + /// The current game mode. + /// + public SSCEnums.SSCGameMode gameMode; + public bool friendlyFireEnabled; + + /// + /// RNG. + /// public Random random { get @@ -73,6 +82,9 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame } } + /// + /// Constuctor. + /// public SeasideScramble() { self = this; @@ -110,6 +122,9 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame else return null; } + /// + /// Loads in all of the necessary textures for Seaside Scramble. + /// private void LoadTextures() { this.textureUtils = new SSCTextureUtilities(); @@ -134,12 +149,18 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame this.textureUtils.addTextureManager(enemies); } + /// + /// Loads in all of the maps for Seaside Scramble. + /// private void LoadMaps() { this.SeasideScrambleMaps = new Dictionary(); this.SeasideScrambleMaps.Add("TestRoom", new SeasideScrambleMap(SeasideScrambleMap.LoadMap("TestRoom.tbin").Value)); this.SeasideScrambleMaps.Add("ShootingGallery", new SSCMaps.ShootingGallery(SeasideScrambleMap.LoadMap("ShootingGallery.tbin").Value)); } + /// + /// Loads in a default map for Seaside Scramble. + /// private void loadStartingMap() { this.currentMap = this.SeasideScrambleMaps["ShootingGallery"]; @@ -209,15 +230,7 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame b.End(); } - /// - /// What happens when the left click is held. - /// - /// - /// - public void leftClickHeld(int x, int y) - { - //throw new NotImplementedException(); - } + /// /// The id of the minigame??? @@ -229,6 +242,48 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame //throw new NotImplementedException(); } + /// + /// Sets the game mode for the game. + /// + /// + public void setMode(SSCEnums.SSCGameMode Mode) + { + if (Mode == SSCEnums.SSCGameMode.None) + { + this.friendlyFireEnabled = false; + } + if(Mode== SSCEnums.SSCGameMode.ShootingGallery) + { + this.friendlyFireEnabled = false; + } + + if(Mode== SSCEnums.SSCGameMode.PVP) + { + this.friendlyFireEnabled = true; + } + if(Mode== SSCEnums.SSCGameMode.Story) + { + this.friendlyFireEnabled = false; + } + + this.gameMode = Mode; + } + + //~~~~~~~~~~~~~~~~~// + // Input Logic // + //~~~~~~~~~~~~~~~~~// + #region + + /// + /// What happens when the left click is held. + /// + /// + /// + public void leftClickHeld(int x, int y) + { + //throw new NotImplementedException(); + } + /// /// Does this override free mous emovements? /// @@ -327,17 +382,31 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame } } + /// + /// What happens when left click is released. + /// + /// + /// public void releaseLeftClick(int x, int y) { //throw new NotImplementedException(); } + /// + /// What happens when right click is released. + /// + /// + /// public void releaseRightClick(int x, int y) { //throw new NotImplementedException(); } - + /// + /// Receive input from a specific gamepad. + /// + /// + /// private void receiveGamepadInput(GamePadState state,SSCEnums.PlayerID ID) { if (state == null) return; @@ -350,6 +419,20 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame } } + /// + /// Returns the delta for mouse movement. + /// + /// + public Vector2 getMouseDelta() + { + Vector2 ret = -1 * (this.oldMousePosition - new Vector2(Game1.getMousePosition().X, Game1.getMousePosition().Y)); + return ret; + } + + #endregion + + + /// /// Called every update frame. /// @@ -410,16 +493,6 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame //throw new NotImplementedException(); } - /// - /// Returns the delta for mouse movement. - /// - /// - public Vector2 getMouseDelta() - { - Vector2 ret = -1 * (this.oldMousePosition - new Vector2(Game1.getMousePosition().X, Game1.getMousePosition().Y)); - return ret; - } - /// /// Called when the minigame is quit upon. /// @@ -429,6 +502,13 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame ModCore.log("Exit the game!"); } + + //~~~~~~~~~~~~~~~~~~~~// + // Static Functions // + //~~~~~~~~~~~~~~~~~~~~// + + #region + /// /// Translates the position passed in into the relative position on the viewport. /// @@ -449,5 +529,7 @@ namespace Revitalize.Framework.Minigame.SeasideScrambleMinigame { return new Vector2(globalPosition.X - (float)SeasideScramble.self.camera.viewport.X, globalPosition.Y - (float)SeasideScramble.self.camera.viewport.Y); } + + #endregion } }