示例#1
0
 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);
     }
 }
示例#2
0
 private void CheckCollisions(CoinEntity coin)
 {
     if (coin.CollisionBox.Intersects(_ball.CollisionBox))
     {
         _scoreBoard.IncreaseCoinsCollected();
         _coinPickupSoundEffect.Play();
         _entityManager.RemoveEntity(coin);
     }
 }