public void RunLoop() { while (true) { if (!wantsToStop) { if (!IsInitialized) { Gtk.Application.Init(); toolsWindow = new MapEditor(game); toolsWindow.Show(); toolsWindow.Initialize(); IsInitialized = true; } Gtk.Application.RunIteration(false); } else { if (IsInitialized) { Gtk.Application.Quit(); IsInitialized = false; } break; } //Thread.Sleep (20); } }
public void Awake() { if (instance == null) { instance = this; } else { Destroy(this); } toolListeners = new List <IToolChangeListener> (); mirrorListeners = new List <IMirrorChangeListener> (); modeListeners = new List <IModeChangeListener> (); mouseMoveListeners = new List <IMouseMoveListener> (); //initialize the map map = new TileGrid(mapSize, tileSize); moves = new Stack <int[]>(); }
public void RunLoop() { while(true){ if(!wantsToStop){ if (!IsInitialized) { Gtk.Application.Init (); toolsWindow = new MapEditor(game); toolsWindow.Show(); toolsWindow.Initialize (); IsInitialized = true; } Gtk.Application.RunIteration (false); }else{ if(IsInitialized){ Gtk.Application.Quit (); IsInitialized = false; } break; } //Thread.Sleep (20); } }