diff --git a/DungeonShooting_Godot/prefab/role/enemy/Enemy0002.tscn b/DungeonShooting_Godot/prefab/role/enemy/Enemy0002.tscn
index 6829646b..e983127e 100644
--- a/DungeonShooting_Godot/prefab/role/enemy/Enemy0002.tscn
+++ b/DungeonShooting_Godot/prefab/role/enemy/Enemy0002.tscn
@@ -9,7 +9,6 @@
[ext_resource type="Animation" uid="uid://cmje7jsgrhgmx" path="res://resource/animation/enemy/Enemy_query.res" id="7_h4cls"]
[ext_resource type="Animation" uid="uid://16rxpnsgj5tl" path="res://resource/animation/enemy/Enemy_notify.res" id="8_0688j"]
-
[sub_resource type="ShaderMaterial" id="ShaderMaterial_y5nia"]
resource_local_to_scene = true
shader = ExtResource("2_yunbp")
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json
index 93e81494..fd968753 100644
--- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json
+++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json
@@ -30,8 +30,12 @@
],
"InletList": [
{
- "ErrorType": 0,
+ "ErrorType": 2,
"Path": "resource/map/tileMaps/Test1/inlet/Start"
+ },
+ {
+ "ErrorType": 0,
+ "Path": "resource/map/tileMaps/Test1/inlet/Start2"
}
],
"OutletList": [
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preview.png
index 65b6fc22..95f53df4 100644
Binary files a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preview.png and b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preview.png differ
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/RoomInfo.json
index 60913458..f4b132a8 100644
--- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/RoomInfo.json
+++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/RoomInfo.json
@@ -1 +1 @@
-{"Position":{"X":-9,"Y":-11},"Size":{"X":20,"Y":21},"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":""}
\ No newline at end of file
+{"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":""}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/TileInfo.json
index 04f62db2..881c9827 100644
--- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/TileInfo.json
+++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/TileInfo.json
@@ -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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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":[]}
\ No newline at end of file
+{"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,8,25],[25,8,9,16],[14,25,16]],"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,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,3,-7,-8,0,3,-7,-7,0,3,-7,-6,0,3,-7,-5,0,3,-7,-4,0,3,-6,-8,0,3,-6,-7,0,3,-6,-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],"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":[]}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/Preinstall.json
new file mode 100644
index 00000000..763ac16c
--- /dev/null
+++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/Preinstall.json
@@ -0,0 +1 @@
+[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[{"Position":{"X":0,"Y":0},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":53,"Y":31},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0003","CurrAmmon":"12","ResidueAmmo":"12"},"Altitude":0,"VerticalSpeed":5.551115E-14}]}]]}]
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/Preview.png
new file mode 100644
index 00000000..556c95cc
Binary files /dev/null and b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/Preview.png differ
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/Preview.png.import
new file mode 100644
index 00000000..e1602382
--- /dev/null
+++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/Preview.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cpx43bg5na8f4"
+path="res://.godot/imported/Preview.png-a179680c55da0fe1cc56e9132032b6e3.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://resource/map/tileMaps/Test1/inlet/Start2/Preview.png"
+dest_files=["res://.godot/imported/Preview.png-a179680c55da0fe1cc56e9132032b6e3.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
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/RoomInfo.json
new file mode 100644
index 00000000..9c57f07f
--- /dev/null
+++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/RoomInfo.json
@@ -0,0 +1 @@
+{"Position":{"X":-5,"Y":-7},"Size":{"X":15,"Y":16},"DoorAreaInfos":[],"GroupName":"Test1","RoomType":2,"RoomName":"Start2","Weight":100,"Remark":""}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/TileInfo.json
new file mode 100644
index 00000000..ce7a5250
--- /dev/null
+++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start2/TileInfo.json
@@ -0,0 +1 @@
+{"NavigationVertices":[{"X":122,"Y":122},{"X":-42,"Y":122},{"X":-42,"Y":-58},{"X":122,"Y":-58}],"NavigationPolygon":[[0,1,2,3]],"Floor":[-3,-4,0,3,-3,-3,0,3,-3,-2,0,3,-3,-1,0,3,-3,0,0,3,-3,1,0,3,-3,2,0,3,-3,3,0,3,-3,4,0,3,-3,5,0,3,-3,6,0,3,-2,-4,0,3,-2,-3,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,-2,6,0,3,-1,-4,0,3,-1,-3,0,3,-1,-2,0,3,-1,-1,0,3,-1,0,0,3,-1,1,0,3,-1,2,0,3,-1,3,0,3,-1,4,0,3,-1,5,0,3,-1,6,0,3,0,-4,0,3,0,-3,0,3,0,-2,0,3,0,-1,0,3,0,0,0,3,0,1,0,3,0,2,0,3,0,3,0,3,0,4,0,3,0,5,0,3,0,6,0,3,1,-4,0,3,1,-3,0,3,1,-2,0,3,1,-1,0,3,1,0,0,3,1,1,0,3,1,2,0,3,1,3,0,3,1,4,0,3,1,5,0,3,1,6,0,3,2,-4,0,3,2,-3,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,2,6,0,3,3,-4,0,3,3,-3,0,3,3,-2,0,3,3,-1,0,3,3,0,0,3,3,1,0,3,3,2,0,3,3,3,0,3,3,4,0,3,3,5,0,3,3,6,0,3,4,-4,0,3,4,-3,0,3,4,-2,0,3,4,-1,0,3,4,0,0,3,4,1,0,3,4,2,0,3,4,3,0,3,4,4,0,3,4,5,0,3,4,6,0,3,5,-4,0,3,5,-3,0,3,5,-2,0,3,5,-1,0,3,5,0,0,3,5,1,0,3,5,2,0,3,5,3,0,3,5,4,0,3,5,5,0,3,5,6,0,3,6,-4,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,6,6,0,3,7,-4,0,3,7,-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,7,6,0,3],"CustomFloor1":[],"CustomFloor2":[],"CustomFloor3":[],"CustomMiddle1":[],"CustomMiddle2":[],"CustomTop":[]}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/shader/Sawtooth.gdshader b/DungeonShooting_Godot/resource/shader/Sawtooth.gdshader
index d428194e..09c8dd07 100644
--- a/DungeonShooting_Godot/resource/shader/Sawtooth.gdshader
+++ b/DungeonShooting_Godot/resource/shader/Sawtooth.gdshader
@@ -90,12 +90,11 @@ bool checkRT(float len, sampler2D tex, vec2 uv) {
void vertex() {
- //VERTEX = VERTEX * vec2(4.0);
+ VERTEX = VERTEX * vec2(4.0);
}
void fragment() {
-
- if (COLOR.a == 0.0) {
+ if (COLOR.a <= 0.0) {
int c = 0;
vec4 cf = vec4(0.0, 0.0, 0.0, 0.0);
vec4 cL = texture(TEXTURE, UV + vec2(-TEXTURE_PIXEL_SIZE.x, 0.0));
@@ -119,49 +118,61 @@ void fragment() {
cf += cb;
}
if (c >= 2) {
-
if (cb.a > 0.0 && cL.a > 0.0) {
if (checkLB(TEXTURE_PIXEL_SIZE.y / 4.0, TEXTURE, UV)) {
- //cf /= float(c);
+ cf /= float(c);
COLOR = cf;
}
}
if (ct.a > 0.0 && cL.a > 0.0) {
if (checkLT(TEXTURE_PIXEL_SIZE.y / 4.0, TEXTURE, UV)) {
- //cf /= float(c);
+ cf /= float(c);
COLOR = cf;
}
}
if (cb.a > 0.0 && cr.a > 0.0) {
if (checkRB(TEXTURE_PIXEL_SIZE.y / 4.0, TEXTURE, UV)) {
- //cf /= float(c);
+ cf /= float(c);
COLOR = cf;
}
}
if (ct.a > 0.0 && cr.a > 0.0) {
if (checkRT(TEXTURE_PIXEL_SIZE.y / 4.0, TEXTURE, UV)) {
- //cf /= float(c);
+ cf /= float(c);
COLOR = cf;
}
}
}
} else {
int c = 0;
- if (texture(TEXTURE, UV + vec2(-TEXTURE_PIXEL_SIZE.x, TEXTURE_PIXEL_SIZE.y)).a > 0.0) {
+ float tempV = TEXTURE_PIXEL_SIZE.x / 4.0;
+ vec4 cf = vec4(0.0, 0.0, 0.0, 0.0);
+ vec4 clt = texture(TEXTURE, UV + vec2(-tempV, tempV));
+ vec4 crt = texture(TEXTURE, UV + vec2(tempV, tempV));
+ vec4 clb = texture(TEXTURE, UV + vec2(-tempV, -tempV));
+ vec4 crb = texture(TEXTURE, UV + vec2(tempV, -tempV));
+
+ if (clt.a > 0.0) {
c++;
+ cf += clt;
}
- if (texture(TEXTURE, UV + vec2(TEXTURE_PIXEL_SIZE.x, TEXTURE_PIXEL_SIZE.y)).a > 0.0) {
+ if (crt.a > 0.0) {
c++;
+ cf += crt;
}
- if (texture(TEXTURE, UV + vec2(-TEXTURE_PIXEL_SIZE.x, -TEXTURE_PIXEL_SIZE.y)).a > 0.0) {
+ if (clb.a > 0.0) {
c++;
+ cf += clb;
}
- if (texture(TEXTURE, UV + vec2(TEXTURE_PIXEL_SIZE.x, -TEXTURE_PIXEL_SIZE.y)).a > 0.0) {
+ if (crb.a > 0.0) {
c++;
+ cf += crb;
}
- if (c <= 1) {
+ if (c > 0 && c < 2) {
COLOR = vec4(0.0, 0.0, 0.0, 0.0);
+ } else {
+ COLOR = cf / float(c);
}
}
}
diff --git a/DungeonShooting_Godot/resource/sprite/brush/Temp.png b/DungeonShooting_Godot/resource/sprite/brush/Temp.png
index c175e2d6..1c506135 100644
Binary files a/DungeonShooting_Godot/resource/sprite/brush/Temp.png and b/DungeonShooting_Godot/resource/sprite/brush/Temp.png differ
diff --git a/DungeonShooting_Godot/scene/test/TestCreateSector.tscn b/DungeonShooting_Godot/scene/test/TestCreateSector.tscn
index 74af5a91..255bb1e0 100644
--- a/DungeonShooting_Godot/scene/test/TestCreateSector.tscn
+++ b/DungeonShooting_Godot/scene/test/TestCreateSector.tscn
@@ -1,16 +1,91 @@
-[gd_scene load_steps=7 format=3 uid="uid://d4axmwaqk1f55"]
+[gd_scene load_steps=10 format=3 uid="uid://d4axmwaqk1f55"]
[ext_resource type="Script" path="res://src/test/TestCreateSector.cs" id="1_ieqp4"]
[ext_resource type="Texture2D" uid="uid://uhhfgdhpk7i4" path="res://icon.png" id="2_73jok"]
[ext_resource type="Texture2D" uid="uid://b6iklkty6p8sx" path="res://resource/sprite/brush/Temp.png" id="3_mchtg"]
[ext_resource type="Material" uid="uid://cca0ka64xmrrd" path="res://resource/material/Sawtooth.tres" id="3_p1gue"]
[ext_resource type="Texture2D" uid="uid://jnx4wfn5hu3u" path="res://resource/sprite/brush/Brush3.png" id="5_1h5h3"]
+[ext_resource type="Texture2D" uid="uid://betgai078na4v" path="res://resource/map/tileSet/TileSet1/Main.png" id="6_22ncj"]
+
+[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_on1ir"]
+texture = ExtResource("6_22ncj")
+0:0/0 = 0
+1:0/0 = 0
+2:0/0 = 0
+3:0/0 = 0
+4:0/0 = 0
+5:0/0 = 0
+6:0/0 = 0
+7:0/0 = 0
+8:0/0 = 0
+9:0/0 = 0
+10:0/0 = 0
+11:0/0 = 0
+0:1/0 = 0
+1:1/0 = 0
+2:1/0 = 0
+3:1/0 = 0
+4:1/0 = 0
+5:1/0 = 0
+6:1/0 = 0
+7:1/0 = 0
+8:1/0 = 0
+9:1/0 = 0
+11:1/0 = 0
+0:2/0 = 0
+1:2/0 = 0
+2:2/0 = 0
+3:2/0 = 0
+4:2/0 = 0
+5:2/0 = 0
+6:2/0 = 0
+7:2/0 = 0
+8:2/0 = 0
+9:2/0 = 0
+10:2/0 = 0
+11:2/0 = 0
+0:3/0 = 0
+1:3/0 = 0
+2:3/0 = 0
+3:3/0 = 0
+4:3/0 = 0
+5:3/0 = 0
+6:3/0 = 0
+7:3/0 = 0
+8:3/0 = 0
+9:3/0 = 0
+10:3/0 = 0
+11:3/0 = 0
+0:4/0 = 0
+1:4/0 = 0
+2:4/0 = 0
+3:4/0 = 0
+4:4/0 = 0
+5:4/0 = 0
+6:4/0 = 0
+7:4/0 = 0
+8:4/0 = 0
+9:4/0 = 0
+10:4/0 = 0
+0:5/0 = 0
+1:5/0 = 0
+2:5/0 = 0
+3:5/0 = 0
+4:5/0 = 0
+
+[sub_resource type="TileSet" id="TileSet_5gh5n"]
+sources/0 = SubResource("TileSetAtlasSource_on1ir")
[sub_resource type="CircleShape2D" id="CircleShape2D_42m3w"]
[node name="TestCreateSector" type="Node2D"]
script = ExtResource("1_ieqp4")
+[node name="TileMap" type="TileMap" parent="."]
+tile_set = SubResource("TileSet_5gh5n")
+format = 2
+layer_0/tile_data = PackedInt32Array(-65535, 0, 4, 0, 0, 4, 65536, 0, 4, 131072, 0, 4, 131073, 0, 4, 131074, 0, 4, 65538, 0, 4, 2, 0, 4, 1, 0, 4, 65537, 0, 4, 196609, 0, 4, 196610, 0, 4, 65539, 0, 4, 3, 0, 4, 131075, 0, 4, 196611, 0, 4, 262147, 0, 4, 65540, 0, 4, 4, 0, 4, 131076, 0, 4, 196612, 0, 4, 262148, 0, 4, 262146, 0, 4, 262145, 0, 4, 196608, 0, 4, 262144, 0, 4)
+
[node name="Area2D" type="Area2D" parent="."]
position = Vector2(959, 505)
@@ -26,11 +101,11 @@ shape = SubResource("CircleShape2D_42m3w")
[node name="Sprite2D" type="Sprite2D" parent="."]
material = ExtResource("3_p1gue")
-position = Vector2(32, 25)
+position = Vector2(5, -19)
texture = ExtResource("3_mchtg")
centered = false
[node name="Sprite2D2" type="Sprite2D" parent="."]
-position = Vector2(31, 36)
+position = Vector2(32, 43)
texture = ExtResource("5_1h5h3")
centered = false
diff --git a/DungeonShooting_Godot/src/framework/common/Utils.cs b/DungeonShooting_Godot/src/framework/common/Utils.cs
index 416b7961..54f7ba1c 100644
--- a/DungeonShooting_Godot/src/framework/common/Utils.cs
+++ b/DungeonShooting_Godot/src/framework/common/Utils.cs
@@ -67,6 +67,17 @@ public static class Utils
return angle;
}
+
+ ///
+ /// 判断a和b是否在同一梯度下
+ ///
+ ///
+ ///
+ /// 梯度间距
+ public static bool IsSameGradient(float a, float b, float gradient)
+ {
+ return (int)(a / gradient) == (int)(b / gradient);
+ }
///
/// 根据步长吸附值
diff --git a/DungeonShooting_Godot/src/framework/map/liquid/LiquidCanvas.cs b/DungeonShooting_Godot/src/framework/map/liquid/LiquidCanvas.cs
index 1b1ab924..67007d23 100644
--- a/DungeonShooting_Godot/src/framework/map/liquid/LiquidCanvas.cs
+++ b/DungeonShooting_Godot/src/framework/map/liquid/LiquidCanvas.cs
@@ -318,6 +318,7 @@ public partial class LiquidCanvas : Sprite2D, IDestroy
}
else
{
+ var oldA = imagePixel.Color.A;
imagePixel.Color.A -= imagePixel.Material.WriteOffSpeed * (_runTime - imagePixel.TempTime);
if (imagePixel.Color.A <= 0) //完全透明了
@@ -328,7 +329,7 @@ public partial class LiquidCanvas : Sprite2D, IDestroy
imagePixel.IsUpdate = false;
return true;
}
- else
+ else if (!Utils.IsSameGradient(oldA, imagePixel.Color.A, GameConfig.LiquidGradient)) //同一渐变梯度下才会有颜色变化
{
_changeFlag = true;
_image.SetPixel(imagePixel.X, imagePixel.Y, imagePixel.Color);
diff --git a/DungeonShooting_Godot/src/game/GameConfig.cs b/DungeonShooting_Godot/src/game/GameConfig.cs
index 18743143..8a36f3c8 100644
--- a/DungeonShooting_Godot/src/game/GameConfig.cs
+++ b/DungeonShooting_Godot/src/game/GameConfig.cs
@@ -16,6 +16,11 @@ public static class GameConfig
// ----------------------- 常量 -----------------------
+
+ ///
+ /// 液体画布渐变梯度
+ ///
+ public const float LiquidGradient = 0.1f;
///
/// 连接房间的过道宽度
diff --git a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs
index b051ad67..0bc007ce 100644
--- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs
+++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs
@@ -255,7 +255,7 @@ public partial class Player : Role
}
//测试刷地
- //DrawLiquid(_brushData2);
+ DrawLiquid(_brushData2);
}
protected override void OnAffiliationChange(AffiliationArea prevArea)