Beispiel #1
0
 private static System.Timers.Timer CreateDespawnTimer(Entity e)
 {
     System.Timers.Timer timer = new System.Timers.Timer(1000);
     timer.AutoReset = false;
     timer.Elapsed  += delegate
     {
         Player.GlobalDespawn(e);
         if (!e.isPlayer)
         {
             RemoveEntity(e);
         }
     };
     return(timer);
 }