解决模板房间有时按ctrl+s不会触发保存的问题

This commit is contained in:
小李xl 2023-03-29 01:06:19 +08:00
parent e2c95241b1
commit 2ae188c579
5 changed files with 79 additions and 74 deletions

View File

@ -195,7 +195,7 @@ public float BounceSpeed { get; set; } = 0.75f;
/// </summary>
public bool EnableVerticalMotion { get; set; } = true;
```
垂直运动也提供了一些可供重的虚函数:
垂直运动也提供了一些可供重的虚函数:
```csharp
/// <summary>
/// 开始投抛该物体时调用

View File

@ -6,5 +6,6 @@
[node name="Room5" type="TileMap"]
tile_set = ExtResource("1_mx0vc")
format = 2
layer_0/tile_data = PackedInt32Array(0, 0, 8, 1, 0, 8, 65537, 0, 8, 65536, 0, 8, 131071, 0, 8, -65535, 0, 8, 131073, 0, 8, 131072, 0, 8, 196607, 0, 8, -65534, 0, 8, 65538, 0, 8, 2, 0, 8, 65539, 0, 8, 3, 0, 8, -65533, 0, 8, 4, 0, 8, 65540, 0, 8, -65532, 0, 8, 131076, 0, 8, 196609, 0, 8, 196608, 0, 8, 262143, 0, 8, 196612, 0, 8, 262148, 0, 8, 262147, 0, 8, 262146, 0, 8, 262145, 0, 8, 262144, 0, 8, 327679, 0, 8, 65541, 0, 8, 131077, 0, 8, 5, 0, 8, 65542, 0, 8, 131078, 0, 8, 65543, 0, 8, 131079, 0, 8, 7, 131072, 7, 196613, 0, 8, 262149, 0, 8, 327685, 0, 8, 327684, 0, 8, 327683, 0, 8, 262150, 0, 8, 196614, 0, 8, 262151, 0, 8, 196615, 0, 8, 327682, 0, 8, 327681, 0, 8, 327680, 0, 8, 131074, 65536, 2, 196610, 65536, 7, 196611, 196608, 7, 131075, 196608, 2, 196606, 0, 8, 131070, 0, 8, 65534, 131072, 7, 262142, 0, 8, 393218, 0, 8, 393217, 0, 8, 393219, 0, 8, 393220, 0, 8, 393222, 851968, 2, 327678, 0, 8, 393214, 131072, 2, 196605, 196608, 3, 131069, 196608, 3, 65533, 196608, 4, 262141, 196608, 3, 327677, 196608, 3, 393213, 720896, 2, -131071, 0, 8, -131070, 0, 8, -131069, 0, 8, -131068, 0, 8, 65544, 65536, 3, 131080, 65536, 3, 8, 65536, 4, 196616, 65536, 3, 262152, 65536, 3, 327688, 851968, 2, 458756, 0, 8, 458755, 0, 8, 458754, 0, 8, 458753, 0, 8, -196607, 131072, 7, -196606, 131072, 7, -196605, 131072, 7, -196604, 131072, 7, -196603, 65536, 4, 524289, 131072, 2, 524290, 131072, 2, 524291, 131072, 2, 524292, 131072, 2, 524293, 851968, 2, 65535, 196608, 7, -1, 196608, 4, -65536, 196608, 7, -131072, 196608, 3, -196608, 196608, 4, -131067, 65536, 3, -65531, 65536, 7, 6, 65536, 7, -65530, 65536, 4, 393221, 65536, 2, 458757, 65536, 3, 393216, 196608, 2, 458751, 720896, 2, 393215, 196608, 2, 524288, 720896, 2, 458752, 196608, 3, 327686, 65536, 2, 327687, 131072, 2)
layer_0/tile_data = PackedInt32Array(65533, 0, 8, 131069, 0, 8, 196605, 0, 8, 262141, 0, 8, 327677, 131072, 2, 65534, 0, 8, 131070, 0, 8, 196606, 0, 8, 262142, 0, 8, 327678, 196608, 2, 393214, 720896, 2, -1, 0, 8, 65535, 0, 8, 131071, 0, 8, 196607, 0, 8, 262143, 0, 8, 327679, 0, 8, 393215, 196608, 2, 458751, 196608, 3, -196608, 0, 8, -131072, 0, 8, -65536, 0, 8, 0, 0, 8, 65536, 0, 8, 131072, 0, 8, 196608, 0, 8, 262144, 0, 8, 327680, 0, 8, 393216, 0, 8, 458752, 131072, 2, -196607, 0, 8, -131071, 0, 8, -65535, 0, 8, 1, 0, 8, 65537, 65536, 2, 131073, 65536, 7, 196609, 0, 8, 262145, 0, 8, 327681, 0, 8, 393217, 0, 8, 458753, 131072, 2, -196606, 0, 8, -131070, 0, 8, -65534, 0, 8, 2, 0, 8, 65538, 196608, 2, 131074, 196608, 7, 196610, 0, 8, 262146, 0, 8, 327682, 0, 8, 393218, 0, 8, 458754, 131072, 2, -196605, 0, 8, -131069, 0, 8, -65533, 0, 8, 3, 0, 8, 65539, 0, 8, 131075, 0, 8, 196611, 0, 8, 262147, 0, 8, 327683, 0, 8, 393219, 0, 8, 458755, 131072, 2, -196604, 65536, 3, -131068, 65536, 7, -65532, 0, 8, 4, 0, 8, 65540, 0, 8, 131076, 0, 8, 196612, 0, 8, 262148, 0, 8, 327684, 65536, 2, 393220, 65536, 3, 458756, 851968, 2, -131067, 65536, 4, -65531, 65536, 7, 5, 0, 8, 65541, 0, 8, 131077, 0, 8, 196613, 0, 8, 262149, 65536, 2, 327685, 851968, 2, -65530, 131072, 7, 6, 0, 8, 65542, 0, 8, 131078, 0, 8, 196614, 0, 8, 262150, 131072, 2, 7, 65536, 3, 65543, 65536, 3, 131079, 65536, 3, 196615, 65536, 3, 262151, 851968, 2, -4, 196608, 4, 65532, 196608, 3, 131068, 196608, 3, 196604, 196608, 3, 262140, 196608, 3, 327676, 720896, 2, -3, 131072, 7, -65538, 196608, 4, -2, 196608, 7, -196609, 196608, 4, -131073, 196608, 3, -65537, 196608, 7, 524287, 720896, 2, -262144, 131072, 7, -262143, 131072, 7, -262142, 131072, 7, -262141, 131072, 7, -262140, 65536, 4, -65529, 65536, 4)
script = ExtResource("dungeonRoomTemplate")
EnableEdit = true

