37 lines
838 B
C#
37 lines
838 B
C#
using System.Linq;
|
|
using Fantasy;
|
|
using Fantasy.Platform.Net;
|
|
|
|
namespace NB.Common;
|
|
|
|
public static class SceneConfigHelper
|
|
{
|
|
public static SceneConfig GetConfigByRouteType(int routeType)
|
|
{
|
|
var sceneType = SceneType.Game;
|
|
if (routeType == RouteType.GameRoute)
|
|
{
|
|
sceneType = SceneType.Game;
|
|
}
|
|
else if (routeType == RouteType.SocialRoute)
|
|
{
|
|
sceneType = SceneType.Social;
|
|
}
|
|
else if (routeType == RouteType.GateRoute)
|
|
{
|
|
sceneType = SceneType.Gate;
|
|
}
|
|
|
|
return GetConfig(sceneType);
|
|
}
|
|
|
|
public static SceneConfig GetConfig(int sceneType)
|
|
{
|
|
|
|
var gameSceneConfigs = SceneConfigData.Instance.GetSceneBySceneType(sceneType);
|
|
|
|
return gameSceneConfigs.First();
|
|
}
|
|
|
|
|
|
} |