/// <summary> /// Used to collect and assign actions to the current powerup /// </summary> /// <param name="powerup"></param> /// <param name="player"></param> public static void inputManager(AnimatedSprite powerup, ref Player player) { // Check if the powerup is of type 'RepairPowerup' if (!powerup.isActive && powerup is RepairPowerup) { RepairPowerup.sequence((RepairPowerup)powerup, ref player); } }
public static void sequence(RepairPowerup powerup, ref Player player) { // Prevent us from restarting the sequence if (!enterRepairMode && !repairModeEnabled && !powerup.rechargeModeEnabled) { enterRepairMode = true; } currentPlayer = player; }
protected override void Initialize() { Defines.clientBounds = this.Window.ClientBounds; //Set up the frames counter this.Components.Add(new FPSComponent(this)); //Set up the bloom post-process effect bloomComponent = new BloomComponent(this); bloomComponent.Visible = false; this.Components.Add(bloomComponent); //Set up the console writer. //consoleComponent = new ConsoleComponent(clientBounds); //Set up the sprite managers //playerSpriteManager = new SpriteManagerComponent(this); enemySpriteManager = new SpriteManager(this); //Set up the players //TODO: Only signed in players should be added. playerManager = new PlayerManager(this); // Check whether if two controllers are currently active (Comment to default to two-player mode) // TODO: Add additional check for if the game is currently running or not //if (!GamePad.GetState(PlayerIndex.Two).IsConnected) // twoPlayerMode = false; // Set up the charge Bar chargeBar = new ChargeBar(this); // Set up repair powerup repairPowerup = new RepairPowerup(this); //Set up the particle system manager. particleManager = new ParticleManager(this); base.Initialize(); }
public static void sequence(RepairPowerup powerup, ref Player player) { // Prevent us from restarting the sequence if (!enterRepairMode && !repairModeEnabled && !powerup.rechargeModeEnabled) enterRepairMode = true; currentPlayer = player; }