public BMB_Input(BMB_Input toCopy) { foreach (var button in toCopy.buttons) { this.buttons.Add(button.Key, button.Value); } }
public void process(BMB_Input buttons) { if (buttons.buttons["W"] == true) { this.add *= -1; } }
private void Form1_Load(object sender, EventArgs e) { input = new BMB_Input(); gg = new BMB_Grapgics(750, 750, input); fG = CreateGraphics(); graphicsThread = new Thread(BMB); graphicsThread.IsBackground = true; graphicsThread.Start(); }
public BMB_Grapgics(int height, int width, BMB_Input pointerToInput) { this.height = height; this.width = width; this.input = pointerToInput; this.btm = new Bitmap(height, width); this.btmR = new Bitmap(height, width); this.g = Graphics.FromImage(btm); this.gR = Graphics.FromImage(btmR); drawingThread = new Thread(this.Draw); drawingThread.IsBackground = true; drawingThread.Start(); processingThread = new Thread(this.Process); processingThread.IsBackground = true; processingThread.Start(); exampleObjectWithSomethingToDraw = new Orbiting(); }