Fix camera path getter.

This commit is contained in:
Relintai 2020-01-04 17:28:45 +01:00
parent e09e6d18d2
commit e2eea71d1a
2 changed files with 9 additions and 7 deletions

View File

@ -71,7 +71,7 @@ var world : Node2D = null
func _ready() -> void:
camera = $Camera as Camera2D
camera = $Body/Camera as Camera2D
world = get_node(world_path) as Node2D

View File

@ -10,19 +10,21 @@ radius = 8.0
[node name="Player" type="Entity" groups=[
"players",
]]
body_path = NodePath("KinematicBody2D")
character_skeleton_path = NodePath("KinematicBody2D/Character")
body_path = NodePath("Body")
character_skeleton_path = NodePath("Body/Character")
script = ExtResource( 2 )
[node name="GUILayer" parent="." instance=ExtResource( 3 )]
[node name="KinematicBody2D" type="KinematicBody2D" parent="."]
[node name="Body" type="KinematicBody2D" parent="."]
[node name="Character" parent="KinematicBody2D" instance=ExtResource( 1 )]
[node name="Character" parent="Body" instance=ExtResource( 1 )]
front_node_path = NodePath("../../Body/Character/CharacterFrontModel")
side_node_path = NodePath("../../Body/Character/CharacterSideModel")
[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Body"]
shape = SubResource( 1 )
[node name="Camera" type="Camera2D" parent="KinematicBody2D"]
[node name="Camera" type="Camera2D" parent="Body"]
current = true
[connection signal="onc_open_loot_winow_request" from="." to="GUILayer" method="_on_Player_onc_open_loot_winow_request"]