mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-11 12:32:54 +08:00
feat(武器): 添加白色灵魂武器及相关资源
添加新的白色灵魂武器,包括脚本、场景和资源文件 修改公鸡角色配置以使用新武器 优化子弹工具类和白色灵魂子弹的行为 添加获取窗口大小的工具方法
This commit is contained in:
@@ -44,8 +44,9 @@ alpha_curve = SubResource("CurveTexture_bd63g")
|
|||||||
[node name="WhiteSoul" instance=ExtResource("1_k41ea")]
|
[node name="WhiteSoul" instance=ExtResource("1_k41ea")]
|
||||||
texture_filter = 1
|
texture_filter = 1
|
||||||
script = ExtResource("2_ld7n7")
|
script = ExtResource("2_ld7n7")
|
||||||
speed = 1.0
|
displayName = "怪物灵魂"
|
||||||
lifeTime = 1000.0
|
speed = 20.0
|
||||||
|
lifeTime = 2000.0
|
||||||
|
|
||||||
[node name="texture" parent="." index="0"]
|
[node name="texture" parent="." index="0"]
|
||||||
rotation = -1.5708
|
rotation = -1.5708
|
||||||
@@ -55,4 +56,5 @@ sprite_frames = SubResource("SpriteFrames_3yyb4")
|
|||||||
amount = 10
|
amount = 10
|
||||||
process_material = SubResource("ParticleProcessMaterial_u4kq5")
|
process_material = SubResource("ParticleProcessMaterial_u4kq5")
|
||||||
texture = ExtResource("2_mqva0")
|
texture = ExtResource("2_mqva0")
|
||||||
|
speed_scale = 2.0
|
||||||
local_coords = true
|
local_coords = true
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=15 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"]
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
[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="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://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_cyreu"]
|
[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_cyreu"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bt4b7ks26fcgi" path="res://components/Weapons/WhiteSoul.tscn" id="3_irwgh"]
|
||||||
[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="PackedScene" uid="uid://bb1uh8k7gkhr7" path="res://components/Weapons/VectorStar.tscn" id="4_re2px"]
|
[ext_resource type="PackedScene" uid="uid://bb1uh8k7gkhr7" path="res://components/Weapons/VectorStar.tscn" id="4_re2px"]
|
||||||
@@ -45,10 +46,13 @@ displayName = "公鸡"
|
|||||||
[node name="weaponStore" parent="." index="0"]
|
[node name="weaponStore" parent="." index="0"]
|
||||||
process_mode = 4
|
process_mode = 4
|
||||||
|
|
||||||
[node name="PurpleCrystal" parent="weaponStore" index="0" instance=ExtResource("3_cyreu")]
|
[node name="WhiteSoul" parent="weaponStore" index="0" instance=ExtResource("3_irwgh")]
|
||||||
|
offset_bottom = 374.0
|
||||||
|
|
||||||
|
[node name="PurpleCrystal" parent="weaponStore" index="1" instance=ExtResource("3_cyreu")]
|
||||||
debugRebuild = false
|
debugRebuild = false
|
||||||
|
|
||||||
[node name="VectorStar" parent="weaponStore" index="1" instance=ExtResource("4_re2px")]
|
[node name="VectorStar" parent="weaponStore" index="2" instance=ExtResource("4_re2px")]
|
||||||
debugRebuild = false
|
debugRebuild = false
|
||||||
|
|
||||||
[node name="sprint" parent="sounds" index="0"]
|
[node name="sprint" parent="sounds" index="0"]
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://bt4b7ks26fcgi"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_4hjdm"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bgj2i5q2rst27" path="res://resources/weapons/Daedalus_Stormbow.png" id="2_kcegs"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/Contents/Weapons/WhiteSoul.gd" id="2_ti114"]
|
||||||
|
|
||||||
|
[node name="WhiteSoul" instance=ExtResource("1_4hjdm")]
|
||||||
|
script = ExtResource("2_ti114")
|
||||||
|
avatarTexture = ExtResource("2_kcegs")
|
||||||
|
displayName = "代达罗斯风暴魂"
|
||||||
|
quality = 3
|
||||||
|
costBeachball = 300
|
||||||
|
store = {
|
||||||
|
"atk": 5,
|
||||||
|
"count": 2.0,
|
||||||
|
"radius": 50.0
|
||||||
|
}
|
||||||
|
storeType = {
|
||||||
|
"atk": 1,
|
||||||
|
"count": 1,
|
||||||
|
"radius": 0.0
|
||||||
|
}
|
||||||
|
descriptionTemplate = "从天而降$count支目标位于鼠标位置半径$radius内的怪物灵魂,造成$atk点伤害。"
|
||||||
|
|
||||||
|
[node name="avatar" parent="container/info" index="0"]
|
||||||
|
texture = ExtResource("2_kcegs")
|
||||||
|
|
||||||
|
[node name="beachball" parent="container/info/infos/beachballInfo" index="1"]
|
||||||
|
text = "300"
|
||||||
|
|
||||||
|
[node name="name" parent="container/info" index="2"]
|
||||||
|
displayName = "代达罗斯风暴魂"
|
||||||
|
quality = 3
|
||||||
|
|
||||||
|
[node name="description" parent="container" index="2"]
|
||||||
|
text = "[center]从天而降[color=cyan]2[/color]→[color=yellow]2[/color]支目标位于鼠标位置半径[color=cyan]50.00[/color]→[color=yellow]47.62[/color]内的怪物灵魂,造成[color=cyan]2[/color]→[color=yellow]4[/color]点伤害。[/center]"
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bgj2i5q2rst27"
|
||||||
|
path="res://.godot/imported/Daedalus_Stormbow.png-36881af235dea97719d844f5cdcdbd5b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/weapons/Daedalus_Stormbow.png"
|
||||||
|
dest_files=["res://.godot/imported/Daedalus_Stormbow.png-36881af235dea97719d844f5cdcdbd5b.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: 314 B |
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cks2uxr5mri6k"
|
||||||
|
path="res://.godot/imported/Daedalus_Stormbow.webp-9c7fdc8c9e9aca2f81aa5ef76e17fb9d.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/weapons/Daedalus_Stormbow.webp"
|
||||||
|
dest_files=["res://.godot/imported/Daedalus_Stormbow.webp-9c7fdc8c9e9aca2f81aa5ef76e17fb9d.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
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
extends BulletBase
|
extends BulletBase
|
||||||
|
|
||||||
func register():
|
|
||||||
speed = 1
|
|
||||||
func ai():
|
func ai():
|
||||||
speed *= 1.05
|
|
||||||
damage = speed
|
|
||||||
PresetBulletAI.forward(self, rotation)
|
PresetBulletAI.forward(self, rotation)
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
@tool
|
||||||
|
extends Weapon
|
||||||
|
|
||||||
|
func update(to, origin, _entity):
|
||||||
|
origin["atk"] += 2 * to * soulLevel
|
||||||
|
origin["count"] += 0.2 * to * soulLevel
|
||||||
|
origin["radius"] /= 1 + 0.05 * to * soulLevel
|
||||||
|
return origin
|
||||||
|
func attack(entity: EntityBase):
|
||||||
|
for i in readStore("count"):
|
||||||
|
var myPos = get_global_mouse_position() + QuickUI.getWindowSize() * Vector2(randf_range(-1, 1) * 0.25, -1)
|
||||||
|
for j in BulletBase.generate(ComponentManager.getBullet("WhiteSoul"), entity,
|
||||||
|
myPos,
|
||||||
|
myPos.angle_to_point(get_global_mouse_position() + MathTool.randv2_range(readStore("radius")))
|
||||||
|
):
|
||||||
|
j.damage = readStore("atk")
|
||||||
|
return true
|
||||||
@@ -8,6 +8,6 @@ static func fromArea(area: Area2D) -> BulletBase:
|
|||||||
static func canDamage(bullet: BulletBase, target: EntityBase) -> bool:
|
static func canDamage(bullet: BulletBase, target: EntityBase) -> bool:
|
||||||
if target.currentInvinsible: return false
|
if target.currentInvinsible: return false
|
||||||
if !bullet.canDamageSelf && target == bullet.launcher: return false
|
if !bullet.canDamageSelf && target == bullet.launcher: return false
|
||||||
if !bullet.is_node_ready() && !GameRule.allowFriendlyFire:
|
if !GameRule.allowFriendlyFire:
|
||||||
if target.isPlayer() == bullet.launcher.isPlayer() and bullet.launcher.currentFocusedBoss != target: return false
|
if target.isPlayer() == bullet.launcher.isPlayer() and bullet.launcher.currentFocusedBoss != target: return false
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -16,3 +16,6 @@ static func graySmallText(text: String, center: bool = true):
|
|||||||
if center:
|
if center:
|
||||||
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||||
return label
|
return label
|
||||||
|
static func getWindowSize() -> Vector2:
|
||||||
|
var result = DisplayServer.window_get_size()
|
||||||
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user