Removed hardcoded "camera" name reference and manual tween node camera (#411)
Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
@@ -35,7 +35,7 @@ func validate(arguments: Array):
|
||||
|
||||
# Run the command
|
||||
func run(command_params: Array) -> int:
|
||||
(escoria.object_manager.get_object("camera").node as ESCCamera)\
|
||||
(escoria.object_manager.get_object("_camera").node as ESCCamera)\
|
||||
.push(
|
||||
escoria.object_manager.get_object(command_params[0]).node,
|
||||
command_params[1],
|
||||
|
||||
@@ -20,7 +20,7 @@ func configure() -> ESCCommandArgumentDescriptor:
|
||||
|
||||
# Run the command
|
||||
func run(command_params: Array) -> int:
|
||||
(escoria.object_manager.get_object("camera").node as ESCCamera)\
|
||||
(escoria.object_manager.get_object("_camera").node as ESCCamera)\
|
||||
.set_target(
|
||||
Vector2(command_params[1], command_params[2]),
|
||||
command_params[0]
|
||||
|
||||
@@ -34,7 +34,7 @@ func validate(arguments: Array):
|
||||
|
||||
# Run the command
|
||||
func run(command_params: Array) -> int:
|
||||
(escoria.object_manager.get_object("camera").node as ESCCamera)\
|
||||
(escoria.object_manager.get_object("_camera").node as ESCCamera)\
|
||||
.set_target(
|
||||
escoria.object_manager.get_object(command_params[1]).node,
|
||||
command_params[0]
|
||||
|
||||
@@ -21,7 +21,7 @@ func configure() -> ESCCommandArgumentDescriptor:
|
||||
|
||||
# Run the command
|
||||
func run(command_params: Array) -> int:
|
||||
(escoria.object_manager.get_object("camera").node as ESCCamera)\
|
||||
(escoria.object_manager.get_object("_camera").node as ESCCamera)\
|
||||
.set_camera_zoom(
|
||||
command_params[0],
|
||||
command_params[1]
|
||||
|
||||
@@ -34,7 +34,7 @@ func validate(arguments: Array):
|
||||
|
||||
# Run the command
|
||||
func run(command_params: Array) -> int:
|
||||
(escoria.object_manager.get_object("camera").node as ESCCamera)\
|
||||
(escoria.object_manager.get_object("_camera").node as ESCCamera)\
|
||||
.set_camera_zoom(
|
||||
command_params[0] / escoria.game_size.y,
|
||||
command_params[1]
|
||||
|
||||
@@ -20,7 +20,7 @@ func configure() -> ESCCommandArgumentDescriptor:
|
||||
|
||||
# Run the command
|
||||
func run(command_params: Array) -> int:
|
||||
(escoria.object_manager.get_object("camera").node as ESCCamera)\
|
||||
(escoria.object_manager.get_object("_camera").node as ESCCamera)\
|
||||
.shift(
|
||||
command_params[0],
|
||||
command_params[1],
|
||||
|
||||
@@ -6,7 +6,8 @@ class_name ESCObjectManager
|
||||
const RESERVED_OBJECTS = [
|
||||
"_music",
|
||||
"_sound",
|
||||
"_speech"
|
||||
"_speech",
|
||||
"_camera"
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ func _ready():
|
||||
),
|
||||
true
|
||||
)
|
||||
game.get_node("camera").set_target(player)
|
||||
escoria.object_manager.get_object("_camera").node.set_target(player)
|
||||
|
||||
for n in get_children():
|
||||
if n is ESCLocation and n.is_start_location:
|
||||
|
||||
Reference in New Issue
Block a user