diff --git a/DungeonShooting_Godot/prefab/role/Role.tscn b/DungeonShooting_Godot/prefab/role/Role.tscn index 83e0efc..8f97c34 100644 --- a/DungeonShooting_Godot/prefab/role/Role.tscn +++ b/DungeonShooting_Godot/prefab/role/Role.tscn @@ -7,6 +7,7 @@ [ext_resource path="res://resource/materlal/Shadow.gdshader" type="Shader" id=5] [sub_resource type="ShaderMaterial" id=31] +resource_local_to_scene = true shader = ExtResource( 5 ) shader_param/shadowColor = Color( 1, 1, 1, 1 ) shader_param/schedule = 0.0 @@ -97,7 +98,7 @@ [sub_resource type="Animation" id=30] resource_name = "hit" -length = 0.15 +length = 0.1 step = 0.05 tracks/0/type = "value" tracks/0/path = NodePath("AnimatedSprite:material:shader_param/schedule") @@ -106,7 +107,7 @@ tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"times": PoolRealArray( 0, 0.02, 0.15 ), +"times": PoolRealArray( 0, 0.02, 0.1 ), "transitions": PoolRealArray( 1, 1, 1 ), "update": 0, "values": [ 1.0, 1.0, 0.0 ] diff --git a/DungeonShooting_Godot/src/game/role/Role.cs b/DungeonShooting_Godot/src/game/role/Role.cs index c32cc05..e574d7b 100644 --- a/DungeonShooting_Godot/src/game/role/Role.cs +++ b/DungeonShooting_Godot/src/game/role/Role.cs @@ -297,6 +297,7 @@ public virtual void Hit(int damage) { Hp -= damage; + AnimationPlayer.Stop(); AnimationPlayer.Play("hit"); OnHit(damage); }