Simplify enemy animation logic
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
[gd_resource type="AnimationNodeStateMachine" load_steps=18 format=3 uid="uid://co7lshemjrro8"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ivy74"]
|
||||
animation = &"idle_back"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_x7uye"]
|
||||
animation = &"idle_front"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_djeua"]
|
||||
animation = &"idle_left"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_8wbs7"]
|
||||
animation = &"idle_right"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ivy74"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_x7uye"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_djeua"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8wbs7"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_mnr4r"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_l2wq1"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_jwlar"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fdoul"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 0"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_kpotx"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_lfuuf"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_dfvqa"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 2"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_dnvt3"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 3"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_m7aft"]
|
||||
switch_mode = 1
|
||||
advance_mode = 2
|
||||
advance_expression = "_enemyDirection == 1"
|
||||
|
||||
[resource]
|
||||
states/End/position = Vector2(910, 100)
|
||||
states/back/node = SubResource("AnimationNodeAnimation_ivy74")
|
||||
states/back/position = Vector2(542, 276)
|
||||
states/forward/node = SubResource("AnimationNodeAnimation_x7uye")
|
||||
states/forward/position = Vector2(542, 68)
|
||||
states/left/node = SubResource("AnimationNodeAnimation_djeua")
|
||||
states/left/position = Vector2(378, 179)
|
||||
states/right/node = SubResource("AnimationNodeAnimation_8wbs7")
|
||||
states/right/position = Vector2(701, 179)
|
||||
transitions = ["Start", "forward", SubResource("AnimationNodeStateMachineTransition_ivy74"), "forward", "left", SubResource("AnimationNodeStateMachineTransition_x7uye"), "left", "forward", SubResource("AnimationNodeStateMachineTransition_djeua"), "forward", "back", SubResource("AnimationNodeStateMachineTransition_8wbs7"), "back", "forward", SubResource("AnimationNodeStateMachineTransition_mnr4r"), "left", "right", SubResource("AnimationNodeStateMachineTransition_l2wq1"), "right", "left", SubResource("AnimationNodeStateMachineTransition_jwlar"), "back", "left", SubResource("AnimationNodeStateMachineTransition_fdoul"), "left", "back", SubResource("AnimationNodeStateMachineTransition_kpotx"), "forward", "right", SubResource("AnimationNodeStateMachineTransition_lfuuf"), "right", "forward", SubResource("AnimationNodeStateMachineTransition_dfvqa"), "right", "back", SubResource("AnimationNodeStateMachineTransition_dnvt3"), "back", "right", SubResource("AnimationNodeStateMachineTransition_m7aft")]
|
||||
Reference in New Issue
Block a user