新增相关国旗内容
This commit is contained in:
3
Assets/Scripts/Fishing2/Data/Helper.meta
Normal file
3
Assets/Scripts/Fishing2/Data/Helper.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e4cf32f6efb45fba177341b57a34003
|
||||
timeCreated: 1756450772
|
||||
3
Assets/Scripts/Fishing2/Data/Map.meta
Normal file
3
Assets/Scripts/Fishing2/Data/Map.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b9626380655a42298daf90e7333172ae
|
||||
timeCreated: 1756363915
|
||||
21
Assets/Scripts/Fishing2/Data/Map/Map.cs
Normal file
21
Assets/Scripts/Fishing2/Data/Map/Map.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NBC.Entitas;
|
||||
|
||||
namespace NBF.Fishing2
|
||||
{
|
||||
public class Map : Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 好友房地图
|
||||
/// </summary>
|
||||
public bool IsRoomMap;
|
||||
|
||||
/// <summary>
|
||||
/// 地图中的单位
|
||||
/// </summary>
|
||||
public Dictionary<long, Unit> Units = new Dictionary<long, Unit>();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Fishing2/Data/Map/Map.cs.meta
Normal file
3
Assets/Scripts/Fishing2/Data/Map/Map.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2acb8a2309ee4443a812939b0e02c18f
|
||||
timeCreated: 1756049289
|
||||
18
Assets/Scripts/Fishing2/Data/Map/Map2C_ChangeMapHandler.cs
Normal file
18
Assets/Scripts/Fishing2/Data/Map/Map2C_ChangeMapHandler.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using NBC;
|
||||
using NBC.Network;
|
||||
using NBC.Network.Interface;
|
||||
using NBF.Fishing2;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class Map2C_ChangeMapHandler : Message<Map2C_ChangeMap>
|
||||
{
|
||||
protected override async FTask Run(Session session, Map2C_ChangeMap message)
|
||||
{
|
||||
Log.Info($"收到地图切换消息=={message.MapId}");
|
||||
await MapHelper.LoadMap(message.MapId);
|
||||
|
||||
// await MapHelper.CreateRoomTest(message.MapId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9aca13592484450582e818dd128a23c2
|
||||
timeCreated: 1756301493
|
||||
11
Assets/Scripts/Fishing2/Data/Map/MapManageComponent.cs
Normal file
11
Assets/Scripts/Fishing2/Data/Map/MapManageComponent.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using NBC.Entitas;
|
||||
|
||||
namespace NBF.Fishing2
|
||||
{
|
||||
/// <summary>
|
||||
/// 地图管理组件
|
||||
/// </summary>
|
||||
public class MapManageComponent : Entity
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 226c840e80f840ae8a4ff54bc7c6645a
|
||||
timeCreated: 1756304063
|
||||
3
Assets/Scripts/Fishing2/Data/Map/Scene.meta
Normal file
3
Assets/Scripts/Fishing2/Data/Map/Scene.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f5c6349983b45b0bc48d4f30ef677ee
|
||||
timeCreated: 1756367958
|
||||
9
Assets/Scripts/Fishing2/Data/Map/Scene/MapScene.cs
Normal file
9
Assets/Scripts/Fishing2/Data/Map/Scene/MapScene.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using NBC.Entitas;
|
||||
|
||||
namespace NBF.Fishing2
|
||||
{
|
||||
public class MapScene : Entity
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Fishing2/Data/Map/Scene/MapScene.cs.meta
Normal file
3
Assets/Scripts/Fishing2/Data/Map/Scene/MapScene.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4087371950b45cb8eaa0933cfbd9bee
|
||||
timeCreated: 1756365024
|
||||
38
Assets/Scripts/Fishing2/Data/Map/Scene/SceneHelper.cs
Normal file
38
Assets/Scripts/Fishing2/Data/Map/Scene/SceneHelper.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using NBC;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace NBF.Fishing2
|
||||
{
|
||||
public static class SceneHelper
|
||||
{
|
||||
public static async FTask LoadScene(string sceneName)
|
||||
{
|
||||
try
|
||||
{
|
||||
App.Main.EventComponent.Publish(new SceneChangeStart());
|
||||
LoadingPanel.Show();
|
||||
var asyncOperation = SceneManager.LoadSceneAsync(sceneName);
|
||||
if (asyncOperation == null) throw new Exception($"Scene not found,name={sceneName}");
|
||||
while (true)
|
||||
{
|
||||
App.Main.EventComponent.Publish(new LoadingProgress()
|
||||
{
|
||||
Progress = asyncOperation.progress
|
||||
});
|
||||
LoadingPanel.SetProgress(asyncOperation.progress);
|
||||
// 等待0.5秒后执行下面的逻辑。
|
||||
await App.Main.TimerComponent.Net.WaitAsync(500);
|
||||
if (asyncOperation.isDone)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4a2e9c0ac6d4faabbec4bccdb7a2917
|
||||
timeCreated: 1756367987
|
||||
Reference in New Issue
Block a user