mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-22 11:32:30 +08:00
feat(子弹效果): 为蓝水晶子弹添加爆炸效果并调整相关配置
- 在BlueCrystal.gd中添加destroy方法创建爆炸效果 - 新增BlueCrystalExplosion.tscn爆炸效果场景 - 调整PurpleCrystalExplosion.tscn粒子数量 - 修复ItemDropped.gd中玩家实例有效性检查 - 将Rooster.tscn的武器更换为水晶系武器
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"]
|
||||
[ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
||||
[ext_resource type="PackedScene" uid="uid://dlaks67h2osms" path="res://components/Weapons/ChainGun.tscn" id="3_da2ca"]
|
||||
[ext_resource type="PackedScene" uid="uid://wl8u5m52708w" path="res://components/Weapons/LGBT.tscn" id="3_s7kxe"]
|
||||
[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_jluqw"]
|
||||
[ext_resource type="PackedScene" uid="uid://c3crr8r7y3oho" path="res://components/Weapons/BlueCrystal.tscn" id="4_0omr3"]
|
||||
[ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"]
|
||||
[ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"]
|
||||
[ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"]
|
||||
@@ -55,11 +55,10 @@ metadata/_edit_vertical_guides_ = [71.0]
|
||||
[node name="weaponStore" parent="." index="1"]
|
||||
process_mode = 4
|
||||
|
||||
[node name="ChainGun" parent="weaponStore" index="0" instance=ExtResource("3_da2ca")]
|
||||
offset_bottom = 374.0
|
||||
needEnergy = 2.0
|
||||
[node name="PurpleCrystal" parent="weaponStore" index="0" instance=ExtResource("3_jluqw")]
|
||||
offset_bottom = 350.0
|
||||
|
||||
[node name="LGBT" parent="weaponStore" index="1" instance=ExtResource("3_s7kxe")]
|
||||
[node name="BlueCrystal" parent="weaponStore" index="1" instance=ExtResource("4_0omr3")]
|
||||
|
||||
[node name="sprint" parent="sounds" index="0"]
|
||||
stream = ExtResource("4_66s6c")
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://dg0pqoys62fjk"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_evyr8"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_evyr8"]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_0rujw"]
|
||||
curve = SubResource("Curve_evyr8")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_44fku"]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_gv4mv"]
|
||||
curve = SubResource("Curve_44fku")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_s1ueo"]
|
||||
colors = PackedColorArray(0.23693943, 0.75172913, 1, 1, 0.4848321, 0.23693943, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_qc3wg"]
|
||||
gradient = SubResource("Gradient_s1ueo")
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_231oy"]
|
||||
offsets = PackedFloat32Array(0.5, 1)
|
||||
colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_460m2"]
|
||||
gradient = SubResource("Gradient_231oy")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_g7c62"]
|
||||
particle_flag_disable_z = true
|
||||
angle_min = 1.07288e-05
|
||||
angle_max = 360.0
|
||||
angle_curve = SubResource("CurveTexture_gv4mv")
|
||||
direction = Vector3(-1, 0, 0)
|
||||
spread = 180.0
|
||||
initial_velocity_max = 100.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
scale_min = 3.0
|
||||
scale_max = 8.0
|
||||
color_ramp = SubResource("GradientTexture1D_460m2")
|
||||
color_initial_ramp = SubResource("GradientTexture1D_qc3wg")
|
||||
alpha_curve = SubResource("CurveTexture_0rujw")
|
||||
|
||||
[sub_resource type="Animation" id="Animation_rcc6g"]
|
||||
length = 0.001
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:material:shader_parameter/explosion_radius")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0)
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_pa4et"]
|
||||
resource_name = "explosion"
|
||||
length = 2.0
|
||||
step = 0.1
|
||||
tracks/0/type = "bezier"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:material:shader_parameter/explosion_radius")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0, 0.5, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0),
|
||||
"times": PackedFloat32Array(0, 1, 2)
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_n7i5u"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_rcc6g"),
|
||||
&"explosion": SubResource("Animation_pa4et")
|
||||
}
|
||||
|
||||
[node name="Explosion" instance=ExtResource("1_evyr8")]
|
||||
|
||||
[node name="particles" parent="." index="1"]
|
||||
amount = 15
|
||||
process_material = SubResource("ParticleProcessMaterial_g7c62")
|
||||
|
||||
[node name="animator" parent="stage" index="0"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_n7i5u")
|
||||
}
|
||||
@@ -75,18 +75,18 @@ tracks/0/keys = {
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_n7i5u"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_rcc6g"),
|
||||
"explosion": SubResource("Animation_pa4et")
|
||||
&"RESET": SubResource("Animation_rcc6g"),
|
||||
&"explosion": SubResource("Animation_pa4et")
|
||||
}
|
||||
|
||||
[node name="Explosion" instance=ExtResource("1_sqdwd")]
|
||||
|
||||
[node name="particles" parent="." index="1"]
|
||||
amount = 25
|
||||
process_material = SubResource("ParticleProcessMaterial_w52ko")
|
||||
amount = 10
|
||||
lifetime = 0.5
|
||||
process_material = SubResource("ParticleProcessMaterial_w52ko")
|
||||
|
||||
[node name="animator" parent="stage" index="0"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_n7i5u")
|
||||
&"": SubResource("AnimationLibrary_n7i5u")
|
||||
}
|
||||
|
||||
@@ -14,3 +14,7 @@ func ai():
|
||||
trail.rotation = 0
|
||||
speed += 0.1
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
func destroy(_beacuseMap: bool):
|
||||
var eff = EffectController.create(ComponentManager.getEffect("BlueCrystalExplosion"), global_position)
|
||||
eff.rotation = rotation
|
||||
eff.shot()
|
||||
|
||||
@@ -41,7 +41,7 @@ func _physics_process(_delta):
|
||||
refindPlayer()
|
||||
|
||||
func canICollect():
|
||||
return targetPlayer.inventoryMax[item] > targetPlayer.inventory[item]
|
||||
return is_instance_valid(targetPlayer) && targetPlayer.inventoryMax[item] > targetPlayer.inventory[item]
|
||||
func collect():
|
||||
collecting = true
|
||||
animator.play("collect")
|
||||
@@ -65,7 +65,10 @@ static func generate(
|
||||
instance.add_to_group("drops")
|
||||
return instance
|
||||
static func getDrops() -> Array[ItemDropped]:
|
||||
return WorldManager.tree.get_nodes_in_group("drops") as Array[ItemDropped]
|
||||
var result: Array[ItemDropped] = []
|
||||
for drop in WorldManager.tree.get_nodes_in_group("drops"):
|
||||
result.append(drop)
|
||||
return result
|
||||
static func getDropsCanCollet() -> Array[ItemDropped]:
|
||||
var result: Array[ItemDropped] = []
|
||||
for drop in getDrops():
|
||||
|
||||
Reference in New Issue
Block a user