diff --git a/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn b/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn index 9e15242..8b4aa0a 100644 --- a/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn +++ b/DungeonShooting_Godot/prefab/effect/enemy/EnemyBloodEffect.tscn @@ -2,7 +2,7 @@ [ext_resource type="Material" uid="uid://c1chld6lkpgji" path="res://resource/material/SmokeParticleMaterial.tres" id="1_leomh"] [ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="2_c2t2e"] -[ext_resource type="Script" path="res://src/game/effects/AutoDestroyEffect.cs" id="3_i1urq"] +[ext_resource type="Script" path="res://src/game/effects/AutoDestroyParticles.cs" id="3_5cpi6"] [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_emuda"] particles_animation = true @@ -21,5 +21,5 @@ one_shot = true explosiveness = 1.0 fixed_fps = 20 -script = ExtResource("3_i1urq") +script = ExtResource("3_5cpi6") DelayTime = 1.5 diff --git a/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn index 5ba7c89..9d50730 100644 --- a/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn +++ b/DungeonShooting_Godot/prefab/effect/weapon/MeleeAttack1.tscn @@ -1,31 +1,38 @@ -[gd_scene load_steps=7 format=3 uid="uid://cylm455bsio3g"] +[gd_scene load_steps=8 format=3 uid="uid://cylm455bsio3g"] [ext_resource type="Texture2D" uid="uid://7jhe2mmctmr1" path="res://resource/sprite/effects/weapon/MeleeAttack1.png" id="1_bjxle"] [ext_resource type="Script" path="res://src/game/effects/AutoDestroySprite.cs" id="2_bjagc"] -[sub_resource type="AtlasTexture" id="AtlasTexture_h5mw5"] +[sub_resource type="AtlasTexture" id="AtlasTexture_36t2o"] atlas = ExtResource("1_bjxle") -region = Rect2(0, 0, 16, 32) +region = Rect2(0, 0, 16, 38) -[sub_resource type="AtlasTexture" id="AtlasTexture_rjd0g"] +[sub_resource type="AtlasTexture" id="AtlasTexture_pwsgl"] atlas = ExtResource("1_bjxle") -region = Rect2(16, 0, 16, 32) +region = Rect2(16, 0, 16, 38) -[sub_resource type="AtlasTexture" id="AtlasTexture_q06ex"] +[sub_resource type="AtlasTexture" id="AtlasTexture_8lpt5"] atlas = ExtResource("1_bjxle") -region = Rect2(32, 0, 16, 32) +region = Rect2(32, 0, 16, 38) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ihg55"] +atlas = ExtResource("1_bjxle") +region = Rect2(48, 0, 16, 38) [sub_resource type="SpriteFrames" id="SpriteFrames_hkcv6"] animations = [{ "frames": [{ "duration": 1.0, -"texture": SubResource("AtlasTexture_h5mw5") +"texture": SubResource("AtlasTexture_36t2o") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_rjd0g") +"texture": SubResource("AtlasTexture_pwsgl") }, { "duration": 1.0, -"texture": SubResource("AtlasTexture_q06ex") +"texture": SubResource("AtlasTexture_8lpt5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ihg55") }], "loop": false, "name": &"default", @@ -36,4 +43,4 @@ sprite_frames = SubResource("SpriteFrames_hkcv6") autoplay = "default" script = ExtResource("2_bjagc") -DelayTime = 0.15 +DelayTime = 0.2 diff --git a/DungeonShooting_Godot/resource/sprite/effects/weapon/MeleeAttack1.png b/DungeonShooting_Godot/resource/sprite/effects/weapon/MeleeAttack1.png index c22890a..aaa2799 100644 --- a/DungeonShooting_Godot/resource/sprite/effects/weapon/MeleeAttack1.png +++ b/DungeonShooting_Godot/resource/sprite/effects/weapon/MeleeAttack1.png Binary files differ diff --git a/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs b/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs index 3a09f55..dc22d51 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role_Animation.cs @@ -44,13 +44,16 @@ } //播放特效 var sprite = ResourceManager.LoadAndInstantiate(ResourcePath.prefab_effect_weapon_MeleeAttack1_tscn); - var localFirePosition = activeItem.GetLocalFirePosition(); - localFirePosition.X *= 0.85f; + var localFirePosition = activeItem.GetLocalFirePosition() - activeItem.GripPoint.Position; + localFirePosition.X *= 0.9f; sprite.Position = p1 + localFirePosition.Rotated(Mathf.DegToRad(r)); sprite.RotationDegrees = r; AddChild(sprite); })); tween.Chain(); + + tween.TweenInterval(0.1f); + tween.Chain(); tween.TweenProperty(MountPoint, "rotation_degrees", r, 0.2); tween.TweenProperty(MountPoint, "position", p1, 0.2);