mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 07:53:43 +00:00
minimal changes in transformcomponent::update
This commit is contained in:
parent
c2cb8f9fc6
commit
00190facab
@ -54,8 +54,7 @@ void TransformComponent::update()
|
||||
{
|
||||
newPos.x = 0;
|
||||
}
|
||||
|
||||
if (newPos.x + (this->width * this->scale) > SCREEN_SIZE_WIDTH)
|
||||
else if (newPos.x + (this->width * this->scale) > SCREEN_SIZE_WIDTH)
|
||||
{
|
||||
newPos.x = SCREEN_SIZE_WIDTH - (this->width * this->scale);
|
||||
}
|
||||
@ -64,8 +63,7 @@ void TransformComponent::update()
|
||||
{
|
||||
newPos.y = 0;
|
||||
}
|
||||
|
||||
if (newPos.y + (this->height * this->scale) > SCREEN_SIZE_HEIGHT)
|
||||
else if (newPos.y + (this->height * this->scale) > SCREEN_SIZE_HEIGHT)
|
||||
{
|
||||
newPos.y = SCREEN_SIZE_HEIGHT - (this->height * this->scale);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user