Esempio n. 1
0
 public void Add(Powerup powerup)
 {
     lock (_locker)
     {
         _powerupList.Add(powerup);
     }
 }
Esempio n. 2
0
        public object[] Compress(Powerup powerup)
        {
            object[] result = new object[5];

            result[PowerupCompressionContract.PositionX] = Convert.ToInt32(powerup.MovementController.Position.X);
            result[PowerupCompressionContract.PositionY] = Convert.ToInt32(powerup.MovementController.Position.Y);
            result[PowerupCompressionContract.ID] = powerup.ID;
            result[PowerupCompressionContract.Disposed] = Convert.ToInt32(powerup.Disposed);
            result[PowerupCompressionContract.Type] = powerup.Type;

            return result;
        }
Esempio n. 3
0
 public void AddPowerupToGame(Powerup powerup)
 {
     _powerupManager.Add(powerup);
     _space.Insert(powerup);
 }
Esempio n. 4
0
 public void AddPowerupToGame(Powerup powerup)
 {
     _powerupManager.Add(powerup);
     _space.Insert(powerup);
 }