|
|
@ -95,15 +95,9 @@ void HamsterGame::LoadLevel(const std::string_view mapName){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void HamsterGame::UpdateGame(const float fElapsedTime){ |
|
|
|
void HamsterGame::UpdateGame(const float fElapsedTime){ |
|
|
|
/*if(Hamster::GetPlayer().GetZ()>1.f){
|
|
|
|
camera.SetViewSize(tv.GetWorldVisibleArea()); |
|
|
|
tv.SetZoom(1/Hamster::GetPlayer().GetZ(),tv.WorldToScreen(Hamster::GetPlayer().GetPos())); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
tv.SetZoom(1.f,tv.WorldToScreen(Hamster::GetPlayer().GetPos())); |
|
|
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
camera.Update(fElapsedTime); |
|
|
|
camera.Update(fElapsedTime); |
|
|
|
tv.SetWorldOffset(-SCREEN_FRAME.pos*(camera.GetViewSize()/SCREEN_FRAME.size)+camera.GetViewPosition()); |
|
|
|
tv.SetWorldOffset(tv.ScaleToWorld(-SCREEN_FRAME.pos)+camera.GetViewPosition()); |
|
|
|
Hamster::UpdateHamsters(fElapsedTime); |
|
|
|
Hamster::UpdateHamsters(fElapsedTime); |
|
|
|
Powerup::UpdatePowerups(fElapsedTime); |
|
|
|
Powerup::UpdatePowerups(fElapsedTime); |
|
|
|
border.Update(fElapsedTime); |
|
|
|
border.Update(fElapsedTime); |
|
|
|