2024-04-06 18:15:42 +08:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using Cysharp.Threading.Tasks;
|
|
|
|
|
using Game.Room;
|
|
|
|
|
|
2024-04-11 16:44:25 +08:00
|
|
|
|
namespace Game
|
2024-04-06 18:15:42 +08:00
|
|
|
|
{
|
2024-04-11 16:44:25 +08:00
|
|
|
|
[Procedure(ProcedureType.EnterGameSceneProcedure)]
|
|
|
|
|
class EnterGameSceneProcedure : ProcedureBase
|
2024-04-06 18:15:42 +08:00
|
|
|
|
{
|
2024-04-11 16:44:25 +08:00
|
|
|
|
public override void OnEnter()
|
|
|
|
|
{
|
|
|
|
|
base.OnEnter();
|
2024-04-06 18:15:42 +08:00
|
|
|
|
|
2024-04-16 09:52:23 +08:00
|
|
|
|
var room = Game.roomManager.CreateRoom(RoomType.出生点, AssetConstPath.Assets_GameRes_Prefabs_Room_出生点);
|
|
|
|
|
Game.roomManager.CreateRoom(RoomType.伏龙阁, AssetConstPath.Assets_GameRes_Prefabs_Room_伏龙阁);
|
|
|
|
|
Game.roomManager.CreateRoom(RoomType.杂物室, AssetConstPath.Assets_GameRes_Prefabs_Room_杂物室);
|
|
|
|
|
Game.roomManager.CreateRoom(RoomType.训练堂, AssetConstPath.Assets_GameRes_Prefabs_Room_训练堂);
|
|
|
|
|
Game.roomManager.CreateRoom(RoomType.先祖大厅, AssetConstPath.Assets_GameRes_Prefabs_Room_先祖大厅);
|
|
|
|
|
Game.roomManager.CreateRoom(RoomType.圣龙残骸, AssetConstPath.Assets_GameRes_Prefabs_Room_圣龙残骸);
|
|
|
|
|
Game.roomManager.CreateRoom(RoomType.天池遗址, AssetConstPath.Assets_GameRes_Prefabs_Room_天池遗址);
|
|
|
|
|
Game.roomManager.CreateRoom(RoomType.沙慕龙阁, AssetConstPath.Assets_GameRes_Prefabs_Room_沙慕龙阁);
|
|
|
|
|
Game.roomManager.CreateRoom(RoomType.英雄圣殿, AssetConstPath.Assets_GameRes_Prefabs_Room_英雄圣殿);
|
2024-04-06 18:15:42 +08:00
|
|
|
|
|
2024-04-11 16:44:25 +08:00
|
|
|
|
var player = Game.playerManager.currentPlayer;
|
|
|
|
|
var joinPosition = room.roomInfo.GetJoinPosition();
|
2024-04-08 18:20:55 +08:00
|
|
|
|
// var wayPoints = Game.bfsManager.FindPath(joinPosition);
|
2024-04-06 18:15:42 +08:00
|
|
|
|
|
2024-04-11 16:44:25 +08:00
|
|
|
|
UniTask.Create(async () =>
|
|
|
|
|
{
|
|
|
|
|
await player.WaitMoveRoomAsync(room, new CancellationToken());
|
2024-04-08 18:20:55 +08:00
|
|
|
|
// await player.MoveAsync(wayPoints, new CancellationToken());
|
2024-04-06 18:15:42 +08:00
|
|
|
|
|
2024-04-11 16:44:25 +08:00
|
|
|
|
Game.procedureManager.ChangeProcedure(ProcedureType.GameSceneLogicProcedure);
|
|
|
|
|
});
|
|
|
|
|
}
|
2024-04-06 18:15:42 +08:00
|
|
|
|
|
2024-04-11 16:44:25 +08:00
|
|
|
|
public override void OnLeave()
|
|
|
|
|
{
|
|
|
|
|
base.OnLeave();
|
|
|
|
|
}
|
2024-04-06 18:15:42 +08:00
|
|
|
|
}
|
|
|
|
|
}
|