public void Update() { if (needsCameraUpdate) { needsCameraUpdate = false; UpdateCameraOffset(); } runButton.Update(); menuButton.Update(); addStatButton.Update(); addSkillButton.Update(); if (IsLeftPanelVisible) { LeftPanel.Update(); leftPanelFrame.Update(); } if (IsRightPanelVisible) { RightPanel.Update(); rightPanelFrame.Update(); } if (!IsLeftPanelVisible || !IsRightPanelVisible) { minipanel.Update(); } }
public void Update(long ms) { if (showMinipanel) { minipanel.Update(); } runButton.Update(); menuButton.Update(); var seconds = (float)ms / 1000f; var xMod = 0f; var yMod = 0f; if (keyboardInfoProvider.KeyIsPressed(80 /*left*/)) { xMod = -8f * seconds; yMod = 8f * seconds; } if (keyboardInfoProvider.KeyIsPressed(79 /*right*/)) { xMod = 8f * seconds; yMod = -8f * seconds; } if (keyboardInfoProvider.KeyIsPressed(81 /*down*/)) { yMod = 10f * seconds; xMod = 10f * seconds; } if (keyboardInfoProvider.KeyIsPressed(82 /*up*/)) { yMod = -10f * seconds; xMod = -10f * seconds; } if (xMod != 0f || yMod != 0f) { mapEngine.CameraLocation = new PointF(mapEngine.CameraLocation.X + xMod, mapEngine.CameraLocation.Y + yMod); } mapEngine.Update(ms); }
public void Update() { runButton.Update(); menuButton.Update(); addStatButton.Update(); addSkillButton.Update(); if (IsLeftPanelVisible) { LeftPanel.Update(); leftPanelFrame.Update(); } if (IsRightPanelVisible) { RightPanel.Update(); rightPanelFrame.Update(); } if (!IsLeftPanelVisible || !IsRightPanelVisible) { minipanel.Update(); } }