Compare commits

...

9 Commits

Author SHA1 Message Date
eb25a005a5 敌人2子弹 2024-04-11 02:08:12 +08:00
402dfd92ce Merge remote-tracking branch 'gitee/develop' into develop
# Conflicts:
#	DungeonShooting_Godot/resource/sprite/role/enemy0002/enemy0001.png.import
#	DungeonShooting_Godot/resource/sprite/role/enemy0006/enemy0005_Icon.png.import
#	DungeonShooting_Godot/resource/sprite/role/enemy0006/enemy0006_Debris.png.import
#	DungeonShooting_Godot/resource/sprite/role/enemy0007/dle.png.import
#	DungeonShooting_Godot/resource/sprite/role/enemy0007/enemy0005_Icon.png.import
#	DungeonShooting_Godot/resource/sprite/role/enemy0007/enemy0006_Debris.png.import
#	DungeonShooting_Godot/resource/sprite/role/role0002/eat/eat.png.import
#	DungeonShooting_Godot/resource/sprite/role/role0002/idle/idle.png.import
#	DungeonShooting_Godot/resource/sprite/role/role0002/run/Sprite.png.import
2024-04-11 01:50:13 +08:00
575281a1fa 更新敌人效果 2024-04-11 01:49:40 +08:00
王晗智
9912301053 汉堡怪的子弹 2024-04-11 01:15:00 +08:00
f84219d421 Merge remote-tracking branch 'gitee/develop' into develop 2024-04-11 01:04:11 +08:00
207df94e43 敌人死亡效果更新 2024-04-11 01:04:04 +08:00
王晗智
444ab65185 优化,加入第二个角色 2024-04-11 00:42:08 +08:00
王晗智
78d84f0a66 Merge branch 'develop' of https://gitee.com/xlljc/DungeonShooting into develop 2024-04-10 15:08:32 +08:00
王晗智
b85b76214d 溅射 2024-04-10 15:08:24 +08:00
86 changed files with 1267 additions and 842 deletions

View File

@ -1,3 +1,5 @@
---
### 2024-4-

View File

@ -1,11 +1,10 @@
[gd_scene load_steps=12 format=3 uid="uid://cjgnw37tqiqh7"]
[ext_resource type="Script" path="res://src/game/activity/bullet/normal/BrushBullet.cs" id="1_13wdl"]
[ext_resource type="Script" path="res://src/game/activity/bullet/normal/RandomFrameBullet.cs" id="1_56g2p"]
[ext_resource type="Shader" path="res://resource/shader/Blend.gdshader" id="2_v0al6"]
[ext_resource type="SpriteFrames" uid="uid://jj8oh76pi53j" path="res://resource/spriteFrames/bullet/Bullet0005.tres" id="3_mmvqn"]
[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/common/Smoke.png" id="4_esjg6"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_v77gw"]
resource_local_to_scene = true
shader = ExtResource("2_v0al6")
@ -65,9 +64,7 @@ anim_offset_max = 1.0
collision_layer = 2
collision_mask = 0
platform_wall_layers = 512
script = ExtResource("1_13wdl")
BrushId = "0004"
EffectiveAltitude = 1.0
script = ExtResource("1_56g2p")
CollisionArea = NodePath("AnimatedSprite/CollisionArea")
CollisionShape2D = NodePath("AnimatedSprite/CollisionArea/CollisionShape2D")
Particles2D = [NodePath("AnimatedSprite/GPUParticles2D")]

View File

