Small refactor and rename of struct field.
This commit is contained in:
+3
-3
@@ -33,7 +33,7 @@ debug_camera_init :: proc(player: Player) -> rl.Camera2D {
|
||||
offset_adjust := (TILE_SIZE / 2) * 0.3
|
||||
|
||||
return rl.Camera2D {
|
||||
target = player.pos,
|
||||
target = player.position,
|
||||
offset = rl.Vector2{ f32(GAME_WIDTH/2 - offset_adjust), f32(GAME_HEIGHT/2 - offset_adjust) },
|
||||
rotation = 0,
|
||||
zoom = 0.3
|
||||
@@ -79,8 +79,8 @@ debug_bounds :: proc(game: ^Game) {
|
||||
if game.debug.bounds_active {
|
||||
// player
|
||||
player := game.player
|
||||
player_collider := get_player_collider(&game.player, game.player.pos)
|
||||
rl.DrawRectangleLines( i32(player.pos.x), i32(player.pos.y), TILE_SIZE, TILE_SIZE, rl.GREEN)
|
||||
player_collider := get_player_collider(&game.player, game.player.position)
|
||||
rl.DrawRectangleLines( i32(player.position.x), i32(player.position.y), TILE_SIZE, TILE_SIZE, rl.GREEN)
|
||||
rl.DrawRectangleLinesEx(player_collider, 1, rl.BLUE)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user