View File

@ -1,7 +1,7 @@
{
"Position": {
"X": -3,
"Y": -3
"X": -4,
"Y": -4
},
"Size": {
"X": 12,
@ -9,12 +9,12 @@
},
"DoorAreaInfos": [
{
"Direction": 3,
"Direction": 0,
"Start": 64,
"End": 128
},
{
"Direction": 0,
"Direction": 3,
"Start": 64,
"End": 128
},
@ -34,84 +34,84 @@
"Type": 0,
"Points": [
{
"X": 24,
"Y": -24
"X": 8,
"Y": -40
},
{
"X": 56,
"Y": -40
},
{
"X": 56,
"Y": -8
},
{
"X": 72,
"Y": -24
"Y": -8
},
{
"X": 72,
"Y": 8
},
{
"X": 88,
"X": 104,
"Y": 8
},
{
"X": 88,
"Y": 24
},
{
"X": 120,
"Y": 24
},
{
"X": 120,
"Y": 72
},
{
"X": 88,
"Y": 72
},
{
"X": 88,
"Y": 88
"X": 104,
"Y": 56
},
{
"X": 72,
"Y": 88
"Y": 56
},
{
"X": 72,
"Y": 120
"Y": 72
},
{
"X": 24,
"Y": 120
"X": 56,
"Y": 72
},
{
"X": 24,
"Y": 88
"X": 56,
"Y": 104
},
{
"X": 8,
"Y": 88
"Y": 104
},
{
"X": 8,
"Y": 72
},
{
"X": -24,
"X": -8,
"Y": 72
},
{
"X": -24,
"Y": 24
"X": -8,
"Y": 56
},
{
"X": 8,
"Y": 24
"X": -40,
"Y": 56
},
{
"X": 8,
"X": -40,
"Y": 8
},
{
"X": 24,
"X": -8,
"Y": 8
},
{
"X": -8,
"Y": -8
},
{
"X": 8,
"Y": -8
}
]
},
@ -119,20 +119,20 @@
"Type": 1,
"Points": [
{
"X": 24,
"Y": 24
"X": 8,
"Y": 8
},
{
"X": 72,
"Y": 24
"X": 56,
"Y": 8
},
{
"X": 72,
"Y": 72
"X": 56,
"Y": 56
},
{
"X": 24,
"Y": 72
"X": 8,
"Y": 56
}
]
}

View File