@ -3,7 +3,7 @@
[ext_resource type="Script" path="res://src/game/effects/Trail.cs" id="1_i68ib"]
[sub_resource type="Curve" id="Curve_fnvhf"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.5), 0.0, 0.0, 0, 0]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.25), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="Gradient" id="Gradient_cjh8g"]

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=3 uid="uid://m0s0k5nw7nbi"]
[ext_resource type="Material" uid="uid://c1chld6lkpgji" path="res://resource/material/SmokeParticleMaterial.tres" id="1_leomh"]
[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="2_c2t2e"]
[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/common/Smoke.png" id="2_c2t2e"]
[ext_resource type="Script" path="res://src/game/effects/AutoDestroyParticles.cs" id="3_5cpi6"]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_emuda"]
@ -11,7 +11,6 @@ particles_anim_v_frames = 1
particles_anim_loop = false
[node name="EnemyBloodEffect" type="GPUParticles2D" node_paths=PackedStringArray("Particles2D")]
modulate = Color(0.811765, 0.0980392, 0.0980392, 0.627451)
material = SubResource("CanvasItemMaterial_emuda")
emitting = false
amount = 10

View File

@ -0,0 +1,72 @@
[gd_scene load_steps=6 format=3 uid="uid://dayagrbplo04b"]
[ext_resource type="Texture2D" uid="uid://nbwtavmsjps6" path="res://resource/sprite/role/dle_liquid/enemy0001_Icon_liquid.png" id="1_ite3h"]
[ext_resource type="Script" path="res://src/game/effects/enemy/EnemyBlood0002.cs" id="2_uof3e"]
[sub_resource type="Animation" id="Animation_p16al"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:region_rect")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(2.08165e-12, 2.08165e-12, 20, 48)]
}
[sub_resource type="Animation" id="Animation_rir6a"]
resource_name = "default"
length = 0.2
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:region_rect")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Rect2(2.08165e-12, 2.08165e-12, 20, 48), Rect2(2.08165e-12, 2.08165e-12, 80, 48)]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.2),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"DoDestory"
}]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_f1xdh"]
_data = {
"RESET": SubResource("Animation_p16al"),
"default": SubResource("Animation_rir6a")
}
[node name="EnemyBlood0002" type="Sprite2D"]
modulate = Color(0.992157, 0.788235, 0.788235, 1)
texture = ExtResource("1_ite3h")
centered = false
offset = Vector2(-16, -24)
region_enabled = true
region_rect = Rect2(2.08165e-12, 2.08165e-12, 20, 48)
region_filter_clip_enabled = true
script = ExtResource("2_uof3e")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_f1xdh")
}
autoplay = "default"

View File

@ -5,7 +5,6 @@
[ext_resource type="Texture2D" uid="uid://cn64eauvwx1uj" path="res://resource/sprite/role/enemy0001/enemy0001_Debris.png" id="3_uinig"]
[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/common/Smoke.png" id="4_t55wd"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_s1mj2"]
resource_local_to_scene = true
shader = ExtResource("2_s7bee")
@ -178,7 +177,7 @@ gravity = Vector3(0, 0, 0)
scale_min = 0.4
scale_max = 1.5
scale_curve = SubResource("CurveTexture_rutlp")
color = Color(0.811765, 0.0980392, 0.0980392, 0.627451)
color = Color(0.992157, 0.788235, 0.788235, 0.627451)
color_ramp = SubResource("GradientTexture1D_orgu0")
anim_offset_max = 1.0

View File

@ -1,11 +1,10 @@
[gd_scene load_steps=19 format=3 uid="uid://nfx3lhkdhv6a"]
[ext_resource type="Script" path="res://src/game/effects/enemy/EnemyDead0002.cs" id="1_ghu6a"]
[ext_resource type="Script" path="res://src/game/activity/common/AutoFreezeObject.cs" id="1_pcn20"]
[ext_resource type="Shader" path="res://resource/shader/Blend.gdshader" id="2_q163q"]
[ext_resource type="Texture2D" uid="uid://x3tjqgdgp43n" path="res://resource/sprite/role/enemy0002/Enemy0002_dead.png" id="3_l0kbp"]
[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/common/Smoke.png" id="4_2wygu"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_s1mj2"]
resource_local_to_scene = true
shader = ExtResource("2_q163q")
@ -101,7 +100,7 @@ anim_offset_max = 1.0
[node name="Effect0002" type="CharacterBody2D" node_paths=PackedStringArray("ShadowSprite", "AnimatedSprite", "Collision")]
collision_layer = 128
script = ExtResource("1_ghu6a")
script = ExtResource("1_pcn20")
AnimationName = "dead"
AutoToGrey = true
ShadowSprite = NodePath("ShadowSprite")

View File

