Beispiel #1
0
 public void StopCoroutine()
 {
     IsRunning = false;
     CoroutineThread.Change(Timeout.Infinite, 10);
     CoroutineTPSCalc.Change(Timeout.Infinite, 1000);
     GameApplication.Log(Utils.LogEntryType.Info, "Stopped coroutine: " + Name);
 }
Beispiel #2
0
 public void StartCoroutine()
 {
     IsRunning        = true;
     CoroutineTPSCalc = new Timer(new TimerCallback(TPSCalc), null, 0, 1000);
     CoroutineThread  = new Timer(new TimerCallback(CoroutineMethodExecutor), null, 20, 10);
     GameApplication.Log(Utils.LogEntryType.Info, "Started coroutine: " + Name);
 }
 public void AddGameLayer(int layerLevel, GameLayer gameLayer)
 {
     if (!GameLayers.ContainsKey(layerLevel))
     {
         GameLayers.Add(layerLevel, gameLayer);
     }
     else
     {
         GameApplication.Log(Utils.LogEntryType.Warning, "Unable to add game layer with layer level " + layerLevel + "! Game layer on level " + layerLevel + " already exists!");
     }
 }
Beispiel #4
0
 private void WindowClosing(object sender, FormClosingEventArgs e)
 {
     GameApplication.Exit(0);
 }