public MapEditor() { InitializeComponent(); currentTileList = new List<Tile>(); currentObjectList = new List<Obj>(); currentBuildingList = new List<Building>(); currentUnitList = new List<Unit>(); initGridviews(); gfx = new GFXEngine(splitContainer1.Panel1, false, false); gridBrush = new SolidBrush(Color.FromArgb(127, 127, 127)); selectBrush = new SolidBrush(Color.FromArgb(150, 255, 150)); currentMap = new Map(50, 50); focusedX = 0; focusedY = 0; timer = new Timer(); timer.Tick += new EventHandler(timer_Tick); timer.Interval = 10; timer.Start(); }
public Form1() { InitializeComponent(); testMap = new Map(1, 1); //instanciamos o motor grafico //a apontar para a superficie onde queremos desenhar gfx = new GFXEngine(panel1, false, false); loadStuff(); tick = false; tickTimer = new System.Windows.Forms.Timer(); tickTimer.Tick += new EventHandler(tickTimer_Tick); tickTimer.Interval = 1; //~60 ticks por segundo tickTimer.Start(); operationsTimer = new System.Windows.Forms.Timer(); operationsTimer.Tick += new EventHandler(timer_Tick); operationsTimer.Interval = 40; //25 ticks por segundo operationsTimer.Start(); drawThread = new Thread(drawThreadCycle); drawThread.Start(); }