コード例 #1
0
 /// <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);
     }
 }
コード例 #2
0
        public static void sequence(RepairPowerup powerup, ref Player player)
        {
            // Prevent us from restarting the sequence
            if (!enterRepairMode && !repairModeEnabled && !powerup.rechargeModeEnabled)
            {
                enterRepairMode = true;
            }

            currentPlayer = player;
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
        }
コード例 #5
0
        public static void sequence(RepairPowerup powerup, ref Player player)
        {
            // Prevent us from restarting the sequence
            if (!enterRepairMode && !repairModeEnabled && !powerup.rechargeModeEnabled)
                enterRepairMode = true;

            currentPlayer = player;
        }