mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(角色): 添加哈士奇角色及相关资源
添加哈士奇角色,包括角色脚本、贴图资源、子弹效果和音效 - 实现哈士奇的基础AI行为和攻击逻辑 - 添加专属子弹"吼叫声波"及其特效 - 更新Wave配置加入哈士奇角色 - 为猫角色添加中文显示名称 - 优化Ring着色器增加透明度参数
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://dr2gq0mfe30xx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_yfqj6"]
|
||||
[ext_resource type="Shader" uid="uid://cnc1n2042ntv5" path="res://shaders/Ring.gdshader" id="2_ddosv"]
|
||||
[ext_resource type="Script" uid="uid://brn88cqusk0q2" path="res://scripts/Contents/Bullets/DogCircle.gd" id="2_qyd4u"]
|
||||
[ext_resource type="Script" uid="uid://cgb01lelfg73p" path="res://scripts/Statemachine/ShaderStage.gd" id="3_qyd4u"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_qyd4u"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("texture:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("texture:material:shader_parameter/alpha")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [1.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_oinqg"]
|
||||
resource_name = "destroy"
|
||||
length = 0.5
|
||||
step = 0.1
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ynxlt"]
|
||||
resource_name = "loop"
|
||||
loop_mode = 1
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:rotation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 6.28319]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_kmogx"]
|
||||
resource_name = "spawn"
|
||||
step = 0.05
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("texture:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("texture:material:shader_parameter/alpha")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.25, 0.6, 1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 1.0, 1.0, 0.0]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qyd4u"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_qyd4u"),
|
||||
&"destroy": SubResource("Animation_oinqg"),
|
||||
&"loop": SubResource("Animation_ynxlt"),
|
||||
&"spawn": SubResource("Animation_kmogx")
|
||||
}
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qyd4u"]
|
||||
shader = ExtResource("2_ddosv")
|
||||
shader_parameter/inner = 0.7999999821184
|
||||
shader_parameter/outer = 0.999999977648
|
||||
shader_parameter/alpha = 1.0
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ddosv"]
|
||||
radius = 13.0
|
||||
height = 138.0
|
||||
|
||||
[node name="DogCircle" instance=ExtResource("1_yfqj6")]
|
||||
script = ExtResource("2_qyd4u")
|
||||
displayName = "吼叫声波"
|
||||
damage = 2.0
|
||||
autoSpawnAnimation = true
|
||||
freeAfterSpawn = true
|
||||
|
||||
[node name="animator" parent="texture" index="0"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_qyd4u")
|
||||
}
|
||||
|
||||
[node name="texture" type="Node2D" parent="texture" index="1"]
|
||||
modulate = Color(1, 1, 1, 0.08421052)
|
||||
material = SubResource("ShaderMaterial_qyd4u")
|
||||
script = ExtResource("3_qyd4u")
|
||||
size = Vector2(40, 150)
|
||||
color = Color(1, 1, 1, 0)
|
||||
metadata/_custom_type_script = "uid://cgb01lelfg73p"
|
||||
|
||||
[node name="hitbox" parent="." index="1"]
|
||||
shape = SubResource("CapsuleShape2D_ddosv")
|
||||
@@ -28,6 +28,7 @@ radius = 19.026299
|
||||
|
||||
[node name="Cat" instance=ExtResource("1_hw4g4")]
|
||||
script = ExtResource("2_uo67a")
|
||||
displayName = "猫"
|
||||
|
||||
[node name="hurt" parent="sounds" index="3"]
|
||||
stream = ExtResource("3_2o6vq")
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bb363wvwvs7m4"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_cbgnh"]
|
||||
[ext_resource type="Texture2D" uid="uid://cew1kecisufy4" path="res://resources/characters/dog/hsq.png" id="2_oospf"]
|
||||
[ext_resource type="Script" uid="uid://soehdxfbpmc0" path="res://scripts/Contents/Characters/Dog.gd" id="2_pb36u"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_pb36u"]
|
||||
animations = [{
|
||||
"frames": [],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [],
|
||||
"loop": true,
|
||||
"name": &"walk",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_tn3v8"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_oospf")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="Dog" instance=ExtResource("1_cbgnh")]
|
||||
script = ExtResource("2_pb36u")
|
||||
displayName = "哈士奇"
|
||||
|
||||
[node name="texture" parent="." index="3"]
|
||||
sprite_frames = SubResource("SpriteFrames_pb36u")
|
||||
|
||||
[node name="staticAnimation" parent="texture" index="1"]
|
||||
position = Vector2(0, -19.999998)
|
||||
scale = Vector2(0.35093215, 0.35093215)
|
||||
sprite_frames = SubResource("SpriteFrames_tn3v8")
|
||||
animation = &"idle"
|
||||
|
||||
[node name="normal" type="Node2D" parent="texture/weapons" index="0"]
|
||||
|
||||
[node name="statebar" parent="." index="4"]
|
||||
position = Vector2(0, -150)
|
||||
@@ -0,0 +1,38 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cg8fj1d62w5uk"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_tppsq"]
|
||||
[ext_resource type="Texture2D" uid="uid://cli8w23q0k1dl" path="res://resources/effects/feather.png" id="2_k2423"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_lwtk5"]
|
||||
_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_suj3b"]
|
||||
curve = SubResource("Curve_lwtk5")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_k2423"]
|
||||
_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_lwtk5"]
|
||||
curve = SubResource("Curve_k2423")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_kg7ml"]
|
||||
particle_flag_disable_z = true
|
||||
angle_min = 1.0728835e-05
|
||||
angle_max = 45.00001
|
||||
angle_curve = SubResource("CurveTexture_lwtk5")
|
||||
spread = 180.0
|
||||
initial_velocity_min = 20.0
|
||||
initial_velocity_max = 40.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
scale_min = 0.099999994
|
||||
scale_max = 0.14999999
|
||||
alpha_curve = SubResource("CurveTexture_suj3b")
|
||||
|
||||
[node name="FeatherFall" instance=ExtResource("1_tppsq")]
|
||||
|
||||
[node name="particles" parent="." index="1"]
|
||||
amount = 2
|
||||
texture = ExtResource("2_k2423")
|
||||
process_material = SubResource("ParticleProcessMaterial_kg7ml")
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 202 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cew1kecisufy4"
|
||||
path="res://.godot/imported/hsq.png-689f720c213325dc210155c8433beae7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/characters/dog/hsq.png"
|
||||
dest_files=["res://.godot/imported/hsq.png-689f720c213325dc210155c8433beae7.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: 98 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cli8w23q0k1dl"
|
||||
path="res://.godot/imported/feather.png-6a8128e0272462ccbbaac01011f5c97e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://resources/effects/feather.png"
|
||||
dest_files=["res://.godot/imported/feather.png-6a8128e0272462ccbbaac01011f5c97e.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 DogCircle
|
||||
|
||||
func ai():
|
||||
PresetBulletAI.forward(self, rotation)
|
||||
@@ -0,0 +1 @@
|
||||
uid://brn88cqusk0q2
|
||||
@@ -0,0 +1,19 @@
|
||||
extends EntityBase
|
||||
|
||||
func register():
|
||||
fields[FieldStore.Entity.MAX_HEALTH] = 120
|
||||
fields[FieldStore.Entity.MOVEMENT_SPEED] = 0.2
|
||||
fields[FieldStore.Entity.OFFSET_SHOOT] = 0
|
||||
attackCooldownMap[0] = 2000
|
||||
|
||||
func ai():
|
||||
PresetEntityAI.follow(self, currentFocusedBoss, 300)
|
||||
tryAttack(0)
|
||||
func attack(type):
|
||||
if type == 0:
|
||||
var weaponPos = findWeaponAnchor("normal")
|
||||
var angle = weaponPos.angle_to_point(currentFocusedBoss.position)
|
||||
for i in 3:
|
||||
BulletBase.generate(ComponentManager.getBullet("DogCircle"), self, weaponPos, angle)
|
||||
await TickTool.millseconds(100)
|
||||
return true
|
||||
@@ -0,0 +1 @@
|
||||
uid://soehdxfbpmc0
|
||||
@@ -24,8 +24,9 @@ func duplicate() -> Wave:
|
||||
|
||||
static var current: int = startWith(1)
|
||||
static var WAVE_NORMAL = [
|
||||
Wave.create("Hen", 1, 5, false, 0, INF, 1),
|
||||
Wave.create("Cat", 1, 5, false, 0, INF, 1),
|
||||
# Wave.create("Hen", 1, 5, false, 0, INF, 1),
|
||||
# Wave.create("Cat", 1, 5, false, 0, INF, 1),
|
||||
Wave.create("Dog", 1, 5, false, 0, INF, 1),
|
||||
Wave.create("Chick", 0, 0, true, 9, INF, 15),
|
||||
Wave.create("Bear", 0, 0, true, 19, INF, 10),
|
||||
Wave.create("KukeMC", 0, 0, true, 14, INF, 20),
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
shader_type canvas_item;
|
||||
uniform float inner:hint_range(0.0, 1.0, 0.01)=0.5;
|
||||
uniform float outer:hint_range(0.0, 1.0, 0.01)=0.75;
|
||||
uniform float alpha:hint_range(0.0, 1.0, 0.01)=1;
|
||||
void fragment() {
|
||||
vec2 center=vec2(0.5);
|
||||
float dist=distance(UV,center)*2.0;
|
||||
COLOR.a=float(inner<dist&&dist<outer);
|
||||
COLOR.a=float(inner<dist&&dist<outer)*alpha;
|
||||
}
|
||||
Reference in New Issue
Block a user