Fixed an issue where players did not trigger spawns and did not spawn when entering the room again.

修复玩家没有触发刷怪,再次进入房间不刷怪的问题。
This commit is contained in:
Cold-Mint 2024-10-17 11:04:43 +08:00
parent 359d465ac9
commit d36c909dec
Signed by: Cold-Mint
GPG Key ID: C5A9BF8A98E0CE99
5 changed files with 3 additions and 6 deletions

View File

@ -30,13 +30,8 @@ platform_floor_layers = 4294967042
platform_wall_layers = 128
script = ExtResource("1_1dlls")
_platformDetectionRayCast2DList = [NodePath("PlatformDetectionRayCast1"), NodePath("PlatformDetectionRayCast2"), NodePath("PlatformDetectionRayCast3")]
CharacterName = null
CanMutateAfterDeath = null
_initialHp = null
MaxHp = 32
CampId = "Default"
_indestructible = true
LootListId = null
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_bb8wt")

View File

@ -50,6 +50,7 @@ navigation_enabled = false
[node name="BackgroundDecoration" type="TileMapLayer" parent="TileMap"]
use_parent_material = true
tile_map_data = PackedByteArray("AAADAAQAAQAEAAYAAAAEAAQAAQAEAAYAAAAEAAUAAQAEAAYAAAADAAUAAQAEAAYAAAADAAMAAQAEAAYAAAAEAAMAAQAEAAYAAAAGAAMAAQAEAAYAAAAGAAQAAQAEAAYAAAAGAAUAAQAEAAYAAAAHAAUAAQAEAAYAAAAHAAQAAQAEAAYAAAAHAAMAAQAEAAYAAAAJAAMAAQAEAAYAAAAJAAQAAQAEAAYAAAAJAAUAAQAEAAYAAAAKAAUAAQAEAAYAAAAKAAQAAQAEAAYAAAAKAAMAAQAEAAYAAAAOAAUAAQABAAYAAAANAAUAAQAAAAYAAAA=")
tile_set = ExtResource("1_60tbt")
[node name="Ground" type="TileMapLayer" parent="TileMap"]

View File

@ -340,7 +340,7 @@ public class Room
_pointLight2D.Texture = AssetHolder.White25;
}
HideAllCharacterTemplate();
if (PlayerRoomVisitCount == 1 && _autoSpawn != null)
if (_hasSpawnedEntity && _autoSpawn != null)
{
NodeUtils.ForEachNode<ISpawnMarker>(_autoSpawn, marker =>
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -81,6 +81,7 @@ texture_region_size = Vector2i(32, 32)
7:5/0 = 0
3:3/0 = 0
1:4/0 = 0
4:6/0 = 0
[resource]
tile_size = Vector2i(32, 32)