public void Add(Powerup powerup) { lock (_locker) { _powerupList.Add(powerup); } }
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; }
public void AddPowerupToGame(Powerup powerup) { _powerupManager.Add(powerup); _space.Insert(powerup); }