Beispiel #1
0
        public AlienSquad(Bunkers bunkers, BombFactory bombFactory, LaserFactory laserFactory, Player player, Mothership mothership, ScoreAndLife scoreAndLife, int numRows, int numColums, int screenWidth, int playerHeight, int alienWidth, int alienHeight, int alienSpeed, int spacer, int bombFrequency, int alienPointStart, int alienPointDecrement, int alienSpacerFromTop, int speedIncrease, int bombFrequencyIncrement, int bombFrequencyMin)
        {
            this.bunkers                = bunkers;
            this.bombFactory            = bombFactory;
            this.laserFactory           = laserFactory;
            this.numRows                = numRows;
            this.numColumns             = numColums;
            this.alienWidth             = alienWidth;
            this.alienHeight            = alienHeight;
            this.alienSpeed             = alienSpeed;
            this.spacer                 = spacer;
            this.bombFrequency          = bombFrequency;
            this.alienPointStart        = alienPointStart;
            this.alienPointDecrement    = alienPointDecrement;
            this.alienSpacerFromTop     = alienSpacerFromTop;
            this.player                 = player;
            this.mothership             = mothership;
            this.bombFrequencyIncrement = bombFrequencyIncrement;
            this.bombFrequencyMin       = bombFrequencyMin;
            this.scoreAndLife           = scoreAndLife;

            populateAliens();

            // Set static fields
            Alien.bunkerHeight  = bunkers[0].BoundingBox.Y;
            Alien.playerHeight  = playerHeight;
            Alien.screenWidth   = screenWidth;
            Alien.speedIncrease = speedIncrease;

            laserFactory.nextWave += handleNextWave;
            scoreAndLife.gameOver += KillAll;
        }
Beispiel #2
0
 public void RegisterBunkers(Bunkers bunkers)
 {
     this.bunkers = bunkers;
 }