mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat: 新增光标刃轮武器及相关资源
添加光标刃轮武器系统,包括: - 武器脚本和场景配置 - 子弹动画和特效 - 相关音效和贴图资源 - 武器升级逻辑 - 角色初始武器配置调整
This commit is contained in:
@@ -0,0 +1,172 @@
|
|||||||
|
[gd_scene load_steps=16 format=3 uid="uid://cxjsajua2a82n"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_epcdw"]
|
||||||
|
[ext_resource type="Script" uid="uid://c337id4kvvj58" path="res://scripts/Contents/Bullets/CursorKnife.gd" id="2_glt8o"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://geax1diwtp48" path="res://resources/bullets/cursor/knife1.png" id="5_aqt0q"]
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id="SpriteFrames_vdv8l"]
|
||||||
|
animations = [{
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("5_aqt0q")
|
||||||
|
}],
|
||||||
|
"loop": false,
|
||||||
|
"name": &"default",
|
||||||
|
"speed": 10.0
|
||||||
|
}]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_glt8o"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "bezier"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".:scale:x")
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
tracks/1/type = "bezier"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath(".:scale:y")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0),
|
||||||
|
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
|
||||||
|
"times": PackedFloat32Array(0)
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath(".:modulate")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_ioc4f"]
|
||||||
|
resource_name = "spawn"
|
||||||
|
step = 0.1
|
||||||
|
tracks/0/type = "bezier"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".:scale:x")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||||
|
"points": PackedFloat32Array(0.5, -0.16111112, 0, 0, 0, 1.25, -0.25, 0, 0.25, 0, 0.5, -0.16111112, 0, 0, 0),
|
||||||
|
"times": PackedFloat32Array(0, 0.5, 1)
|
||||||
|
}
|
||||||
|
tracks/1/type = "bezier"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath(".:scale:y")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"handle_modes": PackedInt32Array(0, 0, 0),
|
||||||
|
"points": PackedFloat32Array(0.5, -0.16111112, 0, 0, 0, 1.25, -0.25, 0, 0.25, 0, 0.5, -0.16111112, 0, 0, 0),
|
||||||
|
"times": PackedFloat32Array(0, 0.5, 1)
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath(".:modulate")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.3, 0.7, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_t6dk8"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_glt8o"),
|
||||||
|
&"spawn": SubResource("Animation_ioc4f")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_r4tbf"]
|
||||||
|
_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_3757w"]
|
||||||
|
curve = SubResource("Curve_r4tbf")
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_epcdw"]
|
||||||
|
colors = PackedColorArray(0, 1, 0, 1, 1, 1, 1, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_ioc4f"]
|
||||||
|
gradient = SubResource("Gradient_epcdw")
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id="Curve_glt8o"]
|
||||||
|
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.7), 0.0, 0.0, 0, 0]
|
||||||
|
point_count = 2
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id="CurveTexture_t6dk8"]
|
||||||
|
curve = SubResource("Curve_glt8o")
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_aqt0q"]
|
||||||
|
particle_flag_disable_z = true
|
||||||
|
emission_shape = 3
|
||||||
|
emission_box_extents = Vector3(1, 80, 1)
|
||||||
|
angle_min = 1.0728835e-05
|
||||||
|
angle_max = 360.00003
|
||||||
|
direction = Vector3(-1, 0, 0)
|
||||||
|
spread = 15.0
|
||||||
|
initial_velocity_min = 100.0
|
||||||
|
initial_velocity_max = 400.0
|
||||||
|
gravity = Vector3(0, 0, 0)
|
||||||
|
scale_min = 5.0
|
||||||
|
scale_max = 10.0
|
||||||
|
scale_curve = SubResource("CurveTexture_t6dk8")
|
||||||
|
color_initial_ramp = SubResource("GradientTexture1D_ioc4f")
|
||||||
|
alpha_curve = SubResource("CurveTexture_3757w")
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_epcdw"]
|
||||||
|
size = Vector2(126, 388)
|
||||||
|
|
||||||
|
[node name="CursorKnife" instance=ExtResource("1_epcdw")]
|
||||||
|
script = ExtResource("2_glt8o")
|
||||||
|
speed = 5.0
|
||||||
|
penerate = 1.0
|
||||||
|
penerateDamageReduction = 0.25
|
||||||
|
autoSpawnAnimation = true
|
||||||
|
autoDestroyOnHitMap = false
|
||||||
|
autoPlayTexture = true
|
||||||
|
freeAfterSpawn = true
|
||||||
|
knockback = 10.0
|
||||||
|
|
||||||
|
[node name="texture" parent="." index="0"]
|
||||||
|
position = Vector2(-33, 4)
|
||||||
|
rotation = -0.6813664
|
||||||
|
scale = Vector2(1e-05, 1e-05)
|
||||||
|
sprite_frames = SubResource("SpriteFrames_vdv8l")
|
||||||
|
frame_progress = 1.0
|
||||||
|
|
||||||
|
[node name="animator" parent="texture" index="0"]
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_t6dk8")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="trail" type="GPUParticles2D" parent="texture" index="1"]
|
||||||
|
z_index = -1
|
||||||
|
position = Vector2(28.85057, 31.122555)
|
||||||
|
rotation = 0.6806784
|
||||||
|
amount = 100
|
||||||
|
preprocess = 1.0
|
||||||
|
process_material = SubResource("ParticleProcessMaterial_aqt0q")
|
||||||
|
|
||||||
|
[node name="hitbox" parent="." index="1"]
|
||||||
|
position = Vector2(45, 30)
|
||||||
|
shape = SubResource("RectangleShape2D_epcdw")
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[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" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
[ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"]
|
||||||
[ext_resource type="PackedScene" uid="uid://yq7vmijwvgx1" path="res://components/Weapons/AcidWind.tscn" id="3_0omr3"]
|
[ext_resource type="PackedScene" uid="uid://dgxvgsipl0gr1" path="res://components/Weapons/CursorKnife.tscn" id="3_0omr3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="4_0omr3"]
|
[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.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://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"]
|
||||||
@@ -88,18 +88,8 @@ radius = 61.204575
|
|||||||
|
|
||||||
[node name="Rooster" instance=ExtResource("1_e5pl8")]
|
[node name="Rooster" instance=ExtResource("1_e5pl8")]
|
||||||
script = ExtResource("2_oqdqd")
|
script = ExtResource("2_oqdqd")
|
||||||
defaultCooldownUnit = null
|
|
||||||
isBoss = null
|
|
||||||
displayName = "公鸡"
|
displayName = "公鸡"
|
||||||
sprintMultiplier = null
|
|
||||||
drops = null
|
|
||||||
dropCounts = null
|
|
||||||
appleCount = null
|
|
||||||
level = null
|
|
||||||
currentInvinsible = null
|
|
||||||
useStatic = true
|
useStatic = true
|
||||||
hurtAudioRate = null
|
|
||||||
health = null
|
|
||||||
metadata/_edit_horizontal_guides_ = [-188.0]
|
metadata/_edit_horizontal_guides_ = [-188.0]
|
||||||
metadata/_edit_vertical_guides_ = [71.0]
|
metadata/_edit_vertical_guides_ = [71.0]
|
||||||
|
|
||||||
@@ -112,8 +102,8 @@ process_material = SubResource("ParticleProcessMaterial_joj4g")
|
|||||||
[node name="weaponStore" parent="." index="2"]
|
[node name="weaponStore" parent="." index="2"]
|
||||||
process_mode = 4
|
process_mode = 4
|
||||||
|
|
||||||
[node name="AcidWind" parent="weaponStore" index="0" instance=ExtResource("3_0omr3")]
|
[node name="CursorKnife" parent="weaponStore" index="0" instance=ExtResource("3_0omr3")]
|
||||||
offset_bottom = 566.0
|
offset_bottom = 350.0
|
||||||
|
|
||||||
[node name="PurpleCrystal" parent="weaponStore" index="1" instance=ExtResource("4_0omr3")]
|
[node name="PurpleCrystal" parent="weaponStore" index="1" instance=ExtResource("4_0omr3")]
|
||||||
debugRebuild = false
|
debugRebuild = false
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
[gd_scene load_steps=5 format=3 uid="uid://uu0s26ehdr4h"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bykwevnv7keeh" path="res://components/Abstracts/FeedCardBase.tscn" id="1_cwqpr"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://ckr8tw7fsa7qx" path="res://resources/weapons/AcidWind.png" id="2_cq26m"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c2q4cf4ivu7o7" path="res://resources/feeds/apple.png" id="2_l1ph2"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dgxvgsipl0gr1" path="res://components/Weapons/CursorKnife.tscn" id="3_powvs"]
|
||||||
|
|
||||||
|
[node name="Applr" instance=ExtResource("1_cwqpr")]
|
||||||
|
avatarTexture = ExtResource("2_l1ph2")
|
||||||
|
displayName = "焦糖苹果"
|
||||||
|
quality = 2
|
||||||
|
topic = 8
|
||||||
|
fields = Array[int]([14])
|
||||||
|
fieldValues = Array[float]([0.01])
|
||||||
|
weapons = Array[PackedScene]([ExtResource("3_powvs")])
|
||||||
|
costs = Array[int]([0, 2])
|
||||||
|
costCounts = Array[int]([500, 1])
|
||||||
|
|
||||||
|
[node name="avatar" parent="container/info" index="0"]
|
||||||
|
texture = ExtResource("2_cq26m")
|
||||||
|
|
||||||
|
[node name="name" parent="container/info" index="1"]
|
||||||
|
displayName = "酸蚀风暴"
|
||||||
|
quality = 2
|
||||||
|
topic = 8
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
[gd_scene load_steps=5 format=3 uid="uid://dgxvgsipl0gr1"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://ckq2cq6m23hq3" path="res://components/Abstracts/WeaponCardBase.tscn" id="1_bri6r"]
|
||||||
|
[ext_resource type="Script" uid="uid://jyalew2bgcnk" path="res://scripts/Contents/Weapons/CursorKnife.gd" id="2_sn7uu"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://blnryfwabfo5v" path="res://resources/weapons/CursorKnife.png" id="3_mdipf"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://b3y226i1875iq" path="res://resources/sounds/effect/cursor.wav" id="4_vttri"]
|
||||||
|
|
||||||
|
[node name="CursorKnife" instance=ExtResource("1_bri6r")]
|
||||||
|
script = ExtResource("2_sn7uu")
|
||||||
|
avatarTexture = ExtResource("3_mdipf")
|
||||||
|
displayName = "光标刃轮"
|
||||||
|
typeTopic = 1
|
||||||
|
costBeachball = 350
|
||||||
|
store = {
|
||||||
|
"atk": 10,
|
||||||
|
"speed": 0.004
|
||||||
|
}
|
||||||
|
storeType = {
|
||||||
|
"atk": 1,
|
||||||
|
"speed": 2
|
||||||
|
}
|
||||||
|
descriptionTemplate = "造成$atk点伤害,攻击速度+$speed。"
|
||||||
|
cooldown = 300.0
|
||||||
|
debugRebuild = true
|
||||||
|
|
||||||
|
[node name="attack" parent="sounds" index="0"]
|
||||||
|
stream = ExtResource("4_vttri")
|
||||||
|
|
||||||
|
[node name="avatar" parent="container/info" index="0"]
|
||||||
|
texture = ExtResource("3_mdipf")
|
||||||
|
|
||||||
|
[node name="beachball" parent="container/info/infos" index="1"]
|
||||||
|
count = 350
|
||||||
|
|
||||||
|
[node name="name" parent="container/info" index="2"]
|
||||||
|
displayName = "光标刃轮"
|
||||||
|
typeTopic = 1
|
||||||
|
|
||||||
|
[node name="description" parent="container" index="2"]
|
||||||
|
text = "[center]造成[color=cyan]10[/color]点伤害,攻击速度+[color=cyan]0.4%[/color]。[/center]"
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://geax1diwtp48"
|
||||||
|
path="res://.godot/imported/knife1.png-0b91adeafa88b2b0aff470d5658c7509.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/bullets/cursor/knife1.png"
|
||||||
|
dest_files=["res://.godot/imported/knife1.png-0b91adeafa88b2b0aff470d5658c7509.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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: 29 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bso5w74dhk5kf"
|
||||||
|
path="res://.godot/imported/knife2.png-513a160123899eaf58316dbc03d64226.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/bullets/cursor/knife2.png"
|
||||||
|
dest_files=["res://.godot/imported/knife2.png-513a160123899eaf58316dbc03d64226.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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: 25 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://emue85ioh3xf"
|
||||||
|
path="res://.godot/imported/knife3.png-af6e7d878d4ea96fff7c3673bfc5c90f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/bullets/cursor/knife3.png"
|
||||||
|
dest_files=["res://.godot/imported/knife3.png-af6e7d878d4ea96fff7c3673bfc5c90f.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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: 20 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c5k0u4kjly3dq"
|
||||||
|
path="res://.godot/imported/knife4.png-fa9287dd57e900a79f97e8623f27afa4.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/bullets/cursor/knife4.png"
|
||||||
|
dest_files=["res://.godot/imported/knife4.png-fa9287dd57e900a79f97e8623f27afa4.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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: 175 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c2q4cf4ivu7o7"
|
||||||
|
path="res://.godot/imported/apple.png-2855ac6ec79b5c6e6266ca7d4bcbbc5e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/feeds/apple.png"
|
||||||
|
dest_files=["res://.godot/imported/apple.png-2855ac6ec79b5c6e6266ca7d4bcbbc5e.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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.
@@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://b3y226i1875iq"
|
||||||
|
path="res://.godot/imported/cursor.wav-621252c6cad81c118a19e5bc00f6ef62.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/sounds/effect/cursor.wav"
|
||||||
|
dest_files=["res://.godot/imported/cursor.wav-621252c6cad81c118a19e5bc00f6ef62.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=0
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=2
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://blnryfwabfo5v"
|
||||||
|
path="res://.godot/imported/CursorKnife.png-2dfd5e8e0a16b5dd3b92a8b02149823a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://resources/weapons/CursorKnife.png"
|
||||||
|
dest_files=["res://.godot/imported/CursorKnife.png-2dfd5e8e0a16b5dd3b92a8b02149823a.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
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/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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,5 @@
|
|||||||
|
extends BulletBase
|
||||||
|
class_name CursorKnifeBullet
|
||||||
|
|
||||||
|
func ai():
|
||||||
|
PresetBulletAI.forward(self , rotation)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://c337id4kvvj58
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
@tool
|
||||||
|
extends Weapon
|
||||||
|
|
||||||
|
func update(to: int, origin: Dictionary, _entity: EntityBase):
|
||||||
|
origin["atk"] += 2 * to * soulLevel
|
||||||
|
origin["speed"] += 0.004 * to * soulLevel
|
||||||
|
return origin
|
||||||
|
func attack(entity: EntityBase):
|
||||||
|
attackSpeed = 1 + readStore("speed")
|
||||||
|
for bullet in BulletBase.generate(
|
||||||
|
ComponentManager.getBullet("CursorKnife"),
|
||||||
|
entity,
|
||||||
|
get_global_mouse_position(),
|
||||||
|
entity.position.angle_to_point(get_global_mouse_position())
|
||||||
|
):
|
||||||
|
if bullet is CursorKnifeBullet:
|
||||||
|
bullet.baseDamage = readStore("atk")
|
||||||
|
return true
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://jyalew2bgcnk
|
||||||
@@ -16,6 +16,7 @@ class_name BulletBase
|
|||||||
@export var autoLoopAnimation: bool = false
|
@export var autoLoopAnimation: bool = false
|
||||||
@export var autoDestroyAnimation: bool = false
|
@export var autoDestroyAnimation: bool = false
|
||||||
@export var autoDestroyOnHitMap: bool = true
|
@export var autoDestroyOnHitMap: bool = true
|
||||||
|
@export var autoPlayTexture: bool = false
|
||||||
@export var freeAfterSpawn: bool = false
|
@export var freeAfterSpawn: bool = false
|
||||||
@export var knockback: float = 0 # 击退力,物理引擎单位
|
@export var knockback: float = 0 # 击退力,物理引擎单位
|
||||||
@export var recoil: float = 0 # 后坐力,物理引擎单位
|
@export var recoil: float = 0 # 后坐力,物理引擎单位
|
||||||
@@ -57,6 +58,8 @@ func _ready():
|
|||||||
tryDestroy()
|
tryDestroy()
|
||||||
if autoLoopAnimation:
|
if autoLoopAnimation:
|
||||||
animator.play("loop")
|
animator.play("loop")
|
||||||
|
if autoPlayTexture:
|
||||||
|
texture.play("default")
|
||||||
body_entered.connect(
|
body_entered.connect(
|
||||||
func(body):
|
func(body):
|
||||||
if body.is_in_group("map"):
|
if body.is_in_group("map"):
|
||||||
@@ -82,7 +85,7 @@ func _physics_process(_delta: float) -> void:
|
|||||||
[launcher])
|
[launcher])
|
||||||
if is_instance_valid(targetEntity):
|
if is_instance_valid(targetEntity):
|
||||||
PresetBulletAI.trace(
|
PresetBulletAI.trace(
|
||||||
self,
|
self ,
|
||||||
targetEntity.getTrackingAnchor(),
|
targetEntity.getTrackingAnchor(),
|
||||||
launcher.fields.get(FieldStore.Entity.BULLET_TRACE) / 10
|
launcher.fields.get(FieldStore.Entity.BULLET_TRACE) / 10
|
||||||
)
|
)
|
||||||
@@ -116,8 +119,8 @@ func determineCrit():
|
|||||||
return MathTool.rate(launcher.fields.get(FieldStore.Entity.CRIT_RATE) + GameRule.critRateInfluenceByLuckValue * launcher.fields[FieldStore.Entity.LUCK_VALUE])
|
return MathTool.rate(launcher.fields.get(FieldStore.Entity.CRIT_RATE) + GameRule.critRateInfluenceByLuckValue * launcher.fields[FieldStore.Entity.LUCK_VALUE])
|
||||||
func hitEntity(target: Node):
|
func hitEntity(target: Node):
|
||||||
var entity: EntityBase = EntityTool.fromHurtbox(target)
|
var entity: EntityBase = EntityTool.fromHurtbox(target)
|
||||||
if !BulletTool.canDamage(self, entity): return
|
if !BulletTool.canDamage(self , entity): return
|
||||||
var resultDamage = entity.bulletHit(self, determineCrit())
|
var resultDamage = entity.bulletHit(self , determineCrit())
|
||||||
succeedToHit(resultDamage, entity)
|
succeedToHit(resultDamage, entity)
|
||||||
if MathTool.rate(fullPenerate() - entity.fields[FieldStore.Entity.PENARATION_RESISTANCE]):
|
if MathTool.rate(fullPenerate() - entity.fields[FieldStore.Entity.PENARATION_RESISTANCE]):
|
||||||
baseDamage *= 1.0 - penerateDamageReduction
|
baseDamage *= 1.0 - penerateDamageReduction
|
||||||
@@ -127,7 +130,7 @@ func hitObstacle(target: Node):
|
|||||||
if target is ObstacleBase:
|
if target is ObstacleBase:
|
||||||
var obstacle = target as ObstacleBase
|
var obstacle = target as ObstacleBase
|
||||||
if is_instance_valid(obstacle.launcher):
|
if is_instance_valid(obstacle.launcher):
|
||||||
if not BulletTool.canDamage(self, obstacle.launcher): return
|
if not BulletTool.canDamage(self , obstacle.launcher): return
|
||||||
obstacle.takeDamage(calculateDamage(determineCrit()))
|
obstacle.takeDamage(calculateDamage(determineCrit()))
|
||||||
if MathTool.rate(fullPenerate() - obstacle.penerateResistance):
|
if MathTool.rate(fullPenerate() - obstacle.penerateResistance):
|
||||||
baseDamage *= 1.0 - penerateDamageReduction
|
baseDamage *= 1.0 - penerateDamageReduction
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class_name Weapon
|
|||||||
var cooldownTimer: CooldownTimer = null
|
var cooldownTimer: CooldownTimer = null
|
||||||
var originalStore: Dictionary = {}
|
var originalStore: Dictionary = {}
|
||||||
var chargedTime: float = 0
|
var chargedTime: float = 0
|
||||||
|
var attackSpeed: float = 1
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
cooldownTimer = CooldownTimer.new()
|
cooldownTimer = CooldownTimer.new()
|
||||||
@@ -71,7 +72,7 @@ func _ready():
|
|||||||
if get_parent():
|
if get_parent():
|
||||||
var myIndex = get_index()
|
var myIndex = get_index()
|
||||||
var leftIndex = max(myIndex - 1, 0)
|
var leftIndex = max(myIndex - 1, 0)
|
||||||
get_parent().move_child(self, leftIndex)
|
get_parent().move_child(self , leftIndex)
|
||||||
ArrayTool.swap(UIState.player.weapons, myIndex, leftIndex)
|
ArrayTool.swap(UIState.player.weapons, myIndex, leftIndex)
|
||||||
UIState.player.rebuildWeaponIcons()
|
UIState.player.rebuildWeaponIcons()
|
||||||
)
|
)
|
||||||
@@ -80,7 +81,7 @@ func _ready():
|
|||||||
if get_parent():
|
if get_parent():
|
||||||
var myIndex = get_index()
|
var myIndex = get_index()
|
||||||
var rightIndex = min(myIndex + 1, get_parent().get_child_count() - 1)
|
var rightIndex = min(myIndex + 1, get_parent().get_child_count() - 1)
|
||||||
get_parent().move_child(self, rightIndex)
|
get_parent().move_child(self , rightIndex)
|
||||||
ArrayTool.swap(UIState.player.weapons, myIndex, rightIndex)
|
ArrayTool.swap(UIState.player.weapons, myIndex, rightIndex)
|
||||||
UIState.player.rebuildWeaponIcons()
|
UIState.player.rebuildWeaponIcons()
|
||||||
)
|
)
|
||||||
@@ -167,7 +168,7 @@ func playSound(sound: String):
|
|||||||
await cloned.finished
|
await cloned.finished
|
||||||
cloned.queue_free()
|
cloned.queue_free()
|
||||||
func canAttackBy(entity: EntityBase):
|
func canAttackBy(entity: EntityBase):
|
||||||
cooldownTimer.speedScale = entity.fields.get(FieldStore.Entity.ATTACK_SPEED)
|
cooldownTimer.speedScale = entity.fields.get(FieldStore.Entity.ATTACK_SPEED) * attackSpeed
|
||||||
return cooldownTimer.isCooldowned() and entity.isEnergyEnough(needEnergy)
|
return cooldownTimer.isCooldowned() and entity.isEnergyEnough(needEnergy)
|
||||||
func tryAttack(entity: EntityBase):
|
func tryAttack(entity: EntityBase):
|
||||||
if canAttackBy(entity):
|
if canAttackBy(entity):
|
||||||
|
|||||||
Reference in New Issue
Block a user