Пример #1
0
        Lives lives;                    // Player's lives

        // Constructor
        public Player(int x = 0, int y = 0, int numProjs = 0, Score score = null, Lives lives = null)
            : base(x, y)
        {
            this.numProjs = numProjs;
            bullets       = new Projectile[this.numProjs];
            for (int i = 0; i < this.numProjs; ++i)
            {
                bullets[i] = new Projectile();
            }
            IsAlive    = true;
            this.score = score;
            this.lives = lives;
            NumLives   = lives.NumLives;
        }
Пример #2
0
 static long endTime;                    // End time value
 //bool dirRight;                        // Enemy boss direction(true = right; false = left)
 // Constructor
 public EnemyBoss(int x = 0, int y = 0, int numProjs = 0, Score score = null, Lives lives = null)
     : base(x, y)
 {
     this.numProjs = numProjs;
     bulletsR      = new Projectile[this.numProjs];
     bulletsL      = new Projectile[this.numProjs];
     for (int i = 0; i < this.numProjs; ++i)
     {
         bulletsR[i] = new Projectile(0, 0, true);
         bulletsL[i] = new Projectile(0, 0, true);
     }
     //dirRight = true;
     IsAlive    = false;
     this.score = score;
     this.lives = lives;
     NumLives   = lives.NumLives;
     sw.Start();
     startTime = sw.ElapsedMilliseconds;
 }