mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 14:41:49 +01:00
Add more ores
Add weighted random distribution
This commit is contained in:
@@ -58,6 +58,7 @@ void Game::ProcessKeyUpEvent(const SDL_KeyboardEvent& e) {
|
||||
void Game::ProcessMouseMotionEvent(const SDL_MouseMotionEvent& e) {
|
||||
m_MousePos = Vector2f { float(e.x), float(e.y) };
|
||||
m_pCurrentLevel->MouseMove(Vector2f { float(e.x), float(e.y) });
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -83,6 +84,17 @@ void Game::ProcessMouseUpEvent(const SDL_MouseButtonEvent& e) {
|
||||
// break;
|
||||
//}
|
||||
}
|
||||
void Game::ProcessMouseWheelEvent(const SDL_MouseWheelEvent& e) {
|
||||
Vector2f scroll = Vector2f { 0, 0 };
|
||||
if (e.y > 0) {
|
||||
scroll = Vector2f { 0, 1 };
|
||||
}
|
||||
else if (e.y < 0) {
|
||||
scroll = Vector2f { 0, -1 };
|
||||
}
|
||||
//camera zoom
|
||||
m_Camera.SetScale((m_Camera.GetScale() - e.preciseY * 0.1f));
|
||||
}
|
||||
void Game::ProcessImGui() {
|
||||
m_pCurrentLevel->ProcessImGui();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user