Fix Hiro player freezing after melee animation end
This commit is contained in:
parent
2f2ebd5426
commit
31529ecbd4
|
@ -565,7 +565,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -654,7 +654,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -743,7 +743,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -832,7 +832,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -921,7 +921,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -1010,7 +1010,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -1099,7 +1099,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -1188,7 +1188,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -1277,7 +1277,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -1366,7 +1366,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -1455,7 +1455,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
@ -1544,7 +1544,7 @@ tracks/3/keys = {
|
|||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/enabled = false
|
||||
tracks/4/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
|
|
|
@ -167,8 +167,8 @@ advance_mode = 2
|
|||
advance_condition = &"melee"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_l17k0"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
advance_expression = "get(\"parameters/conditions/melee\") == false"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ln3pc"]
|
||||
switch_mode = 2
|
||||
|
@ -186,7 +186,7 @@ states/melee/position = Vector2(329, 224)
|
|||
states/walk/node = SubResource("AnimationNodeBlendSpace2D_vunsg")
|
||||
states/walk/position = Vector2(520, 108)
|
||||
transitions = ["Start", "idle", SubResource("AnimationNodeStateMachineTransition_akmuq"), "idle", "walk", SubResource("AnimationNodeStateMachineTransition_sn1tm"), "walk", "idle", SubResource("AnimationNodeStateMachineTransition_5i3fu"), "idle", "melee", SubResource("AnimationNodeStateMachineTransition_y8p74"), "melee", "idle", SubResource("AnimationNodeStateMachineTransition_l17k0"), "hurt", "idle", SubResource("AnimationNodeStateMachineTransition_ln3pc")]
|
||||
graph_offset = Vector2(-258, -59)
|
||||
graph_offset = Vector2(-241, 18)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_vm050"]
|
||||
radius = 8.0
|
||||
|
@ -225,6 +225,7 @@ parameters/melee/2/blend_position = Vector2(0, 0)
|
|||
parameters/walk/blend_position = Vector2(-0.0100167, -0.0729166)
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(0, 1)
|
||||
collision_layer = 2
|
||||
collision_mask = 10
|
||||
|
@ -235,6 +236,7 @@ shape = SubResource("CapsuleShape2D_vm050")
|
|||
debug_color = Color(1, 0.133333, 0.321569, 0.419608)
|
||||
|
||||
[node name="MovementCollider" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(-0.5, -1)
|
||||
shape = SubResource("RectangleShape2D_bdqvd")
|
||||
|
||||
|
|
|
@ -102,5 +102,6 @@ func _on_enemy_attack_did_hit(other, power, attack_direction):
|
|||
func _on_animation_tree_animation_finished(anim_name):
|
||||
if anim_name.contains("hurt") or anim_name.contains("kick") or anim_name.contains("punch"):
|
||||
can_move = true
|
||||
$AnimationTree.set("parameters/conditions/melee", false)
|
||||
if anim_name.contains("kick") or anim_name.contains("punch"):
|
||||
$Attackbox/Collider.set_deferred("disabled", true)
|
||||
|
|
Loading…
Reference in a new issue