diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn index f832e19..2ea8416 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_N.tscn @@ -45,7 +45,6 @@ [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] material = SubResource("ShaderMaterial_t4ayq") sprite_frames = ExtResource("3_apluc") -animation = &"closeDoor" autoplay = "default" [node name="Collision" type="CollisionShape2D" parent="."] diff --git a/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn b/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn index b93954f..45cf14d 100644 --- a/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn +++ b/DungeonShooting_Godot/prefab/map/RoomDoor_S.tscn @@ -45,7 +45,6 @@ [node name="AnimatedSprite" type="AnimatedSprite2D" parent="."] material = SubResource("ShaderMaterial_t4ayq") sprite_frames = ExtResource("3_vbbxp") -animation = &"openDoor" autoplay = "default" [node name="Collision" type="CollisionShape2D" parent="."] diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index 98e060e..7d2d55d 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -573,29 +573,25 @@ case DoorDirection.E: door = ActivityObject.Create(ActivityObject.Ids.Id_other_door_e); door.Position = (doorInfo.OriginPosition + new Vector2(0.5f, 2)) * GameConfig.TileCellSize; - door.ZIndex = MapLayer.AutoTopLayer; break; case DoorDirection.W: door = ActivityObject.Create(ActivityObject.Ids.Id_other_door_w); door.Position = (doorInfo.OriginPosition + new Vector2(-0.5f, 2)) * GameConfig.TileCellSize; - door.ZIndex = MapLayer.AutoTopLayer; break; case DoorDirection.S: door = ActivityObject.Create(ActivityObject.Ids.Id_other_door_s); door.Position = (doorInfo.OriginPosition + new Vector2(2f, 1.5f)) * GameConfig.TileCellSize; - door.ZIndex = MapLayer.AutoTopLayer; break; case DoorDirection.N: door = ActivityObject.Create(ActivityObject.Ids.Id_other_door_n); door.Position = (doorInfo.OriginPosition + new Vector2(2f, -0.5f)) * GameConfig.TileCellSize; - door.ZIndex = MapLayer.AutoMiddleLayer; break; default: return; } doorInfo.Door = door; door.Init(doorInfo); - door.PutDown(RoomLayerEnum.NormalLayer, false); + door.PutDown(RoomLayerEnum.YSortLayer, false); } } diff --git a/DungeonShooting_Godot/src/game/room/RoomDoor.cs b/DungeonShooting_Godot/src/game/room/RoomDoor.cs index 28f9177..2ad08f7 100644 --- a/DungeonShooting_Godot/src/game/room/RoomDoor.cs +++ b/DungeonShooting_Godot/src/game/room/RoomDoor.cs @@ -82,7 +82,6 @@ switch (Direction) { case DoorDirection.E: - ZIndex = MapLayer.AutoTopLayer; if (_animatedDown != null) { _animatedDown.ZIndex = MapLayer.AutoTopLayer; @@ -90,7 +89,6 @@ break; case DoorDirection.W: - ZIndex = MapLayer.AutoTopLayer; if (_animatedDown != null) { _animatedDown.ZIndex = MapLayer.AutoTopLayer; @@ -98,10 +96,8 @@ break; case DoorDirection.S: - ZIndex = MapLayer.AutoTopLayer; break; case DoorDirection.N: - ZIndex = MapLayer.AutoMiddleLayer; break; } } @@ -125,7 +121,6 @@ switch (Direction) { case DoorDirection.E: - ZIndex = MapLayer.AutoMiddleLayer; if (_animatedDown != null) { _animatedDown.ZIndex = MapLayer.AutoTopLayer; @@ -133,7 +128,6 @@ break; case DoorDirection.W: - ZIndex = MapLayer.AutoMiddleLayer; if (_animatedDown != null) { _animatedDown.ZIndex = MapLayer.AutoTopLayer; @@ -141,10 +135,8 @@ break; case DoorDirection.S: - ZIndex = MapLayer.AutoTopLayer; break; case DoorDirection.N: - ZIndex = MapLayer.AutoMiddleLayer; break; } }