Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void update(float delta)
- {
- if(player != null && !player.isDeleted())
- {
- int x = (int)transform_player.x;
- int y = (int)transform_player.y;
- if(xo + screen_width_2 <= x && x <= xo + w - screen_width_2 )
- {
- camera.position.x = transform_player.x;
- }
- if(yo + screen_height_4 <= y && y <= yo + h - screen_height_4)
- {
- camera.position.y = transform_player.y;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement