Esempio n. 1
0
        public void Reach(RacePlayer player, CheckPoint check)
        {
            if (check.CheckPointIndex == CheckPointIndex(player.Checks + 1))
            {
                //richtiger checkpoint, ganz klasse
                player.Checks++;
                Announce(player.Name + " reached " + player.Checks + ".");

                if (Lap(player.Checks) >= Laps && Laps>0)
                {
                    Finish(player);
                }
            }
        }
Esempio n. 2
0
 protected void Finish(RacePlayer player)
 {
     Announce(player.Name + " finished.");
     EndGame();
 }
Esempio n. 3
0
 public CheckPoint GetNextCheckPoint(RacePlayer player)
 {
     CheckPoint[] list = CheckPoints;
     foreach (CheckPoint p in list)
     {
         if (p.CheckPointIndex == CheckPointIndex(player.Checks + 1))
         {
             return p;
         }
     }
     return null;
 }