mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-18 01:13:47 +00:00
Camera 2D
This commit is contained in:
parent
bee29ba9ea
commit
4cb902053d
18 changed files with 791 additions and 24 deletions
12
Scenes/game.gd
Normal file
12
Scenes/game.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
extends Node2D
|
||||
|
||||
## Whether to use the debug player camera for testing. Otherwise, use the CameraController with non-pixel-perfect settings (hard-coded zoom).
|
||||
@export var use_debug_player_camera: bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
var camera_controller: CameraController = get_tree().get_first_node_in_group("camera_controllers")
|
||||
if use_debug_player_camera:
|
||||
var debug_player_camera: Camera2D = get_tree().get_first_node_in_group("debug_player_camera")
|
||||
camera_controller.enabled = false
|
||||
debug_player_camera.zoom = Vector2(1, 1)
|
||||
debug_player_camera.enabled = true
|
||||
Loading…
Add table
Add a link
Reference in a new issue