public override void Update(List <KeyboardCommand> keyCommands, List <MouseCommand> mouseCommands) { foreach (KeyboardCommand k in keyCommands) { if (k.Key == Keyboard.Key.A && k.Pressed) { cameraDx += -2; } else if (k.Key == Keyboard.Key.D && k.Pressed) { cameraDx += 2; } else if (k.Key == Keyboard.Key.W && k.Pressed) { cameraDy += -2; } else if (k.Key == Keyboard.Key.S && k.Pressed) { cameraDy += 2; } if (k.Key == Keyboard.Key.A && !k.Pressed) { cameraDx -= -2; } else if (k.Key == Keyboard.Key.D && !k.Pressed) { cameraDx -= 2; } else if (k.Key == Keyboard.Key.W && !k.Pressed) { cameraDy -= -2; } else if (k.Key == Keyboard.Key.S && !k.Pressed) { cameraDy -= 2; } //TODO: menus, etc } foreach (MouseCommand m in mouseCommands) { //TODO: Update terrain info (mouse move) //(maybe highlight tile) // mouse camera scrolling if (m.Button == Mouse.Button.Left && m.Pressed) { Unit selected = UnitManager.Click(m.Location.X, m.Location.Y); if (selected != null) { StateManager.AddState(new UnitMoveState(selected)); return; } //do buildings } } TileManager.MoveCameraRelative(cameraDx, cameraDy); }