Esempio n. 1
0
 static void AttackPlayer(Monster monster, Player player)
 {
     if (AI.AreNeighboring(monster, player))
     {
         CombatSystem.Hit(monster, player);
     }
     else
     {
         AI.MoveTowards(monster, player);
     }
 }
Esempio n. 2
0
 static void RunFromPlayer(Monster monster, Player player)
 {
     if (AI.CanMove(monster))
     {
         AI.MoveAwayFrom(monster, player);
     }
     else if (AI.AreNeighboring(monster, player))
     {
         CombatSystem.Hit(monster, player);
     }
     else
     {
         // stand still
     }
 }