wip: splits out camera from UI game scene; makes camera a per-room thing; updated check for running rooms directly; corrected timing issue w/ updating state immediately by ensuring animation player does seek with immediate animation update
This commit is contained in:
committed by
Julian Murgia
parent
8d1b00bb90
commit
0175342a61
@@ -21,14 +21,6 @@ func _ready():
|
||||
_tween = Tween.new()
|
||||
add_child(_tween)
|
||||
_tween.connect("tween_all_completed", self, "_target_reached")
|
||||
escoria.object_manager.register_object(
|
||||
ESCObject.new(
|
||||
escoria.object_manager.CAMERA,
|
||||
self
|
||||
),
|
||||
null,
|
||||
true
|
||||
)
|
||||
|
||||
|
||||
# Update the position if the followed target is moving
|
||||
@@ -37,6 +29,24 @@ func _process(_delta):
|
||||
self.global_position = _follow_target.global_position
|
||||
|
||||
|
||||
# Register this camera with the object manager. We do it out here so we can
|
||||
# work with the camera before it's made active as part of the current scene
|
||||
# tree.
|
||||
#
|
||||
# #### Parameters
|
||||
#
|
||||
# - room: The room with which to register the camera.
|
||||
func register(room = null):
|
||||
escoria.object_manager.register_object(
|
||||
ESCObject.new(
|
||||
escoria.object_manager.CAMERA,
|
||||
self
|
||||
),
|
||||
room,
|
||||
true
|
||||
)
|
||||
|
||||
|
||||
# Sets camera limits so it doesn't go out of the scene
|
||||
#
|
||||
# #### Parameters
|
||||
|
||||
Reference in New Issue
Block a user