private void SpawnCoin() { for (int i = 0; i < COINS_TO_SPAWN; i++) { CoinEntity wall = new CoinEntity(_texture, new Vector2(COIN_POS_X + i * COINS_DISTANCE, COIN_POS_Y), _ball); _entityManager.AddEntity(wall); } }
private void CheckCollisions(CoinEntity coin) { if (coin.CollisionBox.Intersects(_ball.CollisionBox)) { _scoreBoard.IncreaseCoinsCollected(); _coinPickupSoundEffect.Play(); _entityManager.RemoveEntity(coin); } }