Beispiel #1
0
 public void Act(Player player, IOcupant ocupant)
 {
     if (ocupant is Enemy)
     {
         ocupant.EditPlayer(player);
     }
     else
     {
         throw new Exception("Not Key Object");
     }
 }
Beispiel #2
0
 public void Act(Player player, IOcupant ocupant)
 {
     if (ocupant is Treasure)
     {
         ocupant.EditPlayer(player);
     }
     else
     {
         throw new Exception("Not Treasure Object");
     }
 }