fix: FIxed non-editor call to _set_animation_player (#369)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de> Co-authored-by: dploeger <dploeger@users.noreply.github.com>
This commit is contained in:
@@ -415,6 +415,9 @@ func _get_property_list():
|
|||||||
#
|
#
|
||||||
# - node_path: Path to the player node
|
# - node_path: Path to the player node
|
||||||
func _set_animation_player_node(node_path: NodePath):
|
func _set_animation_player_node(node_path: NodePath):
|
||||||
|
if not Engine.is_editor_hint():
|
||||||
|
return
|
||||||
|
|
||||||
if node_path == "":
|
if node_path == "":
|
||||||
animation_player_node = node_path
|
animation_player_node = node_path
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -204,6 +204,14 @@ var animations: ESCAnimationResource
|
|||||||
|
|
||||||
ESCAnimationsResource (for walking, idling...)
|
ESCAnimationsResource (for walking, idling...)
|
||||||
|
|
||||||
|
### animation\_sprite
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
var animation_sprite
|
||||||
|
```
|
||||||
|
|
||||||
|
Reference to the animation node (null if none was found)
|
||||||
|
|
||||||
### terrain
|
### terrain
|
||||||
|
|
||||||
```gdscript
|
```gdscript
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ script = ExtResource( 1 )
|
|||||||
global_id = "player"
|
global_id = "player"
|
||||||
is_movable = true
|
is_movable = true
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
dialog_color = Color( 1, 1, 1, 1 )
|
||||||
|
animation_player_node = NodePath("sprite")
|
||||||
animations = ExtResource( 3 )
|
animations = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="sprite" type="AnimatedSprite" parent="."]
|
[node name="sprite" type="AnimatedSprite" parent="."]
|
||||||
|
|||||||
Reference in New Issue
Block a user