@ -352,7 +352,7 @@ bg_color = Color(0.260588, 0.156863, 0.724706, 0.8)
[sub_resource type="ImageTexture" id="58"]
[sub_resource type="Image" id="Image_mhbc0"]
[sub_resource type="Image" id="Image_sqj6k"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -362,7 +362,7 @@ data = {
}
[sub_resource type="ImageTexture" id="60"]
image = SubResource("Image_mhbc0")
image = SubResource("Image_sqj6k")
[sub_resource type="StyleBoxTexture" id="61"]
content_margin_left = 2.0
@ -372,7 +372,7 @@ content_margin_bottom = 2.0
texture = SubResource("60")
region_rect = Rect2(0, 0, 12, 12)
[sub_resource type="Image" id="Image_qiuwg"]
[sub_resource type="Image" id="Image_svxsj"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -382,7 +382,7 @@ data = {
}
[sub_resource type="ImageTexture" id="63"]
image = SubResource("Image_qiuwg")
image = SubResource("Image_svxsj")
[sub_resource type="StyleBoxTexture" id="64"]
content_margin_left = 2.0
@ -392,7 +392,7 @@ content_margin_bottom = 2.0
texture = SubResource("63")
region_rect = Rect2(0, 0, 12, 12)
[sub_resource type="Image" id="Image_lpwou"]
[sub_resource type="Image" id="Image_6o6xj"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -402,7 +402,7 @@ data = {
}
[sub_resource type="ImageTexture" id="66"]
image = SubResource("Image_lpwou")
image = SubResource("Image_6o6xj")
[sub_resource type="StyleBoxTexture" id="67"]
content_margin_left = 2.0
@ -412,7 +412,7 @@ content_margin_bottom = 2.0
texture = SubResource("66")
region_rect = Rect2(0, 0, 12, 12)
[sub_resource type="Image" id="Image_blx4f"]
[sub_resource type="Image" id="Image_lk8k8"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -422,7 +422,7 @@ data = {
}
[sub_resource type="ImageTexture" id="69"]
image = SubResource("Image_blx4f")
image = SubResource("Image_lk8k8")
[sub_resource type="StyleBoxTexture" id="70"]
content_margin_left = 0.0
@ -446,7 +446,7 @@ content_margin_top = 4.0
content_margin_right = 4.0
content_margin_bottom = 4.0
[sub_resource type="Image" id="Image_ajngq"]
[sub_resource type="Image" id="Image_6foxs"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 228, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 228, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 17, 255, 255, 255, 186, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 191, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 186, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 189, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 77, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 77, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
"format": "RGBA8",
@ -456,7 +456,7 @@ data = {
}
[sub_resource type="ImageTexture" id="56"]
image = SubResource("Image_ajngq")
image = SubResource("Image_6foxs")
[sub_resource type="StyleBoxFlat" id="57"]
content_margin_left = 6.0

View File

@ -43,8 +43,7 @@ public partial class DungeonRoomTemplate : TileMap
private List<DoorAreaInfo> _doorConfigs;
private Rect2 _prevRect;
//是否能保存
private bool _canSave = false;
//是否能是否按下
private bool _clickSave = false;
private DungeonTile _dungeonTile;
@ -532,7 +531,7 @@ public partial class DungeonRoomTemplate : TileMap
}
}
OnDoorAreaChange();
//OnDoorAreaChange();
}
_dragHasCollision = false;
@ -553,12 +552,17 @@ public partial class DungeonRoomTemplate : TileMap
//按下 ctrl + s 保存
if (Input.IsKeyPressed(Key.Ctrl) && Input.IsKeyPressed(Key.S))
{
_clickSave = true;
if (_canSave)
if (!_clickSave)
{
_canSave = false;
TriggerSave();
}
_clickSave = true;
// if (_canSave)
// {
// _canSave = false;
// TriggerSave();
// }
}
else
{
@ -601,14 +605,14 @@ public partial class DungeonRoomTemplate : TileMap
}
_doorConfigs.Add(doorAreaInfo);
OnDoorAreaChange();
//OnDoorAreaChange();
}
//移除门
private void RemoveDoorArea(DoorAreaInfo doorAreaInfo)
{
_doorConfigs.Remove(doorAreaInfo);
OnDoorAreaChange();
//OnDoorAreaChange();
}
//检查门是否有碰撞
@ -741,14 +745,14 @@ public partial class DungeonRoomTemplate : TileMap
_canPut = false;
_hasActivePoint = false;
_activeArea = null;
OnDoorAreaChange();
//OnDoorAreaChange();
}
//区域数据修改
private void OnDoorAreaChange()
{
_canSave = true;
}
// //区域数据修改
// private void OnDoorAreaChange()
// {
// _canSave = true;
// }
//触发保存操作
private void TriggerSave()