Exemplo n.º 1
0
 private void HealthActivity()
 {
     if (GlobalData.PlayerData.health <= 0)
     {
         GlobalData.PlayerData.health = 0;
         PlayerInstance.Destroy();
         TheEnd = true;
     }
 }
Exemplo n.º 2
0
        private void HandleCollisions()
        {
            foreach (var enemy in EnemyList)
            {
                if (PlayerInstance.CollideAgainst(enemy))
                {
                    PlayerInstance.Destroy();
                }

                if (enemy.CollideAgainst <Bullet>(BulletList))
                {
                    enemy.SetState("Die");
                    ScoreboardInstance.Score = ScoreboardInstance.Score + 1;
                    break;
                }
            }
        }