@ -30,7 +30,7 @@
],
"InletList": [
{
"ErrorType": 2,
"ErrorType": 0,
"Path": "resource/map/tileMaps/Test1/inlet/Start"
},
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1 +1 @@
{"Position":{"X":-10,"Y":-12},"Size":{"X":22,"Y":23},"DoorAreaInfos":[{"Direction":2,"Start":48,"End":176},{"Direction":3,"Start":0,"End":256},{"Direction":0,"Start":0,"End":208},{"Direction":1,"Start":0,"End":224}],"GroupName":"Test1","RoomType":2,"RoomName":"Start","Weight":100,"Remark":""}
{"Position":{"X":-9,"Y":-11},"Size":{"X":20,"Y":21},"DoorAreaInfos":[],"GroupName":"Test1","RoomType":2,"RoomName":"Start","Weight":100,"Remark":""}

View File

@ -1 +1 @@
{"NavigationVertices":[{"X":134,"Y":38},{"X":138,"Y":-122},{"X":138,"Y":138},{"X":134,"Y":90},{"X":134,"Y":-6},{"X":90,"Y":-6},{"X":86,"Y":-58},{"X":86,"Y":-102},{"X":-106,"Y":-122},{"X":-38,"Y":-102},{"X":74,"Y":10},{"X":74,"Y":54},{"X":58,"Y":90},{"X":-26,"Y":38},{"X":-26,"Y":-6},{"X":90,"Y":10},{"X":-38,"Y":-58},{"X":118,"Y":54},{"X":118,"Y":38},{"X":134,"Y":138},{"X":58,"Y":138},{"X":-58,"Y":138},{"X":-58,"Y":106},{"X":-86,"Y":38},{"X":-106,"Y":106},{"X":-86,"Y":-6}],"NavigationPolygon":[[0,1,2,3],[1,0,4],[1,4,5,6,7],[8,1,7,9],[10,11,12,13,14],[6,5,15,10,14,16],[17,18,0,3],[2,19,3],[17,3,12,11],[13,12,20,21,22],[23,13,22,24],[23,24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5,-3,1,6,1,-2,-1,1,5,0,-2,0,1,5,1],"CustomTop":[]}
{"NavigationVertices":[{"X":134,"Y":38},{"X":138,"Y":-122},{"X":138,"Y":138},{"X":134,"Y":90},{"X":134,"Y":-6},{"X":90,"Y":-6},{"X":86,"Y":-58},{"X":86,"Y":-102},{"X":-106,"Y":-122},{"X":-22,"Y":-102},{"X":74,"Y":10},{"X":74,"Y":54},{"X":58,"Y":90},{"X":-26,"Y":38},{"X":-26,"Y":-6},{"X":90,"Y":10},{"X":-22,"Y":-58},{"X":118,"Y":54},{"X":118,"Y":38},{"X":134,"Y":138},{"X":58,"Y":138},{"X":-58,"Y":138},{"X":-58,"Y":106},{"X":-86,"Y":38},{"X":-106,"Y":106},{"X":-86,"Y":-6}],"NavigationPolygon":[[0,1,2,3],[1,0,4],[1,4,5,6,7],[8,1,7,9],[10,11,12,13,14],[6,5,15,10,14,16],[17,18,0,3],[2,19,3],[17,3,12,11],[13,12,20,21,22],[23,13,22,24],[23,24,8,25],[25,8,9,16,14]],"Floor":[-3,-4,0,3,-2,-4,0,3,-2,-3,0,3,-3,-3,0,3,-7,-2,0,3,-7,-1,0,3,-7,0,0,3,-7,1,0,3,-7,2,0,3,-7,3,0,3,-7,4,0,3,-7,5,0,3,-6,-3,0,3,-6,-2,0,3,-6,-1,0,3,-6,0,0,3,-6,1,0,3,-6,2,0,3,-6,3,0,3,-6,4,0,3,-6,5,0,3,-5,-3,0,3,-5,-2,0,3,-5,2,0,3,-5,3,0,3,-5,4,0,3,-5,5,0,3,-4,-3,0,3,-4,-2,0,3,-4,2,0,3,-4,3,0,3,-4,4,0,3,-4,5,0,3,-3,-2,0,3,-3,2,0,3,-3,3,0,3,-3,4,0,3,-3,5,0,3,-2,-2,0,3,-2,-1,0,3,-2,0,0,3,-2,1,0,3,-2,2,0,3,-2,3,0,3,-2,4,0,3,-2,5,0,3,-4,6,0,3,-4,7,0,3,-3,6,0,3,-3,7,0,3,-2,6,0,3,-2,7,0,3,-1,3,0,3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6,0,3,-6,-5,0,3,-6,-4,0,3,-5,-8,0,3,-5,-7,0,3,-5,-6,0,3,-5,-5,0,3,-5,-4,0,3,-4,-8,0,3,-4,-7,0,3,-4,-6,0,3,-4,-5,0,3,-4,-4,0,3,6,-8,0,3,6,-7,0,3,6,-6,0,3,6,-5,0,3,6,-4,0,3,7,-8,0,3,7,-7,0,3,7,-6,0,3,7,-5,0,3,7,-4,0,3,8,-8,0,3,8,-7,0,3,8,-6,0,3,8,-5,0,3,8,-4,0,3,-2,-6,0,3,-2,-7,0,3,-2,-5,0,3],"CustomFloor1":[-4,2,1,7,14,-3,3,1,8,15,-4,3,1,7,15,-5,3,1,6,15,6,4,1,8,15,5,4,1,7,15,-5,2,1,6,14,4,3,1,6,14,4,4,1,6,15,6,3,1,8,14,5,3,1,7,14,-3,2,1,8,14],"CustomFloor2":[],"CustomFloor3":[],"CustomMiddle1":[-3,4,1,10,5,-3,5,1,10,6,2,4,1,10,5,2,5,1,10,6],"CustomMiddle2":[5,-4,1,6,0,5,-3,1,6,1,-2,-1,1,5,0,-2,0,1,5,1],"CustomTop":[]}

View File

@ -1 +1 @@
[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[{"Position":{"X":-81,"Y":25},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":31,"Y":32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0004","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0003","CurrAmmon":"12","ResidueAmmo":"12"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":-54,"Y":20},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":5.551115E-14}]}]]}]
[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[{"Position":{"X":-81,"Y":25},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":31,"Y":32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0004","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0003","CurrAmmon":"12","ResidueAmmo":"12"},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":-54,"Y":20},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":5.551115E-14}]},{"Position":{"X":81,"Y":-1},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0002","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":5.551115E-14}]}]]}]

View File

@ -17,5 +17,6 @@ gravity = Vector3(0, 0, 0)
scale_min = 0.8
scale_max = 0.8
scale_curve = ExtResource("1_yr5l8")
color = Color(0.992157, 0.788235, 0.788235, 0.627451)
color_ramp = SubResource("GradientTexture1D_4mhw0")
anim_offset_max = 1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 B

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 B

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bj7431s6081pt"
path="res://.godot/imported/enemy0001.png-bd4a7798d07cd5f254c33ccbfead77f4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/enemy0002/enemy0001.png"
dest_files=["res://.godot/imported/enemy0001.png-bd4a7798d07cd5f254c33ccbfead77f4.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.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bwtmntgepkiee"
path="res://.godot/imported/enemy0005_Icon.png-2897ecc50529bab5d0643e849e41cf6f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/enemy0006/enemy0005_Icon.png"
dest_files=["res://.godot/imported/enemy0005_Icon.png-2897ecc50529bab5d0643e849e41cf6f.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: 1.2 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dj03mufxwgfek"
path="res://.godot/imported/enemy0006_Debris.png-d1fbf79bad5aefa7d37040e3a6e8db7d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/enemy0006/enemy0006_Debris.png"
dest_files=["res://.godot/imported/enemy0006_Debris.png-d1fbf79bad5aefa7d37040e3a6e8db7d.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: 295 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://duyr3ic6hh3ek"
path="res://.godot/imported/dle.png-79145da0f375bf73578bd141d00d2ce8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/enemy0007/dle.png"
dest_files=["res://.godot/imported/dle.png-79145da0f375bf73578bd141d00d2ce8.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: 349 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cpd6jhjfg7cyk"
path="res://.godot/imported/enemy0005_Icon.png-0a336b66135db16c8e2f50cd4c955d4e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/enemy0007/enemy0005_Icon.png"
dest_files=["res://.godot/imported/enemy0005_Icon.png-0a336b66135db16c8e2f50cd4c955d4e.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: 400 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d0nfvywb17dup"
path="res://.godot/imported/enemy0006_Debris.png-8d79cda8586b6b07126be2733324473d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/enemy0007/enemy0006_Debris.png"
dest_files=["res://.godot/imported/enemy0006_Debris.png-8d79cda8586b6b07126be2733324473d.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.

Before

Width:  |  Height:  |  Size: 780 B

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 786 B

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 831 B

After

Width:  |  Height:  |  Size: 801 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 B

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 801 B

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 801 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 892 B

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 965 B

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 978 B

After

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 980 B

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 B

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 970 B

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cw702ostmv2am"
path="res://.godot/imported/Role0002_head.png-0fc4e9cd8c6dfbfc2886c02f9a6156a8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/role0002/Role0002_head.png"
dest_files=["res://.godot/imported/Role0002_head.png-0fc4e9cd8c6dfbfc2886c02f9a6156a8.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.4 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dwhk45k0s73mr"
path="res://.godot/imported/eat.png-e1ed219f030d4904026f5a118b10ffbc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/role0002/eat/eat.png"
dest_files=["res://.godot/imported/eat.png-e1ed219f030d4904026f5a118b10ffbc.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: 1.4 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://mrqq4rg53res"
path="res://.godot/imported/idle.png-9ab7c522bba3fc742b6cace13ceaedde.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/role0002/idle/idle.png"
dest_files=["res://.godot/imported/idle.png-9ab7c522bba3fc742b6cace13ceaedde.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: 1.4 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cwitqb7klfj3n"
path="res://.godot/imported/Sprite.png-bf7f6826c7373e1221a0a5e7a76364b1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resource/sprite/role/role0002/run/Sprite.png"
dest_files=["res://.godot/imported/Sprite.png-bf7f6826c7373e1221a0a5e7a76364b1.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

View File

@ -1,14 +1,39 @@
[gd_resource type="SpriteFrames" load_steps=2 format=3 uid="uid://jj8oh76pi53j"]
[gd_resource type="SpriteFrames" load_steps=6 format=3 uid="uid://jj8oh76pi53j"]
[ext_resource type="Texture2D" uid="uid://cwk72cqlmii5b" path="res://resource/sprite/bullet/normal/bullet0005.png" id="1_qmb1b"]
[sub_resource type="AtlasTexture" id="AtlasTexture_07dy3"]
atlas = ExtResource("1_qmb1b")
region = Rect2(0, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_th8do"]
atlas = ExtResource("1_qmb1b")
region = Rect2(8, 0, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_gp16h"]
atlas = ExtResource("1_qmb1b")
region = Rect2(0, 8, 8, 8)
[sub_resource type="AtlasTexture" id="AtlasTexture_e5slo"]
atlas = ExtResource("1_qmb1b")
region = Rect2(8, 8, 8, 8)
[resource]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_qmb1b")
"texture": SubResource("AtlasTexture_07dy3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_th8do")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gp16h")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e5slo")
}],
"loop": true,
"loop": false,
"name": &"default",
"speed": 5.0
"speed": 0.0
}]

View File

@ -37,12 +37,14 @@ public partial class ImageCanvas : Sprite2D, IDestroy
{
Centered = false;
Texture = _texture;
ZIndex = -1;
}
/// <summary>
/// 将指定纹理添加到预渲染队列中, 完成后会调用 onDrawingComplete 回调函数
/// </summary>
/// <param name="texture">需要渲染的纹理</param>
/// <param name="modulate">混色</param>
/// <param name="material">渲染材质, 不需要则传null</param>
/// <param name="x">离画布左上角x坐标</param>
/// <param name="y">离画布左上角y坐标</param>
@ -51,17 +53,18 @@ public partial class ImageCanvas : Sprite2D, IDestroy
/// <param name="centerY">旋转中心点y</param>
/// <param name="flipY">是否翻转y轴</param>
/// <param name="onDrawingComplete">绘制完成的回调函数</param>
public void DrawImageInCanvas(Texture2D texture, Material material, float x, float y, float angle, int centerX, int centerY, bool flipY, Action onDrawingComplete = null)
public void DrawImageInCanvas(Texture2D texture, Color modulate, Material material, float x, float y, float angle, int centerX, int centerY, bool flipY, Action onDrawingComplete = null)
{
DrawImageInCanvas(texture, material, x, y, angle, centerX, centerY, flipY, true, onDrawingComplete);
DrawImageInCanvas(texture,modulate, material, x, y, angle, centerX, centerY, flipY, true, onDrawingComplete);
}
private void DrawImageInCanvas(Texture2D texture, Material material, float x, float y, float angle, int centerX, int centerY, bool flipY, bool enableQueueCutting, Action onDrawingComplete)
private void DrawImageInCanvas(Texture2D texture, Color modulate, Material material, float x, float y, float angle, int centerX, int centerY, bool flipY, bool enableQueueCutting, Action onDrawingComplete)
{
var item = new ImageRenderData();
item.OnDrawingComplete = onDrawingComplete;
item.EnableQueueCutting = enableQueueCutting;
item.ImageCanvas = this;
item.SrcImage = texture.GetImage();
item.Modulate = modulate;
item.Material = material;
var width = item.SrcImage.GetWidth();
var height = item.SrcImage.GetHeight();
@ -164,7 +167,7 @@ public partial class ImageCanvas : Sprite2D, IDestroy
}
DrawImageInCanvas(
shadowSprite.Texture, shadowSprite.Material,
shadowSprite.Texture, shadowSprite.Modulate, shadowSprite.Material,
ax + activityObject.ShadowOffset.X, ay + activityObject.ShadowOffset.Y,
angle,
centerX, centerY, flipY,
@ -186,7 +189,7 @@ public partial class ImageCanvas : Sprite2D, IDestroy
}
//为了保证阴影在此之前渲染, 所以必须关闭插队渲染
DrawImageInCanvas(
texture, animatedSprite.Material,
texture, animatedSprite.Modulate, animatedSprite.Material,
ax, ay,
animatedSprite.GlobalRotationDegrees,
centerX, centerY, flipY,

View File

@ -323,6 +323,7 @@ public partial class ImageCanvas
}
}
renderSprite.Sprite.Modulate = item.Modulate;
renderSprite.Sprite.Material = item.Material;
renderSprite.Sprite.Offset = new Vector2(-item.CenterX, -item.CenterY);

View File

@ -14,6 +14,10 @@ public class ImageRenderData
/// </summary>
public Image SrcImage;
/// <summary>
/// 颜色
/// </summary>
public Color Modulate { get; set; }
/// <summary>
/// 渲染材质
/// </summary>
public Material Material;

View File

@ -69,7 +69,7 @@ public partial class BoomBullet : Bullet
var texture = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_explode_Explode_pit0001_png);
var tempPos = AffiliationArea.RoomInfo.ToCanvasPosition(pos);
AffiliationArea.RoomInfo.StaticImageCanvas.DrawImageInCanvas(
texture, null, tempPos.X, tempPos.Y, Utils.Random.RandomRangeInt(0, 360),
texture, Colors.White, null, tempPos.X, tempPos.Y, Utils.Random.RandomRangeInt(0, 360),
texture.GetWidth() / 2, texture.GetHeight() / 2, false
);
}

View File

@ -0,0 +1,18 @@
using Godot;
/// <summary>
/// 随机选择帧的子弹
/// </summary>
[Tool]
public partial class RandomFrameBullet : Bullet
{
public override void OnInit()
{
base.OnInit();
var animation = AnimatedSprite.Animation;
var frameCount = AnimatedSprite.SpriteFrames.GetFrameCount(animation);
AnimatedSprite.Frame = Utils.Random.RandomRangeInt(0, frameCount - 1);
}
}

View File

@ -312,6 +312,11 @@ public abstract partial class Role : ActivityObject
/// </summary>
public bool NoWeaponAttack { get; set; }
/// <summary>
/// 上一次受到伤害的角度, 弧度制
/// </summary>
public float PrevHitAngle { get; private set; }
//初始缩放
private Vector2 _startScale;
//当前可互动的物体
@ -871,6 +876,8 @@ public abstract partial class Role : ActivityObject
// blood.Rotation = angle;
// GameApplication.Instance.Node3D.GetRoot().AddChild(blood);
}
PrevHitAngle = angle;
OnHit(target, damage, angle, !flag);
if (target is Role targetRole && !targetRole.IsDestroyed)

View File

@ -103,18 +103,26 @@ public partial class Enemy : AiRole
blood.PlayEffect();
var realVelocity = GetRealVelocity();
var velocity = (realVelocity * 1.5f).LimitLength(80);
//创建敌人碎片
var count = Utils.Random.RandomRangeInt(3, 6);
for (var i = 0; i < count; i++)
{
var debris = Create(Ids.Id_enemy_dead0001);
debris.PutDown(effPos, RoomLayerEnum.NormalLayer);
debris.MoveController.AddForce(Velocity + realVelocity);
debris.MoveController.AddForce(velocity);
}
//派发敌人死亡信号
EventManager.EmitEvent(EventEnum.OnEnemyDie, this);
var obj = ResourceManager.LoadAndInstantiate<EnemyBlood0002>(ResourcePath.prefab_effect_enemy_EnemyBlood0002_tscn);
obj.AddToActivityRoot(RoomLayerEnum.NormalLayer);
obj.InitRoom(AffiliationArea.RoomInfo);
obj.Position = Position;
obj.Rotation = PrevHitAngle;
obj.ZIndex = AffiliationArea.RoomInfo.StaticImageCanvas.ZIndex;
base.OnDie();
}

View File

@ -8,7 +8,7 @@ using Godot;
[Tool]
public partial class NoWeaponEnemy : Enemy
{
private BrushImageData _brushData;
//private BrushImageData _brushData;
public override void OnInit()
{
@ -17,16 +17,16 @@ public partial class NoWeaponEnemy : Enemy
WeaponPack.SetCapacity(0);
AnimationPlayer.AnimationFinished += OnAnimationFinished;
_brushData = LiquidBrushManager.GetBrush("0002");
//_brushData = LiquidBrushManager.GetBrush("0002");
}
protected override void Process(float delta)
{
base.Process(delta);
//测试笔刷
DrawLiquid(_brushData);
}
// protected override void Process(float delta)
// {
// base.Process(delta);
//
// //测试笔刷
// //DrawLiquid(_brushData);
// }
public override void Attack()
{
@ -68,7 +68,7 @@ public partial class NoWeaponEnemy : Enemy
{
var realVelocity = GetRealVelocity();
var effPos = Position;
var debris = Create<EnemyDead0002>(Ids.Id_enemy_dead0002);
var debris = Create<AutoFreezeObject>(Ids.Id_enemy_dead0002);
debris.PutDown(effPos, RoomLayerEnum.NormalLayer);
debris.MoveController.AddForce(Velocity + realVelocity);
debris.SetForwardDirection(Face);

View File

@ -0,0 +1,22 @@
using Godot;
using System;
public partial class EnemyBlood0002 : Sprite2D
{
private RoomInfo _roomInfo;
public void InitRoom(RoomInfo roomInfo)
{
_roomInfo = roomInfo;
}
private void DoDestory()
{
var position = _roomInfo.ToCanvasPosition(GlobalPosition);
_roomInfo.StaticImageCanvas.DrawImageInCanvas(Texture, Modulate, null, position.X, position.Y, RotationDegrees,
(int)-Offset.X, (int)-Offset.Y, false, () =>
{
QueueFree();
});
}
}

View File

@ -42,10 +42,14 @@ public partial class EnemyDead0001 : ActivityObject
Freeze();
_runBrush = false;
}
else if (_runBrush && AffiliationArea != null && Altitude <= 1f) //测试笔刷
else if (_runBrush && AffiliationArea != null) //测试笔刷
{
var pos = AffiliationArea.RoomInfo.LiquidCanvas.ToLiquidCanvasPosition(Position);
AffiliationArea.RoomInfo.LiquidCanvas.DrawBrush(_brushData, PrevPosition, pos, 0);
if (Altitude <= 0.25f)
{
AffiliationArea.RoomInfo.LiquidCanvas.DrawBrush(_brushData, PrevPosition, pos, 0);
}
PrevPosition = pos;
}
}

View File

@ -1,29 +0,0 @@

using Godot;
[Tool]
public partial class EnemyDead0002 : AutoFreezeObject
{
private BrushImageData _brushData;
public override void OnInit()
{
base.OnInit();
_brushData = LiquidBrushManager.GetBrush("0002");
}
protected override void Process(float delta)
{
base.Process(delta);
//测试笔刷
if (FreezeCount == 0)
{
DrawLiquid(_brushData);
}
else
{
BrushPrevPosition = null;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ public partial class TestOptimizeSprite : Node2D
var centerX = Utils.Random.RandomRangeInt(0, texture.GetWidth());
var centerY = Utils.Random.RandomRangeInt(0, texture.GetHeight());
var angle = Utils.Random.RandomRangeInt(0, 360);
imageCanvas.DrawImageInCanvas(texture, null, x, y,
imageCanvas.DrawImageInCanvas(texture, Colors.White, null, x, y,
angle, centerX, centerY, Utils.Random.RandomBoolean(),
() =>
{