mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-12 13:02:53 +08:00
feat(武器系统): 添加七魂武器及相关资源
添加七魂武器系统,包括: - 七魂武器脚本和场景 - 灵魂子弹脚本和场景 - 相关图片资源和音效 - 修改公鸡角色的武器配置 - 修复子弹基础类的UI状态检测问题
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://bymprh2qel2oj"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_c4fl5"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/Contents/Bullets/SevenSoul.gd" id="2_egs34"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://wy10fc3bqppg" path="res://resources/bullets/seven-soul/soul.png" id="2_itucu"]
|
||||||
|
|
||||||
|
[node name="SevenSoul" instance=ExtResource("1_c4fl5")]
|
||||||
|
script = ExtResource("2_egs34")
|
||||||
|
lifeTime = 10000.0
|
||||||
|
|
||||||
|
[node name="heart" type="Sprite2D" parent="texture" index="1"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
position = Vector2(100, 0)
|
||||||
|
scale = Vector2(1.5, 1.5)
|
||||||
|
texture = ExtResource("2_itucu")
|
||||||
|
|
||||||
|
[node name="hitbox" parent="." index="1"]
|
||||||
|
disabled = true
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
[gd_scene load_steps=10 format=3 uid="uid://lwmu85w7c0d4"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_1gpjv"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/Contents/Bullets/SoulBall.gd" id="2_eaa43"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b8w31dkev8nc8" path="res://resources/bullets/seven-soul/soul-red.png" id="2_fmlef"]
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_5be2f"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("2_fmlef")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"default",
|
||||||
|
"speed": 5.0
|
||||||
|
}]
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_fxg5q"]
|
||||||
|
_data = [Vector2(0, 0.75), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_5wobk"]
|
||||||
|
curve = SubResource("Curve_fxg5q")
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_orogq"]
|
||||||
|
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.5), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_pftyf"]
|
||||||
|
curve = SubResource("Curve_orogq")
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_vwon6"]
|
||||||
|
particle_flag_disable_z = true
|
||||||
|
direction = Vector3(-1, 0, 0)
|
||||||
|
spread = 0.0
|
||||||
|
gravity = Vector3(0, 0, 0)
|
||||||
|
scale_curve = SubResource("CurveTexture_pftyf")
|
||||||
|
alpha_curve = SubResource("CurveTexture_5wobk")
|
||||||
|
|
||||||
|
[node name="SoulBall" instance=ExtResource("1_1gpjv")]
|
||||||
|
script = ExtResource("2_eaa43")
|
||||||
|
displayName = "灵魂"
|
||||||
|
speed = 25.0
|
||||||
|
damage = 1.5
|
||||||
|
lifeTime = 1000.0
|
||||||
|
|
||||||
|
[node name="texture" parent="." index="0"]
|
||||||
|
sprite_frames = SubResource("SpriteFrames_5be2f")
|
||||||
|
|
||||||
|
[node name="trail" type="GPUParticles2D" parent="texture" index="1"]
|
||||||
|
amount = 10
|
||||||
|
process_material = SubResource("ParticleProcessMaterial_vwon6")
|
||||||
|
texture = ExtResource("2_fmlef")
|
||||||
|
lifetime = 0.5
|
||||||
|
|
||||||
|
[node name="hitbox" parent="." index="1"]
|
||||||
|
visible = false
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
[gd_scene load_steps=17 format=3 uid="uid://bm7ymrri6pykb"]
|
[gd_scene load_steps=16 format=3 uid="uid://bm7ymrri6pykb"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"]
|
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"]
|
||||||
[ext_resource type="Script" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
[ext_resource type="Script" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
||||||
[ext_resource type="Texture2D" uid="uid://fn8qx72clh38" path="res://resources/characters/cock/rooster-a.svg" id="2_q0j6j"]
|
[ext_resource type="Texture2D" uid="uid://fn8qx72clh38" path="res://resources/characters/cock/rooster-a.svg" id="2_q0j6j"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dclinyhu256xi" path="res://resources/sounds/effect/Low Whoosh.mp3" id="3_4syso"]
|
[ext_resource type="AudioStream" uid="uid://dclinyhu256xi" path="res://resources/sounds/effect/Low Whoosh.mp3" id="3_4syso"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c5y4g70evwy46" path="res://components/Weapons/SevenSoul.tscn" id="3_6e3s5"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ci2ik43ce82uy" path="res://resources/characters/cock/rooster-b.svg" id="3_b0fgx"]
|
[ext_resource type="Texture2D" uid="uid://ci2ik43ce82uy" path="res://resources/characters/cock/rooster-b.svg" id="3_b0fgx"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b2qhes4apaxsj" path="res://components/Weapons/NuclearBomb.tscn" id="3_eikw3"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_ms5sq"]
|
[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_ms5sq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://frwt0fgrpskb" path="res://components/Weapons/Meowmere.tscn" id="3_pbssk"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"]
|
[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://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"]
|
[ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"]
|
||||||
@@ -47,16 +46,13 @@ displayName = "公鸡"
|
|||||||
[node name="weaponStore" parent="." index="0"]
|
[node name="weaponStore" parent="." index="0"]
|
||||||
process_mode = 4
|
process_mode = 4
|
||||||
|
|
||||||
[node name="NuclearBomb" parent="weaponStore" index="0" instance=ExtResource("3_eikw3")]
|
[node name="SevenSoul" parent="weaponStore" index="0" instance=ExtResource("3_6e3s5")]
|
||||||
offset_bottom = 352.0
|
offset_bottom = 330.0
|
||||||
|
|
||||||
[node name="Meowmere" parent="weaponStore" index="1" instance=ExtResource("3_pbssk")]
|
[node name="PurpleCrystal" parent="weaponStore" index="1" instance=ExtResource("3_ms5sq")]
|
||||||
offset_bottom = 374.0
|
|
||||||
|
|
||||||
[node name="PurpleCrystal" parent="weaponStore" index="2" instance=ExtResource("3_ms5sq")]
|
|
||||||
debugRebuild = false
|
debugRebuild = false
|
||||||
|
|
||||||
[node name="VectorStar" parent="weaponStore" index="3" instance=ExtResource("6_fvy5n")]
|
[node name="VectorStar" parent="weaponStore" index="2" instance=ExtResource("6_fvy5n")]
|
||||||
debugRebuild = false
|
debugRebuild = false
|
||||||
|
|
||||||
[node name="sprint" parent="sounds" index="0"]
|
[node name="sprint" parent="sounds" index="0"]
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://c5y4g70evwy46"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_0f84s"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/Contents/Weapons/SevenSoul.gd" id="2_n7gtb"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b8w31dkev8nc8" path="res://resources/bullets/seven-soul/soul-red.png" id="4_a4r2b"]
|
||||||
|
|
||||||
|
[node name="SevenSoul" instance=ExtResource("1_0f84s")]
|
||||||
|
script = ExtResource("2_n7gtb")
|
||||||
|
avatarTexture = ExtResource("4_a4r2b")
|
||||||
|
displayName = "人类灵魂"
|
||||||
|
typeTopic = 3
|
||||||
|
store = {
|
||||||
|
"atk": 2
|
||||||
|
}
|
||||||
|
descriptionTemplate = "召唤7条人类灵魂,每条以10Hz的频率造成$atk点伤害。"
|
||||||
|
cooldown = 2000.0
|
||||||
|
debugRebuild = true
|
||||||
|
|
||||||
|
[node name="avatar" parent="container/info" index="0"]
|
||||||
|
texture = ExtResource("4_a4r2b")
|
||||||
|
|
||||||
|
[node name="name" parent="container/info" index="2"]
|
||||||
|
displayName = "人类灵魂"
|
||||||
|
typeTopic = 3
|
||||||
|
|
||||||
|
[node name="description" parent="container" index="2"]
|
||||||
|
text = "[center]召唤7条人类灵魂,每条以10Hz的频率造成[color=cyan]2[/color]→[color=yellow]10[/color]点伤害。[/center]"
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b8w31dkev8nc8"
|
||||||
|
path="res://.godot/imported/soul-red.png-5906a88236e6b6f063c75e68c904129a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/bullets/seven-soul/soul-red.png"
|
||||||
|
dest_files=["res://.godot/imported/soul-red.png-5906a88236e6b6f063c75e68c904129a.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://wy10fc3bqppg"
|
||||||
|
path="res://.godot/imported/soul.png-02e55b93755a88f546bf5dccf19a9564.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/bullets/seven-soul/soul.png"
|
||||||
|
dest_files=["res://.godot/imported/soul.png-02e55b93755a88f546bf5dccf19a9564.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
extends BulletBase
|
||||||
|
|
||||||
|
var colors = [
|
||||||
|
"#2BEAFF",
|
||||||
|
"#FCA500",
|
||||||
|
"#0042FF",
|
||||||
|
"#D346D0",
|
||||||
|
"#0C9B0B",
|
||||||
|
"#FDEB0F"
|
||||||
|
]
|
||||||
|
var index = 0
|
||||||
|
|
||||||
|
@onready var heart = $"%heart"
|
||||||
|
|
||||||
|
func spawn():
|
||||||
|
heart.modulate = Color(colors[index % colors.size()])
|
||||||
|
rotation_degrees = 360.0 / colors.size() * index
|
||||||
|
func ai():
|
||||||
|
rotation_degrees += 1.5
|
||||||
|
heart.global_rotation_degrees = 0
|
||||||
|
PresetBulletAI.lockLauncher(self, launcher, true)
|
||||||
|
func applyDot():
|
||||||
|
BulletBase.generate(ComponentManager.getBullet("SoulBall"), launcher, heart.global_position, heart.global_position.angle_to_point(get_global_mouse_position()))
|
||||||
|
await TickTool.millseconds(100)
|
||||||
|
return true
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
extends BulletBase
|
||||||
|
|
||||||
|
func ai():
|
||||||
|
PresetBulletAI.forward(self, rotation)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
@tool
|
||||||
|
extends Weapon
|
||||||
|
|
||||||
|
func attack(entity: EntityBase):
|
||||||
|
for i in 7:
|
||||||
|
for j in BulletBase.generate(ComponentManager.getBullet("SevenSoul"), entity, entity.texture.global_position, 0):
|
||||||
|
j.index = i
|
||||||
|
func update(to, origin, _entity):
|
||||||
|
origin["atk"] += 1 * to * soulLevel
|
||||||
|
return origin
|
||||||
@@ -100,6 +100,7 @@ func timeLived():
|
|||||||
return WorldManager.getTime() - spawnInWhen
|
return WorldManager.getTime() - spawnInWhen
|
||||||
func dotLoop():
|
func dotLoop():
|
||||||
if await applyDot():
|
if await applyDot():
|
||||||
|
await TickTool.until(func(): return !UIState.currentPanel)
|
||||||
await dotLoop()
|
await dotLoop()
|
||||||
func tryDestroy(becauseMap: bool = false):
|
func tryDestroy(becauseMap: bool = false):
|
||||||
if destroying: return
|
if destroying: return
|
||||||
|
|||||||
Reference in New Issue
Block a user