3 文件已复制
3个文件已删除
1 文件已重命名
4个文件已添加
119个文件已修改
| | |
| | | /// </summary>
|
| | | /// <param name="vBytes"></param>
|
| | | /// <returns></returns>
|
| | | public static GameNetPackBasic TransPack(GameNetSystem.SocketType socketType, ushort cmd, byte[] vBytes)
|
| | | public static GameNetPackBasic TransPack(ServerType socketType, ushort cmd, byte[] vBytes)
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | int length = vBytes.Length;
|
| | |
| | | WindowCenter.Instance.Open<DisconnectHintWin>();
|
| | | }
|
| | |
|
| | | if (StageManager.Instance.isServerPreparing)
|
| | | {
|
| | | return;
|
| | | if (!StageLoad.Instance.IsServerPrepareOk(ServerType.Main)) |
| | | { |
| | | return; |
| | | }
|
| | |
|
| | | timer2 += Time.deltaTime;
|
| | |
| | | Debug.LogFormat("启动耗时:{0}", timer);
|
| | | progressInfo = new ProgressInfo(m_CurrentStage, 1, 1f, 1f);
|
| | | this.enabled = false;
|
| | | StageManager.Instance.LoadLoginStage();
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = 1,
|
| | | toLineId = 0,
|
| | | needEmpty = false,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | None = 0,
|
| | | SDKInit = 1,
|
| | | AssetCopy = 2,
|
| | | AssetDecompress=3,
|
| | | AssetDecompress = 3,
|
| | | ClientVersion = 4,
|
| | | CheckAsset = 5,
|
| | | DownLoad = 6,
|
| | |
| | |
|
| | | public void UpdateData(H0102_tagCDBPlayer _serverInfo)
|
| | | {
|
| | | if (_serverInfo.socketType == GameNetSystem.SocketType.Main)
|
| | | if (_serverInfo.socketType == ServerType.Main)
|
| | | {
|
| | | AccID = _serverInfo.AccID;
|
| | | PlayerID = _serverInfo.PlayerID;
|
| | |
| | |
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | if (_serverInfo.socketType == GameNetSystem.SocketType.CrossSever)
|
| | | if (_serverInfo.socketType == ServerType.CrossSever)
|
| | | {
|
| | | HP = _serverInfo.HP;
|
| | | AttackMode = _serverInfo.AttackMode;
|
| | |
| | | PlayerDatas.Instance.hero.ActorInfo.familyID = Family;
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | if (_serverInfo.socketType == GameNetSystem.SocketType.CrossSever)
|
| | | if (_serverInfo.socketType == ServerType.CrossSever)
|
| | | {
|
| | | PlayerDatas.Instance.hero.ActorInfo.ResetHp((int)_serverInfo.HP);
|
| | | }
|
| | |
| | | Silver = serverInfo.Silver;
|
| | | SilverPaper = serverInfo.SilverPaper;
|
| | | MapID = serverInfo.MapID;
|
| | | if (serverInfo.socketType == GameNetSystem.SocketType.Main)
|
| | | if (serverInfo.socketType == ServerType.Main)
|
| | | {
|
| | | mainServerMapIdRecord = MapID;
|
| | | }
|
| | |
| | | {
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | if (vNetData.socketType == ServerType.Main)
|
| | | {
|
| | | if (vNetData.RefreshType[i].RefreshType == (int)PlayerDataRefresh.HP
|
| | | || vNetData.RefreshType[i].RefreshType == (int)PlayerDataRefresh.MaxHP
|
| | |
| | | recordSp = baseData.treasurePotentialSp;
|
| | | }
|
| | |
|
| | | RefreshProperty(vNetData.socketType == GameNetSystem.SocketType.Main, (PlayerDataRefresh)vNetData.RefreshType, vNetData.Value);
|
| | | RefreshProperty(vNetData.socketType == ServerType.Main, (PlayerDataRefresh)vNetData.RefreshType, vNetData.Value);
|
| | |
|
| | | if (recordSp > 0 && spNewGetEvent != null)
|
| | | {
|
| | |
| | | if (GameNetSystem.Instance.crossServerConnected_Loigc)
|
| | | {
|
| | | GameNetSystem.Instance.crossServerConnected_Loigc = false;
|
| | | LoadingWin.targetMapResId = 1;
|
| | | WindowCenter.Instance.Open<LoadingWin>();
|
| | | GameNetSystem.Instance.DisconnectCrossServer();
|
| | |
|
| | | if (hero != null)
|
| | |
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | | baseData.MapID = baseData.mainServerMapIdRecord;
|
| | | baseData.dungeonLineId = 0;
|
| | | DTCA127_tagMCStartChangeMap.LineID = 0;
|
| | | ModelCenter.Instance.GetModel<DungeonModel>().ResetBufData();
|
| | | StageManager.Instance.Load<DungeonStage>(baseData.MapID, GameNetSystem.SocketType.CrossSever, true);
|
| | |
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = baseData.MapID,
|
| | | toLineId = 0,
|
| | | needEmpty = true,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.CrossSever,
|
| | | isClientLoadMap = true
|
| | | });
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | data.Job = vNetData.Job;
|
| | | data.JobRank = vNetData.JobRank;
|
| | | holdDataList.Add(data);
|
| | | if (StageManager.Instance.isLoading)
|
| | | if (StageLoad.Instance.isLoading)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | using UnityEngine;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class RealmModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize
|
| | | [XLua.LuaCallCSharp]
|
| | | public class RealmModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize
|
| | | {
|
| | | DungeonModel m_DungeonModel;
|
| | | DungeonModel dungeonModel
|
| | | {
|
| | | get
|
| | | {
|
| | | DungeonModel dungeonModel {
|
| | | get {
|
| | | return m_DungeonModel ?? (m_DungeonModel = ModelCenter.Instance.GetModel<DungeonModel>());
|
| | | }
|
| | | }
|
| | |
| | | ParseConfig();
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshInfo;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | NewBieCenter.Instance.guideCompletedEvent += GuideCompletedEvent;
|
| | | NewBieCenter.Instance.guideBeginEvent += GuideBeginEvent;
|
| | | BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent;
|
| | |
| | |
|
| | | public bool excuteRealmOpenGuide { get; private set; }
|
| | |
|
| | | public bool realmDungeonState
|
| | | {
|
| | | public bool realmDungeonState {
|
| | | get { return LocalSave.GetBool(StringUtility.Contact(PlayerDatas.Instance.PlayerId, "_RealmDungeon_Show")); }
|
| | | set { LocalSave.SetBool(StringUtility.Contact(PlayerDatas.Instance.PlayerId, "_RealmDungeon_Show"), value); }
|
| | | }
|
| | |
| | | IEnumerator Co_GuideComplete()
|
| | | {
|
| | | yield return null;
|
| | | if (StageManager.Instance.CurrentStage is DungeonStage)
|
| | | if (StageLoad.Instance.stageType == Stage.E_StageType.Dungeon)
|
| | | {
|
| | | if (PlayerDatas.Instance.realm.holdDataList.Count > 0
|
| | | && !WindowCenter.Instance.IsOpen<RealmUpHoldWin>() && !NewBieCenter.Instance.inGuiding
|
| | |
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.stageType == Stage.E_StageType.Dungeon))
|
| | | {
|
| | | cacheMapId = 0;
|
| | | excuteRealmOpenGuide = false;
|
| | |
| | |
|
| | | private void BossShowCompletedEvent()
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage is DungeonStage)
|
| | | if (StageLoad.Instance.stageType == Stage.E_StageType.Dungeon)
|
| | | {
|
| | | if (PlayerDatas.Instance.realm.holdDataList.Count > 0
|
| | | && !WindowCenter.Instance.IsOpen<RealmUpHoldWin>() && !NewBieCenter.Instance.inGuiding
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | public bool IsRealmHighest
|
| | | {
|
| | | get
|
| | | {
|
| | | public bool IsRealmHighest {
|
| | | get {
|
| | | var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel + 1);
|
| | | return config == null;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsDungeonState
|
| | | {
|
| | | get
|
| | | {
|
| | | public bool IsDungeonState {
|
| | | get {
|
| | | var _realmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | if (IsRealmHighest)
|
| | | {
|
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | namespace TableConfig |
| | | { |
| | | public partial class MapResourcesConfig : ConfigBase |
| | | { |
| | | static readonly Dictionary<int, int> mapResourcesIdDictionary = new Dictionary<int, int>(); |
| | | |
| | | public static MapResourcesConfig GetConfig(int dataMapId, int lineId) |
| | | { |
| | | ParseConfig(); |
| | | var key = dataMapId * 1000 + lineId; |
| | | if (!mapResourcesIdDictionary.ContainsKey(key)) |
| | | { |
| | | key = dataMapId * 1000 + 0; |
| | | } |
| | | |
| | | var id = mapResourcesIdDictionary[key]; |
| | | var config = Config.Instance.Get<MapResourcesConfig>(id); |
| | | return config; |
| | | } |
| | | |
| | | static bool isInited = false; |
| | | static void ParseConfig() |
| | | { |
| | | if (isInited) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var configs = Config.Instance.GetAllValues<MapResourcesConfig>(); |
| | | foreach (var config in configs) |
| | | { |
| | | var key = config.DataID * 1000 + config.LineID; |
| | | mapResourcesIdDictionary[key] = config.ID; |
| | | } |
| | | |
| | | isInited = true; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| File was renamed from Lua/Gen/StageManagerWrap.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1316663bef8bbed4f99dc61ee61da170 |
| | | timeCreated: 1548853305 |
| | | guid: dfb900c52f58d1a41a30b649088b15d3 |
| | | timeCreated: 1548676913 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | var vNetData = vNetPack as H0101_tagServerPrepared; |
| | | switch (vNetData.socketType) |
| | | { |
| | | case GameNetSystem.SocketType.Main: |
| | | case ServerType.Main: |
| | | ModelCenter.Instance.GetModel<LoginModel>().AccessLogin(vNetData); |
| | | break; |
| | | case GameNetSystem.SocketType.CrossSever: |
| | | case ServerType.CrossSever: |
| | | CrossServerLogin.Instance.AccessLogin(vNetData); |
| | | break; |
| | | default: |
| | |
| | |
|
| | | public class DTC0102_tagCDBPlayer : DtcBasic
|
| | | {
|
| | | public static bool DEBUG_0102 = false;
|
| | | public static int DEBUG_STEP = 0;
|
| | |
|
| | | public static event Action beforePlayerDataInitializeEvent;
|
| | | public static event Action afterPlayerDataInitializeEvent;
|
| | |
| | | {
|
| | | base.Done(vNetPack);
|
| | |
|
| | | H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer;
|
| | |
|
| | |
|
| | | DEBUG_0102 = true;
|
| | | var package = vNetPack as H0102_tagCDBPlayer;
|
| | | StageLoadTimeOutCatcher.RecordProtocol(vNetPack.socketType, "0102", DateTime.Now);
|
| | | DTC0403_tagPlayerLoginLoadOK.finishedLogin = false;
|
| | | DEBUG_STEP = 0;
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossTime = float.MinValue;
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossNpcID = 0;
|
| | |
|
| | | if (package.socketType == ServerType.Main)
|
| | | {
|
| | | DTC0403_tagPlayerLoginLoadOK.neverLoginOk = true;
|
| | | }
|
| | |
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossTime = float.MinValue;
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossNpcID = 0;
|
| | |
|
| | |
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | if (package.socketType == ServerType.Main)
|
| | | {
|
| | | if (beforePlayerDataInitializeEvent != null)
|
| | | {
|
| | | beforePlayerDataInitializeEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | DEBUG_STEP = 1;
|
| | | try
|
| | | {
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | try
|
| | | {
|
| | | RedpointCenter.Instance.ResetAllRedpointState();
|
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | Debug.LogError(ex);
|
| | | }
|
| | |
|
| | | PlayerDatas.Instance.InitPlayerData(vNetData);
|
| | | PlayerDatas.Instance.RequestWorldTick();
|
| | |
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | {
|
| | | SDKUtility.Instance.RoleLogin(vNetData.PlayerID.ToString(),
|
| | | vNetData.PlayerName,
|
| | | vNetData.LV.ToString(),
|
| | | vNetData.VIPLv.ToString());
|
| | | }
|
| | |
|
| | | var _mapConfig = Config.Instance.Get<MapConfig>(vNetData.MapID);
|
| | |
|
| | | DTCA127_tagMCStartChangeMap.LineID = 0;
|
| | | int _realMapDataID = vNetData.MapID;
|
| | |
|
| | | if (_mapConfig.MapFBType != 0)
|
| | | {
|
| | | DungeonModel _model = ModelCenter.Instance.GetModel<DungeonModel>();
|
| | | _realMapDataID = _model.GetDataMapIdByMapId(vNetData.MapID);
|
| | |
|
| | | if (vNetData.MapID != 52020 && vNetData.MapID != 52010)
|
| | | catch (Exception ex)
|
| | | {
|
| | | DTCA127_tagMCStartChangeMap.LineID = (int)vNetData.ExAttr3;
|
| | | Debug.LogError(ex);
|
| | | }
|
| | | }
|
| | |
|
| | | var _mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(_realMapDataID, DTCA127_tagMCStartChangeMap.LineID);
|
| | | PlayerDatas.Instance.InitPlayerData(package);
|
| | | PlayerDatas.Instance.RequestWorldTick();
|
| | |
|
| | | if (_mapResConfig == null)
|
| | | if (package.socketType == ServerType.Main)
|
| | | {
|
| | | DTCA127_tagMCStartChangeMap.LineID = 0;
|
| | | _mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(_realMapDataID, DTCA127_tagMCStartChangeMap.LineID);
|
| | | if (playerIdBuf != 0 && playerIdBuf != PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | if (switchAccountEvent != null)
|
| | | {
|
| | | switchAccountEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | playerIdBuf = PlayerDatas.Instance.baseData.PlayerID;
|
| | | if (afterPlayerDataInitializeEvent != null)
|
| | | {
|
| | | afterPlayerDataInitializeEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | if (_mapResConfig != null)
|
| | | if (package.socketType == ServerType.Main)
|
| | | {
|
| | | GA_Hero.MapOffset.x = _mapResConfig.MapOffset.x;
|
| | | GA_Hero.MapOffset.z = _mapResConfig.MapOffset.y;
|
| | | SDKUtility.Instance.RoleLogin(package.PlayerID.ToString(),
|
| | | package.PlayerName,
|
| | | package.LV.ToString(),
|
| | | package.VIPLv.ToString());
|
| | | }
|
| | |
|
| | | var dataMapId = MapUtility.GetDataMapId(package.MapID);
|
| | | var lineId = MapUtility.GetLineId(package.MapID, (int)package.ExAttr3);
|
| | | var mapResourceConfig = MapResourcesConfig.GetConfig(dataMapId, lineId);
|
| | | if (mapResourceConfig != null)
|
| | | {
|
| | | GA_Hero.MapOffset.x = mapResourceConfig.MapOffset.x;
|
| | | GA_Hero.MapOffset.z = mapResourceConfig.MapOffset.y;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | GA_Hero.MapOffset.z = 0;
|
| | | }
|
| | |
|
| | | #if UNITY_EDITOR
|
| | | DebugEx.LogFormat("------------ 0102 =>玩家ID: {0}, 职业: {1}, 地图: {2}", vNetData.PlayerID, vNetData.Job, vNetData.MapID);
|
| | | #endif
|
| | | DEBUG_STEP = 2;
|
| | |
|
| | | DungeonStage.CurrentMapType = (MapType)_mapConfig.MapFBType;
|
| | | var mapConfig = Config.Instance.Get<MapConfig>(package.MapID);
|
| | | DungeonStage.CurrentMapType = (MapType)mapConfig.MapFBType;
|
| | | if (DungeonStage.CurrentMapType != MapType.OpenCountry)
|
| | | {
|
| | | DungeonModel _dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>();
|
| | | int _dgDataID = _dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | var dungeonOpen = Config.Instance.Get<DungeonOpenTimeConfig>(_dgDataID);
|
| | |
|
| | | var dungeonOpen = Config.Instance.Get<DungeonOpenTimeConfig>(dataMapId);
|
| | | if (dungeonOpen != null)
|
| | | {
|
| | | if (dungeonOpen.DoFight == 1)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | switch (vNetData.socketType)
|
| | | if (package.socketType == ServerType.CrossSever)
|
| | | {
|
| | | case GameNetSystem.SocketType.Main:
|
| | | StageManager.Instance.isServerPreparing = true;
|
| | | break;
|
| | | case GameNetSystem.SocketType.CrossSever:
|
| | | StageManager.Instance.isCrossServerPreparing = true;
|
| | | if (PlayerDatas.Instance.hero != null)
|
| | | {
|
| | | PlayerDatas.Instance.hero.ActorInfo.recordServerDie = PlayerDatas.Instance.hero.ActorInfo.serverDie;
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main
|
| | | && GameNetSystem.Instance.crossServerData.crossState == GameNetSystem.CrossServerState.Yes)
|
| | | {
|
| | | var loginModel = ModelCenter.Instance.GetModel<LoginModel>();
|
| | | var account = loginModel.accountBuf;
|
| | | var ip = GameNetSystem.Instance.crossServerData.ip;
|
| | | var port = GameNetSystem.Instance.crossServerData.port;
|
| | | CrossServerLogin.Instance.AccountLogin(account, ip, port, loginModel.reconnectBackGround);
|
| | | }
|
| | | else
|
| | | {
|
| | | switch (vNetData.MapID)
|
| | | if (PlayerDatas.Instance.hero != null)
|
| | | {
|
| | | case 31250:
|
| | | StageManager.Instance.Load<GuardDungeonStage>(_mapConfig.MapID, vNetData.socketType);
|
| | | break;
|
| | | case RuneTowerModel.RUNETOWER_MAPID:
|
| | | StageManager.Instance.Load<RuneTowerDungeonStage>(_mapConfig.MapID, vNetData.socketType);
|
| | | break;
|
| | | case JadeDynastyTowerModel.DATA_MAPID:
|
| | | StageManager.Instance.Load<JadeDynastyTowerDungeonStage>(_mapConfig.MapID, vNetData.socketType);
|
| | | break;
|
| | | case DemonJarModel.DEMONJAR_SINGLEMAPID:
|
| | | StageManager.Instance.Load<FakeDemonJarDungeonStage>(_mapConfig.MapID, vNetData.socketType);
|
| | | break;
|
| | | default:
|
| | | StageManager.Instance.Load<DungeonStage>(_mapConfig.MapID, vNetData.socketType);
|
| | | break;
|
| | | PlayerDatas.Instance.hero.ActorInfo.recordServerDie = PlayerDatas.Instance.hero.ActorInfo.serverDie;
|
| | | }
|
| | | }
|
| | |
|
| | | DTCA713_tagMCDynamicBarrierState.Clear();
|
| | | MainRedDot.Instance.Register();
|
| | |
|
| | | DEBUG_STEP = 3;
|
| | |
|
| | | if (playerIdBuf != 0 && playerIdBuf != PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | {
|
| | | if (switchAccountEvent != null)
|
| | | {
|
| | | switchAccountEvent();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | playerIdBuf = PlayerDatas.Instance.baseData.PlayerID;
|
| | |
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | {
|
| | | if (afterPlayerDataInitializeEvent != null)
|
| | | {
|
| | | afterPlayerDataInitializeEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | SettingEffectMgr.Instance.Begin();
|
| | | QuickSetting.Instance.SetQuickSetting(package.Setting);
|
| | |
|
| | | DEBUG_STEP = 4;
|
| | | QuickSetting.Instance.SetQuickSetting(vNetData.Setting);
|
| | | NetLinkWin.Hide();
|
| | | WindowCenter.Instance.Close<SelectRoleWin>();
|
| | | WindowCenter.Instance.Close<CreateRoleWin>();
|
| | |
|
| | | DEBUG_STEP = 5;
|
| | |
|
| | | if (VersionConfig.Get().debugVersion)
|
| | | {
|
| | | GMCommand.Instance.Begin();
|
| | | }
|
| | | DEBUG_STEP = 6;
|
| | | // 初始化摄像机
|
| | | if (!CameraController.Instance)
|
| | | {
|
| | |
| | | hudRoot.SetCamera(CameraController.Instance.CameraObject);
|
| | | }
|
| | |
|
| | | DEBUG_STEP = 7;
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero == null)
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | if (hero == null)
|
| | | {
|
| | | _hero = GAMgr.Instance.RequestPlayer<GA_Hero>(PlayerDatas.Instance.PlayerId, E_ActorGroup.User, null);
|
| | | PlayerDatas.Instance.hero = _hero;
|
| | | hero = GAMgr.Instance.RequestPlayer<GA_Hero>(PlayerDatas.Instance.PlayerId, E_ActorGroup.User, null);
|
| | | PlayerDatas.Instance.hero = hero;
|
| | | }
|
| | | else // 重连
|
| | | {
|
| | | if (PreFightMission.Instance.IsFinished())
|
| | | {
|
| | | _hero.StopAll();
|
| | | _hero.InitBornPos(vNetData.PosX, vNetData.PosY);
|
| | | _hero.RequestName();
|
| | | _hero.ActorInfo.serverDie = false;
|
| | | _hero.IdleImmediate();
|
| | | hero.StopAll();
|
| | | hero.InitBornPos(package.PosX, package.PosY);
|
| | | hero.RequestName();
|
| | | hero.ActorInfo.serverDie = false;
|
| | | hero.IdleImmediate();
|
| | | }
|
| | | }
|
| | |
|
| | | DropItemManager.ReleaseAll();
|
| | | DEBUG_STEP = 8;
|
| | | _hero.OnPathFindStop -= MapTransferUtility.Instance.OnHeroStopPathFind;
|
| | | _hero.OnPathFindStop += MapTransferUtility.Instance.OnHeroStopPathFind;
|
| | | StatusMgr.Instance.ReleaseActor(PlayerDatas.Instance.PlayerId);
|
| | | GAMgr.Instance.UnInit();
|
| | | DEBUG_STEP = 9;
|
| | |
|
| | | StageLoadTimeOutCatcher.RecordProtocol(vNetPack.socketType, "0102", DateTime.Now);
|
| | |
|
| | | hero.OnPathFindStop -= MapTransferUtility.Instance.OnHeroStopPathFind;
|
| | | hero.OnPathFindStop += MapTransferUtility.Instance.OnHeroStopPathFind;
|
| | | GA_Hero.s_MapSwitching = true;
|
| | |
|
| | | if (DebugUtility.Instance.debugAccount)
|
| | | {
|
| | | GMCommand.Instance.Begin();
|
| | | }
|
| | |
|
| | | if (package.socketType == ServerType.Main
|
| | | && GameNetSystem.Instance.crossServerData.crossState == GameNetSystem.CrossServerState.Yes)
|
| | | {
|
| | | StageLoad.Instance.UpdateServerFlag(package.socketType, false);
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = mapConfig.MapID,
|
| | | toLineId = MapUtility.GetLineId(mapConfig.MapID, PlayerDatas.Instance.baseData.dungeonLineId),
|
| | | needEmpty = true,
|
| | | needLoadResource = false,
|
| | | serverType = package.socketType,
|
| | | isClientLoadMap = false
|
| | | });
|
| | |
|
| | | var loginModel = ModelCenter.Instance.GetModel<LoginModel>();
|
| | | var account = loginModel.accountBuf;
|
| | | var ip = GameNetSystem.Instance.crossServerData.ip;
|
| | | var port = GameNetSystem.Instance.crossServerData.port;
|
| | | CrossServerLogin.Instance.AccountLogin(account, ip, port, loginModel.reconnectBackGround);
|
| | | }
|
| | | else
|
| | | {
|
| | | StageLoad.Instance.UpdateServerFlag(package.socketType, false);
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = mapConfig.MapID,
|
| | | toLineId = MapUtility.GetLineId(mapConfig.MapID, PlayerDatas.Instance.baseData.dungeonLineId),
|
| | | needEmpty = true,
|
| | | needLoadResource = true,
|
| | | serverType = package.socketType,
|
| | | isClientLoadMap = false
|
| | | });
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | ServerForceExitHintWin.reason = vNetData.Reason;
|
| | | switch (vNetData.socketType)
|
| | | {
|
| | | case GameNetSystem.SocketType.Main:
|
| | | case ServerType.Main:
|
| | | GameNetSystem.Instance.LoginOut();
|
| | | ModelCenter.Instance.GetModel<LoginModel>().busy = false;
|
| | | if (VersionConfig.Get().versionAuthority == VersionAuthority.Release)
|
| | |
| | | WindowCenter.Instance.Open<ServerForceExitHintWin>();
|
| | | NetLinkWin.Hide();
|
| | | break;
|
| | | case GameNetSystem.SocketType.CrossSever:
|
| | | case ServerType.CrossSever:
|
| | | default:
|
| | | break;
|
| | | }
|
| | |
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | var vNetData = vNetPack as H0107_tagShowLoginFrm;
|
| | | if (vNetData == null) return;
|
| | | var package = vNetPack as H0107_tagShowLoginFrm;
|
| | |
|
| | | switch (vNetData.socketType)
|
| | | switch (package.socketType)
|
| | | {
|
| | | case GameNetSystem.SocketType.Main:
|
| | | case ServerType.Main:
|
| | | GameNetSystem.Instance.netState = GameNetSystem.NetState.CreateOrSelectRole;
|
| | | ModelCenter.Instance.GetModel<LoginModel>().OnGetPlayerLoginInfo(vNetData.Type);
|
| | | ModelCenter.Instance.GetModel<LoginModel>().OnGetPlayerLoginInfo(package.Type);
|
| | | break;
|
| | | case GameNetSystem.SocketType.CrossSever:
|
| | | CrossServerLogin.Instance.OnGetPlayerLoginInfo(vNetData.Type);
|
| | | case ServerType.CrossSever:
|
| | | CrossServerLogin.Instance.OnGetPlayerLoginInfo(package.Type);
|
| | | break;
|
| | | default:
|
| | | break;
|
| | |
| | | public class DTC0109_tagServerPrepareOK : DtcBasic
|
| | | {
|
| | |
|
| | |
|
| | | LoginModel loginModel { get { return ModelCenter.Instance.GetModel<LoginModel>(); } }
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | |
| | | }
|
| | |
|
| | | StageLoadTimeOutCatcher.RecordProtocol(vNetData.socketType, "0109", DateTime.Now);
|
| | |
|
| | | //修改技能快捷设置发包顺序
|
| | | PlayerDatas.Instance.skill.CheckQuickSet();
|
| | |
|
| | | switch (vNetData.socketType)
|
| | | {
|
| | | case GameNetSystem.SocketType.Main:
|
| | | if (loginModel.reconnectBackGround
|
| | | || StageManager.Instance.socketType != GameNetSystem.SocketType.Main
|
| | | || DTCA127_tagMCStartChangeMap.isChangeLine)
|
| | | {
|
| | | var mapOk = new C0107_tagCInitMapOK();
|
| | | mapOk.MapID = PlayerDatas.Instance.baseData.MapID;
|
| | | mapOk.Type = 0;
|
| | | GameNetSystem.Instance.SendInfo(mapOk);
|
| | | DTCA127_tagMCStartChangeMap.isChangeLine = false;
|
| | |
|
| | | StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
|
| | | }
|
| | | break;
|
| | | case GameNetSystem.SocketType.CrossSever:
|
| | | if (CrossServerLogin.Instance.reconnectBackGround || StageManager.Instance.socketType != GameNetSystem.SocketType.CrossSever)
|
| | | {
|
| | | var mapOk = new C0107_tagCInitMapOK();
|
| | | mapOk.MapID = PlayerDatas.Instance.baseData.MapID;
|
| | | mapOk.Type = 0;
|
| | | GameNetSystem.Instance.SendToCrossServer(mapOk);
|
| | |
|
| | | StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | switch (vNetPack.socketType)
|
| | | {
|
| | | case GameNetSystem.SocketType.Main:
|
| | | StageManager.Instance.isServerPreparing = false;
|
| | | break;
|
| | | case GameNetSystem.SocketType.CrossSever:
|
| | | StageManager.Instance.isCrossServerPreparing = false;
|
| | | break;
|
| | | }
|
| | |
|
| | | // // 查错预留
|
| | | // if (DTC0102_tagCDBPlayer.DEBUG_0102 && DTC0102_tagCDBPlayer.DEBUG_STEP != 9)
|
| | | // {
|
| | | //#if !UNITY_EDITOR
|
| | | // OperationLogCollect.Instance.BugReport("错误", "0102未执行至正确的步骤, 只执行到: " + DTC0102_tagCDBPlayer.DEBUG_STEP);
|
| | | //#else
|
| | | // Debug.LogFormat("(DTC0102_tagCDBPlayer.DEBUG_STEP != 9) : {0}", DTC0102_tagCDBPlayer.DEBUG_STEP);
|
| | | //#endif
|
| | | // DTC0102_tagCDBPlayer.DEBUG_0102 = false;
|
| | | // }
|
| | |
|
| | | // // 查错预留
|
| | | // if (DTCA127_tagMCStartChangeMap.DEBUG_A127 && DTCA127_tagMCStartChangeMap.DEBUG_STEP != 6)
|
| | | // {
|
| | | //#if !UNITY_EDITOR
|
| | | // OperationLogCollect.Instance.BugReport("错误", "A127未执行至正确的步骤, 只执行到: " + DTCA127_tagMCStartChangeMap.DEBUG_STEP);
|
| | | //#else
|
| | | // Debug.LogFormat("(DTCA127_tagMCStartChangeMap.DEBUG_STEP != 6) : {0}", DTCA127_tagMCStartChangeMap.DEBUG_STEP);
|
| | | //#endif
|
| | |
|
| | | // DTCA127_tagMCStartChangeMap.DEBUG_A127 = false;
|
| | | // }
|
| | | StageLoad.Instance.UpdateServerFlag(vNetData.socketType, true);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
| | |
|
| | | switch (vNetPack.socketType)
|
| | | {
|
| | | case GameNetSystem.SocketType.Main:
|
| | | case ServerType.Main:
|
| | | GameNetSystem.Instance.SendInfo(sendInfo);// 在线回应
|
| | | break;
|
| | | case GameNetSystem.SocketType.CrossSever:
|
| | | case ServerType.CrossSever:
|
| | | GameNetSystem.Instance.SendToCrossServer(sendInfo);// 在线回应
|
| | | break;
|
| | | default:
|
| | |
| | | |
| | | switch (vNetPack.socketType) |
| | | { |
| | | case GameNetSystem.SocketType.Main: |
| | | case ServerType.Main: |
| | | ModelCenter.Instance.GetModel<LoginModel>().CheckClientVersion(); |
| | | break; |
| | | case GameNetSystem.SocketType.CrossSever: |
| | | case ServerType.CrossSever: |
| | | CrossServerLogin.Instance.CheckClientVersion(); |
| | | break; |
| | | default: |
| | |
| | | |
| | | H0309_tagPlayerLoginInfo vNetData = vNetPack as H0309_tagPlayerLoginInfo; |
| | | PlayerDatas.Instance.loginInfo = vNetData; |
| | | if (vNetData.socketType== GameNetSystem.SocketType.Main) |
| | | if (vNetData.socketType== ServerType.Main) |
| | | { |
| | | GameNetSystem.Instance.UpdateCrossServerData(vNetData.IP, vNetData.Port, vNetData.CrossState); |
| | | } |
| | |
| | | StageLoadTimeOutCatcher.RecordProtocol(vNetPack.socketType, "0403", DateTime.Now);
|
| | |
|
| | | GameNetSystem.Instance.netState = GameNetSystem.NetState.Connected;
|
| | |
|
| | | finishedLogin = true;
|
| | | GA_Hero.s_MapSwitching = false;
|
| | |
|
| | |
| | |
|
| | | switch (vNetData.socketType)
|
| | | {
|
| | | case GameNetSystem.SocketType.Main:
|
| | | case ServerType.Main:
|
| | | loginModel.reconnectBackGround = false;
|
| | | break;
|
| | | case GameNetSystem.SocketType.CrossSever:
|
| | | case ServerType.CrossSever:
|
| | | GameNetSystem.Instance.crossServerConnected_Loigc = true;
|
| | | CrossServerLogin.Instance.reconnectBackGround = false;
|
| | | CrossServerLogin.Instance.StopLoginOverTimeProcess();
|
| | |
| | | {
|
| | | try
|
| | | {
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | if (vNetData.socketType == ServerType.Main)
|
| | | {
|
| | | if (playerLoginOkEvent != null)
|
| | | {
|
| | |
| | | break;
|
| | | }
|
| | |
|
| | | if (StageManager.Instance.isLoading)
|
| | | if (StageLoad.Instance.isLoading)
|
| | | {
|
| | | if (!GAMgr.Instance.reAdjustPosList.Contains(_actor))
|
| | | {
|
| | |
| | |
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | if (vNetPack.socketType == GameNetSystem.SocketType.Main)
|
| | | if (vNetPack.socketType == ServerType.Main)
|
| | | {
|
| | | if (_actor != null && !GAMgr.Instance.reAdjustPosList.Contains(_actor))
|
| | | {
|
| | |
| | | vNetData.NPCID, _group, vNetData); |
| | | } |
| | | |
| | | if (StageManager.Instance.isLoading) |
| | | if (StageLoad.Instance.isLoading) |
| | | { |
| | | if (_actor != null) |
| | | { |
| | |
| | | |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main) |
| | | if (vNetData.socketType == ServerType.Main) |
| | | { |
| | | if (_actor != null) |
| | | { |
| | |
| | | if (vNetData == null) |
| | | { |
| | | return; |
| | | }
|
| | |
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.CrossSever)
|
| | | {
|
| | | if (vNetData.RefreshType == (int)PlayerDataRefresh.FightPower
|
| | | || vNetData.RefreshType == (int)PlayerDataRefresh.ExpPoint
|
| | | || vNetData.RefreshType == (int)PlayerDataRefresh.LV
|
| | | || vNetData.RefreshType == (int)PlayerDataRefresh.VIPLv)
|
| | | {
|
| | | return;
|
| | | }
|
| | | } |
| | | |
| | | if (vNetData.socketType == ServerType.CrossSever) |
| | | { |
| | | if (vNetData.RefreshType == (int)PlayerDataRefresh.FightPower |
| | | || vNetData.RefreshType == (int)PlayerDataRefresh.ExpPoint |
| | | || vNetData.RefreshType == (int)PlayerDataRefresh.LV |
| | | || vNetData.RefreshType == (int)PlayerDataRefresh.VIPLv) |
| | | { |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main) |
| | | if (vNetData.socketType == ServerType.Main) |
| | | { |
| | | if (vNetData.RefreshType == (int)PlayerDataRefresh.HP |
| | | || vNetData.RefreshType == (int)PlayerDataRefresh.MaxHP |
| | |
| | | return; |
| | | } |
| | | } |
| | | }
|
| | | } |
| | | |
| | | if (vNetData.RefreshType == (int)PlayerDataRefresh.OfficialRank) |
| | | { |
| | |
| | | bool _sync = false; |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | if (vNetData.socketType == GameNetSystem.SocketType.CrossSever) |
| | | if (vNetData.socketType == ServerType.CrossSever) |
| | | { |
| | | _sync = true; |
| | | } |
| | |
| | | |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main) |
| | | if (vNetData.socketType == ServerType.Main) |
| | | { |
| | | return; |
| | | } |
| | |
| | |
|
| | | _player = GAMgr.Instance.RequestPlayer<GA_Player>(vNetData.PlayerID, E_ActorGroup.Player, vNetData);
|
| | |
|
| | | if (StageManager.Instance.isLoading)
|
| | | if (StageLoad.Instance.isLoading)
|
| | | {
|
| | | if (!GAMgr.Instance.reAdjustPosList.Contains(_player))
|
| | | {
|
| | |
| | |
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | if (vNetPack.socketType == GameNetSystem.SocketType.Main)
|
| | | if (vNetPack.socketType == ServerType.Main)
|
| | | {
|
| | | if (_player != null && !GAMgr.Instance.reAdjustPosList.Contains(_player))
|
| | | {
|
| | |
| | | _pet = GAMgr.Instance.RequestNPCFight<GA_Pet>(vNetData.PetID, vNetData.NPCID, _group, vNetData); |
| | | |
| | | |
| | | if (StageManager.Instance.isLoading) |
| | | if (StageLoad.Instance.isLoading) |
| | | { |
| | | if (!GAMgr.Instance.reAdjustPosList.Contains(_pet)) |
| | | { |
| | |
| | | |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | if (vNetPack.socketType == GameNetSystem.SocketType.Main) |
| | | if (vNetPack.socketType == ServerType.Main) |
| | | { |
| | | if (_pet != null && !GAMgr.Instance.reAdjustPosList.Contains(_pet)) |
| | | { |
| | |
| | | base.Done(vNetPack);
|
| | | var package = vNetPack as HA125_tagMCChangeMapFail;
|
| | |
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | |
|
| | | if (_hero == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | MapTransferUtility.Instance.CheckMap(PlayerDatas.Instance.baseData.MapID, true);
|
| | | MapTransferUtility.Instance.Clear();
|
| | |
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossTime = 0;
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossNpcID = 0;
|
| | |
|
| | | WindowCenter.Instance.Close<LoadingWin>();
|
| | |
|
| | | GA_Hero.s_MapSwitching = false;
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | if (hero != null)
|
| | | {
|
| | | MapTransferUtility.Instance.CheckMap(PlayerDatas.Instance.baseData.MapID, true);
|
| | | MapTransferUtility.Instance.Clear();
|
| | |
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossTime = 0;
|
| | | MapTransferUtility.Instance.lastMoveToWorldBossNpcID = 0;
|
| | | GA_Hero.s_MapSwitching = false;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | Debug.Log(_content); |
| | | RuntimeLogUtility.AddLog_Blue(_content, PlayerDatas.Instance.PlayerId); |
| | | #endif |
| | | var _mapConfig = Config.Instance.Get<MapConfig>(package.MapID); |
| | | DTCA127_tagMCStartChangeMap.LineID = 0; |
| | | |
| | | int _realMapDataID = package.MapID; |
| | | |
| | | if (_mapConfig.MapFBType != 0) |
| | | { |
| | | DungeonModel _model = ModelCenter.Instance.GetModel<DungeonModel>(); |
| | | _realMapDataID = _model.GetDataMapIdByMapId(_realMapDataID); |
| | | |
| | | if (package.MapID != 52020 && package.MapID != 52010) |
| | | { |
| | | DTCA127_tagMCStartChangeMap.LineID = package.FuncLineID; |
| | | } |
| | | } |
| | | |
| | | var _mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(_realMapDataID, DTCA127_tagMCStartChangeMap.LineID); |
| | | |
| | | if (_mapResConfig == null) |
| | | { |
| | | DTCA127_tagMCStartChangeMap.LineID = 0; |
| | | _mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(_realMapDataID, DTCA127_tagMCStartChangeMap.LineID); |
| | | } |
| | | |
| | | var dataMapId = MapUtility.GetDataMapId(package.MapID); |
| | | var lineId = MapUtility.GetLineId(package.MapID, package.FuncLineID); |
| | | var mapResourcesConfig = MapResourcesConfig.GetConfig(dataMapId, lineId); |
| | | if (!WindowCenter.Instance.IsOpen<LoadingWin>()) |
| | | { |
| | | LoadingWin.targetMapResId = _mapResConfig.ID; |
| | | LoadingWin.targetMapResId = mapResourcesConfig.ID; |
| | | WindowCenter.Instance.Open<LoadingWin>(); |
| | | } |
| | | |
| | | GA_Hero _hero = PlayerDatas.Instance.hero; |
| | | |
| | | if (_hero == null) |
| | | var hero = PlayerDatas.Instance.hero; |
| | | if (hero != null) |
| | | { |
| | | return; |
| | | var mapConfig = Config.Instance.Get<MapConfig>(package.MapID); |
| | | if (mapConfig.CanRide == 0) |
| | | { |
| | | hero.SwitchHorse(0); |
| | | DTC0428_tagPlayerRideHorse.Send_tagPlayerRideHorse(false); |
| | | } |
| | | hero.ClearPathFindTarget(); |
| | | hero.OnPathFindStop -= MapTransferUtility.Instance.OnHeroStopPathFind; |
| | | hero.StopAll(); |
| | | |
| | | GA_Hero.s_MapSwitching = true; |
| | | } |
| | | |
| | | if(_mapConfig.CanRide == 0) |
| | | { |
| | | _hero.SwitchHorse(0); |
| | | DTC0428_tagPlayerRideHorse.Send_tagPlayerRideHorse(false); |
| | | } |
| | | _hero.ClearPathFindTarget(); |
| | | _hero.OnPathFindStop -= MapTransferUtility.Instance.OnHeroStopPathFind; |
| | | _hero.StopAll(); |
| | | |
| | | GA_Hero.s_MapSwitching = true; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | public class DTCA127_tagMCStartChangeMap : DtcBasic |
| | | { |
| | | public static int DEBUG_STEP = 0; |
| | | public static bool DEBUG_A127 = false; |
| | | |
| | | public const string RECORDPREMAPID_KEY = "RecordMapId"; |
| | | public static readonly Dictionary<int, int> mapIdDict = new Dictionary<int, int>(); |
| | | |
| | | public static int LineID = 0; |
| | | public static bool isChangeLine = false; |
| | | |
| | | public static MapResourcesConfig GetMapResourcesConfig() |
| | | { |
| | | int _realMapDataID = PlayerDatas.Instance.baseData.MapID; |
| | | var _mapConfig = Config.Instance.Get<MapConfig>(_realMapDataID); |
| | | |
| | | if (_mapConfig.MapFBType != 0) |
| | | { |
| | | DungeonModel _model = ModelCenter.Instance.GetModel<DungeonModel>(); |
| | | _realMapDataID = _model.GetDataMapIdByMapId(_realMapDataID); |
| | | } |
| | | |
| | | var _key = _realMapDataID * 1000 + LineID; |
| | | MapResourcesConfig _config = GetMapResourcesConfig(_realMapDataID, LineID); |
| | | if (_config == null) |
| | | { |
| | | _config = GetMapResourcesConfig(_realMapDataID, 0); |
| | | } |
| | | return _config; |
| | | } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | DEBUG_A127 = true; |
| | | |
| | | var package = vNetPack as HA127_tagMCStartChangeMap; |
| | | StageLoadTimeOutCatcher.RecordProtocol(package.socketType, "A127", DateTime.Now); |
| | | |
| | | DEBUG_STEP = 0; |
| | | |
| | | #if UNITY_EDITOR |
| | | string _content = string.Format("DTCA127_tagMCStartChangeMap => 开始切换至地图: {0}", package.MapID); |
| | | Debug.Log(_content); |
| | | RuntimeLogUtility.AddLog_Blue(_content, PlayerDatas.Instance.PlayerId); |
| | | #endif |
| | | var _mapConfig = Config.Instance.Get<MapConfig>((int)package.MapID); |
| | | |
| | | LineID = 0; |
| | | int _realMapDataID = (int)package.MapID; |
| | | |
| | | if (_mapConfig.MapFBType != 0) |
| | | var dataMapId = MapUtility.GetDataMapId((int)package.MapID); |
| | | var lineId = MapUtility.GetLineId((int)package.MapID, package.FuncLineID); |
| | | var mapResourceConfig = MapResourcesConfig.GetConfig(dataMapId, lineId); |
| | | if (mapResourceConfig != null) |
| | | { |
| | | DungeonModel _model = ModelCenter.Instance.GetModel<DungeonModel>(); |
| | | _realMapDataID = _model.GetDataMapIdByMapId(_realMapDataID); |
| | | |
| | | if (package.MapID != 52020 && package.MapID != 52010) |
| | | { |
| | | LineID = package.FuncLineID; |
| | | } |
| | | } |
| | | |
| | | var _mapResConfig = GetMapResourcesConfig(_realMapDataID, LineID); |
| | | |
| | | if (_mapResConfig == null) |
| | | { |
| | | LineID = 0; |
| | | _mapResConfig = GetMapResourcesConfig(_realMapDataID, LineID); |
| | | } |
| | | |
| | | if (_mapResConfig != null) |
| | | { |
| | | GA_Hero.MapOffset.x = _mapResConfig.MapOffset.x; |
| | | GA_Hero.MapOffset.z = _mapResConfig.MapOffset.y; |
| | | GA_Hero.MapOffset.x = mapResourceConfig.MapOffset.x; |
| | | GA_Hero.MapOffset.z = mapResourceConfig.MapOffset.y; |
| | | } |
| | | else |
| | | { |
| | | GA_Hero.MapOffset.x = 0; |
| | | GA_Hero.MapOffset.z = 0; |
| | | } |
| | | DEBUG_STEP = 1; |
| | | |
| | | BossShowModel.Instance.reqDungeonLineId = package.FuncLineID; |
| | | |
| | | GA_Hero _hero = PlayerDatas.Instance.hero; |
| | | |
| | | if (_hero != null) |
| | | var hero = PlayerDatas.Instance.hero; |
| | | if (hero != null) |
| | | { |
| | | _hero.ShowArrow(false); |
| | | _hero.SwitchGrayName(false); |
| | | hero.ShowArrow(false); |
| | | hero.SwitchGrayName(false); |
| | | if (StatusMgr.Instance.IsExist(PlayerDatas.Instance.PlayerId, StatusMgr.Instance.redNameBuffID)) |
| | | { |
| | | _hero.SwitchRedName(true); |
| | | hero.SwitchRedName(true); |
| | | } |
| | | _hero.needSyncGroundHeight = true; |
| | | hero.needSyncGroundHeight = true; |
| | | } |
| | | |
| | | GAMgr.Instance.UnInit(); |
| | | DTCA713_tagMCDynamicBarrierState.Clear(); |
| | | |
| | | DEBUG_STEP = 2; |
| | | |
| | | GameObjectPoolManager.Instance.UnLoadAll(); |
| | | DropItemManager.ReleaseAll(); |
| | | if (PlayerDatas.Instance.baseData.MapID == package.MapID) |
| | | { |
| | | WindowCenter.Instance.Close<LoadingWin>(); |
| | | } |
| | | |
| | | LocalSave.SetInt(RECORDPREMAPID_KEY, PlayerDatas.Instance.baseData.MapID); |
| | | |
| | | BattleEffectPlayRule.Instance.sortPlayerList.Clear(); |
| | | SelectionManager.ClearJHSfx(); |
| | | DEBUG_STEP = 3; |
| | | |
| | | var isMainSocket = vNetPack.socketType == GameNetSystem.SocketType.Main; |
| | | var isMainSocket = vNetPack.socketType == ServerType.Main; |
| | | PlayerDatas.Instance.RefreshProperty(isMainSocket, PlayerDataRefresh.MapID, package.MapID); |
| | | PlayerDatas.Instance.RefreshProperty(isMainSocket, PlayerDataRefresh.ExAttr3, package.FuncLineID); |
| | | |
| | |
| | | PlayerDatas.Instance.hero.SelectTarget = null; |
| | | } |
| | | |
| | | DungeonStage.CurrentMapType = (MapType)_mapConfig.MapFBType; |
| | | if (StageManager.Instance.currentMapResId == _mapResConfig.ID) |
| | | { |
| | | #if UNITY_EDITOR |
| | | Debug.LogFormat("DTCA127_tagMCStartChangeMap出现加载相同地图行为:" + _mapResConfig.ID); |
| | | #endif |
| | | var mapConfig = Config.Instance.Get<MapConfig>((int)package.MapID); |
| | | DungeonStage.CurrentMapType = (MapType)mapConfig.MapFBType; |
| | | |
| | | isChangeLine = true; |
| | | |
| | | return; |
| | | } |
| | | |
| | | switch (vNetPack.socketType) |
| | | { |
| | | case GameNetSystem.SocketType.Main: |
| | | StageManager.Instance.isServerPreparing = true; |
| | | break; |
| | | case GameNetSystem.SocketType.CrossSever: |
| | | StageManager.Instance.isCrossServerPreparing = true; |
| | | break; |
| | | } |
| | | |
| | | DEBUG_STEP = 4; |
| | | switch (_mapConfig.MapFBType) |
| | | switch (mapConfig.MapFBType) |
| | | { |
| | | case 0: |
| | | foreach (var _id in DTCB206_tagMCHelpBattleCallResult.s_CacheObjIdList) |
| | |
| | | break; |
| | | } |
| | | |
| | | DEBUG_STEP = 5; |
| | | switch (package.MapID) |
| | | StageLoad.Instance.UpdateServerFlag(package.socketType, false); |
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand() |
| | | { |
| | | case 31250: |
| | | StageManager.Instance.Load<GuardDungeonStage>(_mapConfig.MapID, package.socketType); |
| | | break; |
| | | case RuneTowerModel.RUNETOWER_MAPID: |
| | | StageManager.Instance.Load<RuneTowerDungeonStage>(_mapConfig.MapID, package.socketType); |
| | | break; |
| | | case JadeDynastyTowerModel.DATA_MAPID: |
| | | StageManager.Instance.Load<JadeDynastyTowerDungeonStage>(_mapConfig.MapID, package.socketType); |
| | | break; |
| | | case DemonJarModel.DEMONJAR_SINGLEMAPID: |
| | | StageManager.Instance.Load<FakeDemonJarDungeonStage>(_mapConfig.MapID, package.socketType); |
| | | break; |
| | | default: |
| | | StageManager.Instance.Load<DungeonStage>(_mapConfig.MapID, package.socketType); |
| | | break; |
| | | } |
| | | toMapId = (int)package.MapID, |
| | | toLineId = lineId, |
| | | needEmpty = true, |
| | | needLoadResource = true, |
| | | serverType = package.socketType, |
| | | isClientLoadMap = false |
| | | }); |
| | | |
| | | DEBUG_STEP = 6; |
| | | } |
| | | |
| | | public static MapResourcesConfig GetMapResourcesConfig(int mapID, int lineID) |
| | | { |
| | | int _key = mapID * 1000 + lineID; |
| | | int _mapResourceID = -1; |
| | | MapResourcesConfig _mapResConfig = null; |
| | | if (mapIdDict.TryGetValue(_key, out _mapResourceID)) |
| | | { |
| | | _mapResConfig = Config.Instance.Get<MapResourcesConfig>(_mapResourceID); |
| | | } |
| | | else |
| | | { |
| | | foreach (var _config in Config.Instance.GetAllValues<MapResourcesConfig>()) |
| | | { |
| | | if (mapID == _config.DataID |
| | | && lineID == _config.LineID) |
| | | { |
| | | _mapResourceID = _config.ID; |
| | | _mapResConfig = _config; |
| | | mapIdDict[_key] = _mapResourceID; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return _mapResConfig; |
| | | } |
| | | |
| | | } |
| | |
| | | { |
| | | C030A_tagCChangeAttackMode _proto = new C030A_tagCChangeAttackMode(); |
| | | _proto.Mode = (byte)attackMode; |
| | | if (CrossServerUtility.IsCrossServerBoss())
|
| | | {
|
| | | GameNetSystem.Instance.SendToCrossServer(_proto);
|
| | | }
|
| | | else
|
| | | {
|
| | | GameNetSystem.Instance.SendInfo(_proto);
|
| | | if (CrossServerUtility.IsCrossServerBoss()) |
| | | { |
| | | GameNetSystem.Instance.SendToCrossServer(_proto); |
| | | } |
| | | else |
| | | { |
| | | GameNetSystem.Instance.SendInfo(_proto); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main) |
| | | if (vNetData.socketType == ServerType.Main) |
| | | { |
| | | return; |
| | | } |
| | |
| | | |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | if (vNetDatas.socketType == GameNetSystem.SocketType.Main) |
| | | if (vNetDatas.socketType == ServerType.Main) |
| | | { |
| | | if (vNetData.RefreshType == (int)PlayerDataRefresh.HP |
| | | || vNetData.RefreshType == (int)PlayerDataRefresh.MaxHP |
| | |
| | |
|
| | | var package = vNetPack as HC001_tagGCCrossRealmPKMatchOK;
|
| | |
|
| | | if (package.socketType == GameNetSystem.SocketType.Main)
|
| | | if (package.socketType == ServerType.Main)
|
| | | {
|
| | | var teamModel = ModelCenter.Instance.GetModel<TeamModel>();
|
| | | if (teamModel.isMatching)
|
| | |
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HC104_tagMCPrepareEnterCrossServer; |
| | | |
| | | var config = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig((int)package.DataMapID, 0); |
| | | var config = TableConfig.MapResourcesConfig.GetConfig((int)package.DataMapID, 0); |
| | | LoadingWin.targetMapResId = config.ID; |
| | | WindowCenter.Instance.Open<LoadingWin>(); |
| | | } |
| | |
| | | public class GameNetPackBasic |
| | | { |
| | | |
| | | public GameNetSystem.SocketType socketType = GameNetSystem.SocketType.Main; |
| | | public ServerType socketType = ServerType.Main; |
| | | |
| | | /** 协议号 */ |
| | | protected ushort _cmd = 0; |
| | |
| | | DebugEx.Log(ex);
|
| | | }
|
| | |
|
| | | mainSocket = new ClientSocket(SocketType.Main);
|
| | | mainSocket = new ClientSocket(ServerType.Main);
|
| | | mainProtocolQueue.Clear();
|
| | |
|
| | | mainSocket.Connect(ip, port, (bool ok) =>
|
| | |
| | | DebugEx.Log(ex);
|
| | | }
|
| | |
|
| | | crossServerSocket = new ClientSocket(SocketType.CrossSever);
|
| | | crossServerSocket = new ClientSocket(ServerType.CrossSever);
|
| | | crossSeverProtocolQueue.Clear();
|
| | | this.crossServerSocket.Connect(ip, port, (bool ok) =>
|
| | | {
|
| | |
| | | {
|
| | | if (crossServerSocket != null)
|
| | | {
|
| | | protocol.socketType = SocketType.CrossSever;
|
| | | protocol.socketType = ServerType.CrossSever;
|
| | | crossServerSocket.SendInfo(protocol);
|
| | | DebugPkgCache.Push(protocol);
|
| | | }
|
| | | }
|
| | |
|
| | | public void PushPackage(GameNetPackBasic protocol, SocketType type)
|
| | | public void PushPackage(GameNetPackBasic protocol, ServerType type)
|
| | | {
|
| | | lock (this)
|
| | | {
|
| | |
| | | {
|
| | | switch (type)
|
| | | {
|
| | | case SocketType.Main:
|
| | | case ServerType.Main:
|
| | | mainProtocolQueue.Enqueue(protocol);
|
| | | break;
|
| | | case SocketType.CrossSever:
|
| | | case ServerType.CrossSever:
|
| | | crossSeverProtocolQueue.Enqueue(protocol);
|
| | | break;
|
| | | default:
|
| | |
| | | var loginModel = ModelCenter.Instance.GetModel<LoginModel>();
|
| | | loginModel.busy = false;
|
| | | WindowJumpMgr.Instance.ClearJumpData();
|
| | | StageManager.Instance.LoadLoginStage();
|
| | |
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = 1,
|
| | | toLineId = 0,
|
| | | needEmpty = false,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true
|
| | | });
|
| | |
|
| | | NetLinkWin.Hide();
|
| | | }
|
| | | }
|
| | |
| | | DisConnected = 6,
|
| | | }
|
| | |
|
| | | public enum SocketType
|
| | | {
|
| | | Main = 1,
|
| | | CrossSever = 2,
|
| | | }
|
| | |
|
| | | public struct CrossServerData
|
| | | {
|
| | | public string ip;
|
| | |
| | | Error = 2,
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public enum ServerType
|
| | | {
|
| | | Main = 1,
|
| | | CrossSever = 2,
|
| | | }
|
| | |
| | | private static List<NetPackage> tempPackages = new List<NetPackage>();//暂停时缓存的封包列表
|
| | | public static bool stopRecieve = false;
|
| | |
|
| | | public static void RecordPackage(GameNetSystem.SocketType socketType, string bytes, NetPackagetType packType, string packageName, string fields, List<string> fieldDetails)
|
| | | public static void RecordPackage(ServerType socketType, string bytes, NetPackagetType packType, string packageName, string fields, List<string> fieldDetails)
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | var package = new NetPackage();
|
| | |
| | |
|
| | | public class NetPackage
|
| | | {
|
| | | public GameNetSystem.SocketType socketType;
|
| | | public ServerType socketType;
|
| | | public bool show = false;
|
| | | public string time;
|
| | | public string content;
|
| | |
| | | |
| | | public bool connected { get { return m_Socket == null ? false : m_Socket.Connected; } } |
| | | |
| | | GameNetSystem.SocketType socketType = GameNetSystem.SocketType.Main; |
| | | ServerType socketType = ServerType.Main; |
| | | DateTime m_LastPackageTime; |
| | | public DateTime lastPackageTime { get { return m_LastPackageTime; } } |
| | | |
| | |
| | | int port; |
| | | Action<bool> onConnected = null; |
| | | |
| | | public ClientSocket(GameNetSystem.SocketType type) |
| | | public ClientSocket(ServerType type) |
| | | { |
| | | this.socketType = type; |
| | | } |
| | |
| | | {
|
| | | if (!force)
|
| | | {
|
| | | if (StageManager.Instance.StageType == Stage.E_StageType.Dungeon)
|
| | | if (StageLoad.Instance.stageType == Stage.E_StageType.Dungeon)
|
| | | {
|
| | | if (DungeonStage.CurrentMapType != MapType.OpenCountry)
|
| | | {
|
| | |
| | | else
|
| | | {
|
| | | // 处理封魔坛英雄伤害
|
| | | FakeDemonJarDungeonStage _dungeon = StageManager.Instance.CurrentStage as FakeDemonJarDungeonStage;
|
| | | FakeDemonJarDungeonStage _dungeon = StageLoad.Instance.currentStage as FakeDemonJarDungeonStage;
|
| | | if (_dungeon != null)
|
| | | {
|
| | | if (attacker.ServerInstID == PlayerDatas.Instance.PlayerId)
|
| | |
| | | DTC0429_tagObjResetPos.ResetPlayerPosEvent += ResetPlayerPosEvent; |
| | | if (IsHeroControl) |
| | | { |
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish; |
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish; |
| | | DTC0102_tagCDBPlayer.afterPlayerDataInitializeEvent += AfterPlayerDataInitializeEvent; |
| | | DTCA112_tagMCDBPlayer.playerInitEvent += PlayerInitEvent; |
| | | } |
| | |
| | | DTCA112_tagMCDBPlayer.playerInitEvent -= PlayerInitEvent; |
| | | if (IsHeroControl) |
| | | { |
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish; |
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish; |
| | | ReleasePickUpBehaviour(); |
| | | } |
| | | if (m_SFXController != null) |
| | |
| | | Fight,
|
| | | }
|
| | | private E_MapTransferDoType m_MapTransferType;
|
| | | public E_MapTransferDoType MapTransferDoType
|
| | | {
|
| | | get
|
| | | {
|
| | | public E_MapTransferDoType MapTransferDoType {
|
| | | get {
|
| | | return m_MapTransferType;
|
| | | }
|
| | | set
|
| | | {
|
| | | set {
|
| | | m_MapTransferType = value;
|
| | | #if UNITY_EDITOR
|
| | | // Debug.LogFormat("设置方式: {0}", m_MapTransferType);
|
| | |
| | | #endregion
|
| | |
|
| | | #region npc
|
| | | public int NpcID
|
| | | {
|
| | | public int NpcID {
|
| | | get; set;
|
| | | }
|
| | | #endregion
|
| | |
| | | _model.RequestMapTransport(_npcLocation.mapId);
|
| | | m_SwitchMapFinished = false;
|
| | | m_MapID = _npcLocation.mapId;
|
| | | MapResourcesConfig _mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(_npcLocation.mapId, 0);
|
| | | if (_mapResConfig != null)
|
| | | {
|
| | | LoadingWin.targetMapResId = _mapResConfig.ID;
|
| | | }
|
| | | }
|
| | | // 找不到或者是本地图
|
| | | // 找不到可能是客户端对象,也可能是配置不存在
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("PK_Leave");
|
| | | return;
|
| | | }
|
| | | MapResourcesConfig _config = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(npcLocation.mapId, 0);
|
| | | if (_config != null)
|
| | | {
|
| | | LoadingWin.targetMapResId = _config.ID;
|
| | | }
|
| | | else
|
| | | {
|
| | | LoadingWin.targetMapResId = 1;
|
| | | }
|
| | | }
|
| | |
|
| | | _hero.Behaviour.StopHandupAI(true);
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("Map_Delivery");
|
| | | return;
|
| | | }
|
| | |
|
| | | MapResourcesConfig _config = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(mapID, 0);
|
| | | if (_config != null)
|
| | | {
|
| | | LoadingWin.targetMapResId = _config.ID;
|
| | | }
|
| | | else
|
| | | {
|
| | | LoadingWin.targetMapResId = 1;
|
| | | }
|
| | | }
|
| | |
|
| | | _hero.Behaviour.StopHandupAI(true);
|
| | |
| | |
|
| | | if (!AssetSource.sceneFromEditor)
|
| | | {
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(mapId, 0);
|
| | | var assetValid = AssetVersionUtility.IsSceneAssetValid(mapId, 0);
|
| | | if (!assetValid)
|
| | | {
|
| | |
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class PreFightMission : Singleton<PreFightMission>
|
| | | |
| | |
|
| | | {
|
| | | private Vector3 m_FirstTrransferStartPos = new Vector3(183.84f, 62.44f, 25.56f);
|
| | | private Vector3 m_FirstTrransferEndPos = new Vector3(161.33f, 51.545f, 34.84f);
|
| | |
| | |
|
| | | if (h0827.MissionState == 1)
|
| | | {
|
| | | if (StageManager.Instance.isServerPreparing == false)
|
| | | if (StageLoad.Instance.IsServerPrepareOk(ServerType.Main))
|
| | | {
|
| | | HandlerMission(h0827.MissionID);
|
| | | }
|
| | |
| | | //Step_4_BossKilled();
|
| | | m_StartScaleBoss = false;
|
| | |
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | var dataMapId = MapUtility.GetDataMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId, PlayerDatas.Instance.baseData.dungeonLineId);
|
| | | SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music);
|
| | | }
|
| | |
|
| | |
| | | public override void UnInitialize()
|
| | | {
|
| | | base.UnInitialize();
|
| | |
|
| | | WindowCenter.Instance.Close<CreateRoleWin>();
|
| | |
|
| | | #if !UNITY_EDITOR
|
| | | AssetBundleUtility.Instance.UnloadAssetBundle("mob/createrole", true, true);
|
| | | #endif
|
| | |
| | | //AssetPreLoad.Instance.PreLoadNPC(PlayerDatas.Instance.baseData.MapID);
|
| | | SelectionManager.Initiailze();
|
| | |
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | var dataMapId = MapUtility.GetDataMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId, PlayerDatas.Instance.baseData.dungeonLineId);
|
| | |
|
| | | SoundPlayer.Instance.UnLoadMusic(mapResConfig.Music);
|
| | | SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music);
|
| | |
| | |
|
| | | CreateMapTransfer();
|
| | |
|
| | | StartCoroutine(CreateMapArea());
|
| | | StartCoroutine("CreateMapArea");
|
| | |
|
| | | var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | CurrentMapType = (MapType)mapConfig.MapFBType;
|
| | | switch (CurrentMapType)
|
| | | {
|
| | |
| | | {
|
| | | base.UnInitialize();
|
| | |
|
| | | StopAllCoroutines();
|
| | | mapData = null;
|
| | |
|
| | | if (s_MapAreaDict != null)
|
| | |
| | | } |
| | | |
| | | var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID); |
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(); |
| | | var mapResConfig = MapResourcesConfig.GetConfig(JadeDynastyTowerModel.DATA_MAPID, 0); |
| | | |
| | | SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music); |
| | | WindowCenter.Instance.Open<MapNameHintWin>(); |
| | |
| | | }
|
| | |
|
| | | var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(RuneTowerModel.RUNETOWER_MAPID, 0);
|
| | |
|
| | | SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music);
|
| | |
|
| | |
| | | // AssetPreLoad.Instance.PreLoadJobEffect(PlayerDatas.Instance.loginInfo.Job);
|
| | | }
|
| | |
|
| | | public override void UnInitialize()
|
| | | {
|
| | | base.UnInitialize();
|
| | |
|
| | | WindowCenter.Instance.Close<SelectRoleWin>();
|
| | | }
|
| | |
|
| | | protected override void OnStageLoadFinish()
|
| | | {
|
| | | base.OnStageLoadFinish();
|
| | |
| | | |
| | | void Awake() |
| | | { |
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish; |
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish; |
| | | Initialize(); |
| | | } |
| | | |
| | |
| | | |
| | | void OnDestroy() |
| | | { |
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish; |
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish; |
| | | } |
| | | |
| | | void FixedUpdate() |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine.SceneManagement; |
| | | using UnityEngine; |
| | | using Snxxz.UI; |
| | | using System; |
| | | using TableConfig; |
| | | using UnityEngine.Events; |
| | | |
| | | public class StageLoad : SingletonMonobehaviour<StageLoad> |
| | | { |
| | | StageLoadProcessor stageLoadProcessor; |
| | | public float progress { |
| | | get { |
| | | if (stageLoadProcessor != null) |
| | | { |
| | | return stageLoadProcessor.progress; |
| | | } |
| | | else |
| | | { |
| | | return 0f; |
| | | } |
| | | } |
| | | } |
| | | |
| | | Stage m_CurrentStage; |
| | | public Stage currentStage { |
| | | get { return m_CurrentStage; } |
| | | set { m_CurrentStage = value; } |
| | | } |
| | | |
| | | public Stage.E_StageType stageType { |
| | | get { |
| | | return (currentStage != null && currentStage is DungeonStage) ? Stage.E_StageType.Dungeon : Stage.E_StageType.MainCity; |
| | | } |
| | | } |
| | | |
| | | public event Action<int> onStartStageLoadingEvent; |
| | | public UnityAction onStageLoadFinish; |
| | | |
| | | StageLoadCommand currentCommand; |
| | | Queue<StageLoadCommand> commands = new Queue<StageLoadCommand>(); |
| | | |
| | | bool server0109Ok_Main = false; |
| | | bool server0109Ok_CrossServer; |
| | | |
| | | float loadStartTime = 0f; |
| | | public bool isLoading { get; private set; } |
| | | |
| | | public int mapIdRecord { get; private set; } |
| | | public int lineIdRecord { get; private set; } |
| | | |
| | | public void PushSceneLoadCommand(StageLoadCommand command) |
| | | { |
| | | commands.Enqueue(command); |
| | | } |
| | | |
| | | private void ExcuteCommand(StageLoadCommand command) |
| | | { |
| | | var tasks = new Queue<StageLoadProcessor.StageLoadTask>(); |
| | | var needLoadResource = true; |
| | | if (command.needLoadResource) |
| | | { |
| | | if (command.fromMapId != command.toMapId) |
| | | { |
| | | needLoadResource = true; |
| | | } |
| | | else |
| | | { |
| | | var config1 = MapResourcesConfig.GetConfig(MapUtility.GetDataMapId(command.fromMapId), command.fromLineId); |
| | | var config2 = MapResourcesConfig.GetConfig(MapUtility.GetDataMapId(command.toMapId), command.toLineId); |
| | | if (config1 == null || config2 == null) |
| | | { |
| | | needLoadResource = true; |
| | | } |
| | | else |
| | | { |
| | | needLoadResource = config1.MapResources != config2.MapResources; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | needLoadResource = false; |
| | | } |
| | | |
| | | var assetValid = AssetVersionUtility.IsSceneAssetValid(command.toMapId, command.toLineId); |
| | | if (!assetValid) |
| | | { |
| | | tasks.Enqueue(new StageLoadProcessor.Wait0109Task(command)); |
| | | if (command.serverType == ServerType.Main) |
| | | { |
| | | tasks.Enqueue(new StageLoadProcessor.WaitLoginCompleteTask(command)); |
| | | } |
| | | tasks.Enqueue(new StageLoadProcessor.WaitSecondsTask(command, 1)); |
| | | tasks.Enqueue(new StageLoadProcessor.ReturnToNoviceVillageTask(command)); |
| | | } |
| | | else |
| | | { |
| | | if (needLoadResource) |
| | | { |
| | | tasks.Enqueue(new StageLoadProcessor.PreProcessTask(command)); |
| | | tasks.Enqueue(new StageLoadProcessor.UnLoadAndGCTask(command)); |
| | | } |
| | | |
| | | if (needLoadResource && command.needEmpty) |
| | | { |
| | | tasks.Enqueue(new StageLoadProcessor.LoadEmptyTask(command)); |
| | | } |
| | | |
| | | if (needLoadResource) |
| | | { |
| | | tasks.Enqueue(new StageLoadProcessor.LoadNewSceneTask(command)); |
| | | } |
| | | |
| | | if (!command.isClientLoadMap) |
| | | { |
| | | tasks.Enqueue(new StageLoadProcessor.Wait0109Task(command)); |
| | | if (command.serverType == ServerType.Main) |
| | | { |
| | | tasks.Enqueue(new StageLoadProcessor.WaitLoginCompleteTask(command)); |
| | | } |
| | | } |
| | | |
| | | if (needLoadResource) |
| | | { |
| | | tasks.Enqueue(new StageLoadProcessor.PostProcessTask(command)); |
| | | } |
| | | } |
| | | |
| | | UpdateServerFlag(command.serverType, false); |
| | | |
| | | var gameObject = new GameObject("StageLoadProcessor"); |
| | | DontDestroyOnLoad(gameObject); |
| | | stageLoadProcessor = gameObject.AddComponent<StageLoadProcessor>(); |
| | | stageLoadProcessor.Begin(tasks); |
| | | |
| | | StageLoadTimeOutCatcher.Begin(command.toMapId); |
| | | loadStartTime = Time.time; |
| | | isLoading = true; |
| | | } |
| | | |
| | | public void ReportComplete(int mapId, int lineId) |
| | | { |
| | | mapIdRecord = mapId; |
| | | lineIdRecord = lineId; |
| | | isLoading = false; |
| | | StageLoadTimeOutCatcher.Stop(); |
| | | |
| | | if (stageLoadProcessor != null) |
| | | { |
| | | DestroyImmediate(stageLoadProcessor.gameObject); |
| | | stageLoadProcessor = null; |
| | | } |
| | | } |
| | | |
| | | public void UpdateServerFlag(ServerType serverType, bool ok) |
| | | { |
| | | if (ok) |
| | | { |
| | | if (currentCommand != null && !currentCommand.serverFlag0109) |
| | | { |
| | | currentCommand.serverFlag0109 = true; |
| | | } |
| | | else |
| | | { |
| | | foreach (var command in commands) |
| | | { |
| | | if (command.serverType == serverType && !command.serverFlag0109) |
| | | { |
| | | command.serverFlag0109 = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | switch (serverType) |
| | | { |
| | | case ServerType.Main: |
| | | server0109Ok_Main = ok; |
| | | break; |
| | | case ServerType.CrossSever: |
| | | server0109Ok_CrossServer = ok; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | public void BroadcastStageLoadStartEvent(int mapId) |
| | | { |
| | | if (onStartStageLoadingEvent != null) |
| | | { |
| | | onStartStageLoadingEvent(mapId); |
| | | } |
| | | } |
| | | |
| | | public void BroadcastStageLoadEndEvent() |
| | | { |
| | | if (onStageLoadFinish != null) |
| | | { |
| | | onStageLoadFinish(); |
| | | } |
| | | } |
| | | |
| | | void Update() |
| | | { |
| | | if (!isLoading && commands.Count > 0) |
| | | { |
| | | currentCommand = commands.Dequeue(); |
| | | currentCommand.fromMapId = mapIdRecord; |
| | | currentCommand.fromLineId = lineIdRecord; |
| | | ExcuteCommand(currentCommand); |
| | | } |
| | | |
| | | if (isLoading) |
| | | { |
| | | if (Time.time - loadStartTime > 25f) |
| | | { |
| | | if (stageLoadProcessor != null) |
| | | { |
| | | DestroyImmediate(stageLoadProcessor.gameObject); |
| | | stageLoadProcessor = null; |
| | | } |
| | | |
| | | currentCommand = null; |
| | | isLoading = false; |
| | | commands.Clear(); |
| | | StageLoadTimeOutCatcher.ReportLoadingOverTime(); |
| | | GameNetSystem.Instance.Reconnect(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public class StageLoadCommand |
| | | { |
| | | public int fromMapId; |
| | | public int fromLineId; |
| | | public int toMapId; |
| | | public int toLineId; |
| | | |
| | | public bool needEmpty; |
| | | public ServerType serverType; |
| | | public bool isClientLoadMap; |
| | | public bool needLoadResource; |
| | | |
| | | public bool serverFlag0109 = false; |
| | | } |
| | | |
| | | public bool IsServerPrepareOk(ServerType socketType) |
| | | { |
| | | switch (socketType) |
| | | { |
| | | case ServerType.Main: |
| | | return server0109Ok_Main; |
| | | case ServerType.CrossSever: |
| | | return server0109Ok_CrossServer; |
| | | default: |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | int m_InitHeroStep = -1; |
| | | public int initHeroStep { get { return m_InitHeroStep; } } |
| | | |
| | | public void InitHero() |
| | | { |
| | | m_InitHeroStep = 0; |
| | | |
| | | // 初始化摄像机 |
| | | if (!CameraController.Instance) |
| | | { |
| | | UnityEngine.Object.Instantiate(BuiltInLoader.LoadPrefab("GameCamera")); |
| | | CameraController.Instance.AcceptInput = false; |
| | | CameraController.Instance.CameraObject.enabled = false; |
| | | } |
| | | |
| | | m_InitHeroStep = 1; |
| | | var hero = PlayerDatas.Instance.hero; |
| | | if (hero == null) |
| | | { |
| | | hero = GAMgr.Instance.RequestPlayer<GA_Hero>(PlayerDatas.Instance.PlayerId, E_ActorGroup.User, null); |
| | | } |
| | | |
| | | m_InitHeroStep = 2; |
| | | hero.State = E_ActorState.Idle; |
| | | hero.ActorInfo.ResetHp((int)PlayerDatas.Instance.baseData.HP, -1, (int)PlayerDatas.Instance.extersion.MaxHP); |
| | | hero.CalculateMoveSpeed((ushort)PlayerDatas.Instance.extersion.SpeedValue); |
| | | hero.CalculateAtkSpeed(PlayerDatas.Instance.extersion.battleValEx1); |
| | | hero.InitBornPos(PlayerDatas.Instance.baseData.PosX, PlayerDatas.Instance.baseData.PosY); |
| | | m_InitHeroStep = 3; |
| | | CameraController.Instance.SetLookTarget(hero.Root); |
| | | CameraController.Instance.Apply(); |
| | | |
| | | var packModel = ModelCenter.Instance.GetModel<PlayerPackModel>(); |
| | | var equipModel = packModel.GetSinglePackModel(PackType.rptEquip); |
| | | |
| | | var itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retClothes); |
| | | var fashion = equipModel.GetItemModelByIndex((int)RoleEquipType.retFashionClothes); |
| | | m_InitHeroStep = 4; |
| | | if (fashion != null) |
| | | { |
| | | hero.SwitchClothes((uint)fashion.itemInfo.ItemID, (int)RoleEquipType.retFashionClothes); |
| | | } |
| | | else if (itemModel != null) |
| | | { |
| | | hero.SwitchClothes((uint)itemModel.itemInfo.ItemID); |
| | | } |
| | | else |
| | | { |
| | | hero.SwitchClothes(0); |
| | | } |
| | | |
| | | m_InitHeroStep = 5; |
| | | |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retWeapon); |
| | | fashion = equipModel.GetItemModelByIndex((int)RoleEquipType.retFashionWeapon); |
| | | |
| | | if (fashion != null) |
| | | { |
| | | hero.SwitchWeapon((uint)fashion.itemInfo.ItemID, (int)RoleEquipType.retFashionWeapon); |
| | | } |
| | | else if (itemModel != null) |
| | | { |
| | | hero.SwitchWeapon((uint)itemModel.itemInfo.ItemID); |
| | | } |
| | | else |
| | | { |
| | | hero.SwitchWeapon(0); |
| | | } |
| | | |
| | | m_InitHeroStep = 6; |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retWeapon2); |
| | | fashion = equipModel.GetItemModelByIndex((int)RoleEquipType.retFashionWeapon2); |
| | | |
| | | if (fashion != null) |
| | | { |
| | | hero.SwitchSecondary((uint)fashion.itemInfo.ItemID, (int)RoleEquipType.retFashionWeapon2); |
| | | } |
| | | else if (itemModel != null) |
| | | { |
| | | hero.SwitchSecondary((uint)itemModel.itemInfo.ItemID); |
| | | } |
| | | else |
| | | { |
| | | hero.SwitchSecondary(0); |
| | | } |
| | | |
| | | m_InitHeroStep = 7; |
| | | |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retWing); |
| | | if (itemModel != null) |
| | | { |
| | | hero.SwitchWing((uint)itemModel.itemInfo.ItemID); |
| | | } |
| | | |
| | | m_InitHeroStep = 8; |
| | | var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID); |
| | | if (mapConfig.CanRide == 1) |
| | | { |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.mount); |
| | | if (itemModel != null) |
| | | { |
| | | var mountModel = ModelCenter.Instance.GetModel<PlayerMountDatas>(); |
| | | if (mountModel.HorseRidingBool) |
| | | { |
| | | hero.OnHorse(1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | m_InitHeroStep = 9; |
| | | |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retSpiritAnimal); |
| | | if (itemModel != null) |
| | | { |
| | | hero.SwitchGuard((uint)itemModel.itemInfo.ItemID); |
| | | } |
| | | |
| | | m_InitHeroStep = 10; |
| | | |
| | | hero.SyncSuitEffect(); |
| | | |
| | | m_InitHeroStep = 11; |
| | | hero.IdleImmediate(); |
| | | |
| | | hero.SetFairyLeagueHeadUp(PlayerDatas.Instance.baseData.MapID == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON); |
| | | hero.CheckAncientHeadUp(); |
| | | |
| | | m_InitHeroStep = 12; |
| | | var titleId = 0; |
| | | if (PlayerDatas.Instance.baseData.MapID != 31160) |
| | | { |
| | | var titelModel = ModelCenter.Instance.GetModel<TitleModel>(); |
| | | var title = titelModel.GetTitleEquip(); |
| | | titleId = title != null && titelModel.IsTitleGain(title.id) ? title.id : 0; |
| | | } |
| | | hero.SwitchTitle((uint)titleId); |
| | | |
| | | m_InitHeroStep = 13; |
| | | // 判断buff |
| | | if (StatusMgr.Instance.IsExist(PlayerDatas.Instance.PlayerId, StatusMgr.Instance.redNameBuffID)) |
| | | { |
| | | hero.SwitchRedName(true); |
| | | } |
| | | |
| | | hero.RequestLight(); |
| | | |
| | | m_InitHeroStep = 14; |
| | | PlayerDatas.Instance.hero = hero; |
| | | |
| | | var preLoadSkillEffects = GeneralDefine.PreloadSkillEffect[hero.JobSetup.Job - 1]; |
| | | if (preLoadSkillEffects != null && preLoadSkillEffects.Length > 0) |
| | | { |
| | | foreach (var _id in preLoadSkillEffects) |
| | | { |
| | | InstanceResourcesLoader.PreloadSkillEffect(_id); |
| | | } |
| | | } |
| | | |
| | | m_InitHeroStep = 15; |
| | | } |
| | | |
| | | } |
copy from Lua/Gen/StageManagerWrap.cs.meta
copy to Fight/Stage/StageLoad.cs.meta
| File was copied from Lua/Gen/StageManagerWrap.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1316663bef8bbed4f99dc61ee61da170 |
| | | timeCreated: 1548853305 |
| | | guid: c641db783d83ae7448214778dc062f31 |
| | | timeCreated: 1548408152 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using UnityEngine.SceneManagement; |
| | | using Snxxz.UI; |
| | | using TableConfig; |
| | | using System; |
| | | |
| | | public class StageLoadProcessor : MonoBehaviour |
| | | { |
| | | float progressBuf = 0.1f; |
| | | public float progress { get; private set; } |
| | | |
| | | StageLoadTask currentTask = null; |
| | | Queue<StageLoadTask> tasks = new Queue<StageLoadTask>(); |
| | | |
| | | public void Begin(Queue<StageLoadTask> tasks) |
| | | { |
| | | this.tasks = tasks; |
| | | var totalWeight = 0f; |
| | | foreach (var task in tasks) |
| | | { |
| | | totalWeight += task.exceptedWeight; |
| | | } |
| | | |
| | | foreach (var task in tasks) |
| | | { |
| | | task.weight = task.exceptedWeight / totalWeight; |
| | | } |
| | | } |
| | | |
| | | public void Complete(int mapId, int lineId) |
| | | { |
| | | StageLoad.Instance.ReportComplete(mapId, lineId); |
| | | } |
| | | |
| | | private void Update() |
| | | { |
| | | if (currentTask == null) |
| | | { |
| | | if (tasks.Count > 0) |
| | | { |
| | | currentTask = tasks.Dequeue(); |
| | | currentTask.Begin(); |
| | | } |
| | | } |
| | | |
| | | if (currentTask != null) |
| | | { |
| | | currentTask.Update(); |
| | | if (!currentTask.done) |
| | | { |
| | | progress = Mathf.Clamp01(progressBuf + currentTask.weight * currentTask.progress); |
| | | } |
| | | else |
| | | { |
| | | progressBuf += currentTask.weight; |
| | | currentTask.End(); |
| | | if (tasks.Count == 0) |
| | | { |
| | | Complete(currentTask.command.toMapId, currentTask.command.toLineId); |
| | | } |
| | | |
| | | currentTask = null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public abstract class StageLoadTask |
| | | { |
| | | public float timer { get; protected set; } |
| | | public float duration { get; protected set; } |
| | | public bool done { get; protected set; } |
| | | public float progress { get; protected set; } |
| | | |
| | | public float exceptedWeight { get; protected set; } |
| | | public float weight { get; set; } |
| | | |
| | | public readonly StageLoad.StageLoadCommand command; |
| | | |
| | | public StageLoadTask(StageLoad.StageLoadCommand command) |
| | | { |
| | | this.command = command; |
| | | } |
| | | |
| | | public abstract void Begin(); |
| | | public abstract void Update(); |
| | | public abstract void End(); |
| | | } |
| | | |
| | | public class PreProcessTask : StageLoadTask |
| | | { |
| | | public PreProcessTask(StageLoad.StageLoadCommand command) : base(command) |
| | | { |
| | | exceptedWeight = 0.1f; |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | SystemSetting.Instance.LetFPSUnLimit(); |
| | | Application.backgroundLoadingPriority = ThreadPriority.High; |
| | | StageLoad.Instance.BroadcastStageLoadStartEvent(command.fromMapId); |
| | | try |
| | | { |
| | | //为什么在这个地方要调用两次关闭其他窗口的接口呢,这个水就深了。 |
| | | //因为有些界面被关闭的时候,会去打开主界面,所以,还得再关闭一次关闭其他窗口的界面,防止主界面被意外开启。 |
| | | WindowCenter.Instance.asyncLoad.StopAllTasks(); |
| | | switch (command.toMapId) |
| | | { |
| | | case 2: |
| | | case 3: |
| | | WindowCenter.Instance.DestoryWinsByStage(WindowCenter.WindowStage.Login); |
| | | WindowCenter.Instance.CloseOthers<LaunchBackGroundWin>(); |
| | | if (!WindowCenter.Instance.IsOpen<LaunchBackGroundWin>()) |
| | | { |
| | | WindowCenter.Instance.Open<LaunchBackGroundWin>(true); |
| | | } |
| | | |
| | | WindowCenter.Instance.CloseOthers<LaunchBackGroundWin>(); |
| | | break; |
| | | case 1: |
| | | WindowCenter.Instance.DestoryWinsByStage(WindowCenter.WindowStage.Launch); |
| | | WindowCenter.Instance.CloseOthers<LaunchBackGroundWin>(); |
| | | if (!WindowCenter.Instance.IsOpen<LaunchBackGroundWin>()) |
| | | { |
| | | WindowCenter.Instance.Open<LaunchBackGroundWin>(true); |
| | | } |
| | | |
| | | WindowCenter.Instance.CloseOthers<LaunchBackGroundWin>(); |
| | | break; |
| | | default: |
| | | WindowCenter.Instance.DestoryWinsByStage(WindowCenter.WindowStage.SelectRole); |
| | | WindowCenter.Instance.CloseOthers<LoadingWin>(); |
| | | if (!WindowCenter.Instance.IsOpen<LoadingWin>()) |
| | | { |
| | | var dataMapId = MapUtility.GetDataMapId(command.toMapId); |
| | | var lineId = MapUtility.GetLineId(command.toMapId, command.toLineId); |
| | | var config = MapResourcesConfig.GetConfig(dataMapId, lineId); |
| | | LoadingWin.targetMapResId = config.ID; |
| | | WindowCenter.Instance.Open<LoadingWin>(true); |
| | | } |
| | | |
| | | WindowCenter.Instance.CloseOthers<LoadingWin>(); |
| | | break; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | ExceptionCatcher.ReportException("场景加载 Step3", ex); |
| | | } |
| | | |
| | | done = true; |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | } |
| | | } |
| | | |
| | | public class LoadEmptyTask : StageLoadTask |
| | | { |
| | | public LoadEmptyTask(StageLoad.StageLoadCommand command) : base(command) |
| | | { |
| | | exceptedWeight = 0.2f; |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | duration = 0.2f; |
| | | SceneManager.LoadScene("Empty"); |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (timer > duration) |
| | | { |
| | | done = true; |
| | | progress = timer / duration; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public class UnLoadAndGCTask : StageLoadTask |
| | | { |
| | | AsyncOperation unloadUnUsedOperation; |
| | | |
| | | public UnLoadAndGCTask(StageLoad.StageLoadCommand command) : base(command) |
| | | { |
| | | exceptedWeight = 0.2f; |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | if (StageLoad.Instance.currentStage != null) |
| | | { |
| | | StageLoad.Instance.currentStage.UnInitialize(); |
| | | } |
| | | |
| | | unloadUnUsedOperation = Resources.UnloadUnusedAssets(); |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | if (!AssetSource.sceneFromEditor) |
| | | { |
| | | AssetBundleUtility.Instance.UnloadAssetBundle("maps/map000_xsdt", true, false); |
| | | var lastMapId = command.fromMapId; |
| | | var lastLineId = command.fromLineId; |
| | | var assetBundleName = GetAssetBundleNameByMapId(lastMapId, lastLineId); |
| | | if (!string.IsNullOrEmpty(assetBundleName)) |
| | | { |
| | | AssetBundleUtility.Instance.UnloadAssetBundle(assetBundleName, true, false); |
| | | } |
| | | } |
| | | |
| | | GC.Collect(); |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (unloadUnUsedOperation != null) |
| | | { |
| | | done = unloadUnUsedOperation.isDone; |
| | | progress = unloadUnUsedOperation.progress; |
| | | } |
| | | else |
| | | { |
| | | done = true; |
| | | progress = 1f; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public class LoadNewSceneTask : StageLoadTask |
| | | { |
| | | AsyncOperation operation; |
| | | |
| | | public LoadNewSceneTask(StageLoad.StageLoadCommand command) : base(command) |
| | | { |
| | | exceptedWeight = 0.4f; |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | var mapId = command.toMapId; |
| | | var lineId = command.toLineId; |
| | | if (!AssetSource.sceneFromEditor) |
| | | { |
| | | var assetBundleName = GetAssetBundleNameByMapId(mapId, lineId); |
| | | AssetBundleUtility.Instance.Sync_LoadAll(assetBundleName); |
| | | } |
| | | |
| | | switch (command.toMapId) |
| | | { |
| | | case 1: |
| | | operation = SceneManager.LoadSceneAsync("Level_Login"); |
| | | break; |
| | | case 2: |
| | | case 3: |
| | | operation = SceneManager.LoadSceneAsync("CreateRole_001"); |
| | | break; |
| | | default: |
| | | var dataMapId = MapUtility.GetDataMapId(mapId); |
| | | var config = MapResourcesConfig.GetConfig(dataMapId, lineId); |
| | | operation = SceneManager.LoadSceneAsync(config.MapResources); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | var mapId = command.toMapId; |
| | | var lineId = command.toLineId; |
| | | |
| | | var levelName = string.Empty; |
| | | switch (mapId) |
| | | { |
| | | case 1: |
| | | levelName = "__Stage_Level_Login_"; |
| | | break; |
| | | case 2: |
| | | case 3: |
| | | levelName = "__Stage_CreateRole_001_"; |
| | | break; |
| | | default: |
| | | try |
| | | { |
| | | StageLoad.Instance.InitHero(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ExceptionCatcher.ReportException("场景加载 InitHero 执行到: " + StageLoad.Instance.initHeroStep, ex); |
| | | } |
| | | |
| | | var dataMapId = MapUtility.GetDataMapId(mapId); |
| | | var config = MapResourcesConfig.GetConfig(dataMapId, lineId); |
| | | levelName = string.Format("__Stage_{0}_", config.MapResources); |
| | | break; |
| | | } |
| | | |
| | | var stageGameObject = new GameObject(levelName); |
| | | Stage stage; |
| | | switch (mapId) |
| | | { |
| | | case 1: |
| | | stage = stageGameObject.AddComponent<LoginStage>(); |
| | | break; |
| | | case 2: |
| | | stage = stageGameObject.AddComponent<CreateRoleStage>(); |
| | | break; |
| | | case 3: |
| | | stage = stageGameObject.AddComponent<SelectRoleStage>(); |
| | | break; |
| | | case 31250: |
| | | stage = stageGameObject.AddComponent<GuardDungeonStage>(); |
| | | break; |
| | | case RuneTowerModel.RUNETOWER_MAPID: |
| | | stage = stageGameObject.AddComponent<RuneTowerDungeonStage>(); |
| | | break; |
| | | case JadeDynastyTowerModel.DATA_MAPID: |
| | | stage = stageGameObject.AddComponent<JadeDynastyTowerDungeonStage>(); |
| | | break; |
| | | case DemonJarModel.DEMONJAR_SINGLEMAPID: |
| | | stage = stageGameObject.AddComponent<FakeDemonJarDungeonStage>(); |
| | | break; |
| | | default: |
| | | stage = stageGameObject.AddComponent<DungeonStage>(); |
| | | break; |
| | | } |
| | | |
| | | stage.mapId = mapId; |
| | | StageLoad.Instance.currentStage = stage; |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (operation != null) |
| | | { |
| | | done = operation.isDone; |
| | | progress = operation.progress; |
| | | } |
| | | else |
| | | { |
| | | done = true; |
| | | progress = 1f; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public class Wait0109Task : StageLoadTask |
| | | { |
| | | public Wait0109Task(StageLoad.StageLoadCommand command) : base(command) |
| | | { |
| | | exceptedWeight = 0.1f; |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | duration = 1f; |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | var mapOk = new C0107_tagCInitMapOK(); |
| | | mapOk.MapID = (ushort)command.toMapId; |
| | | mapOk.Type = 0; |
| | | StageLoadTimeOutCatcher.RecordProtocol(command.serverType, "0107", DateTime.Now); |
| | | |
| | | switch (command.serverType) |
| | | { |
| | | case ServerType.Main: |
| | | GameNetSystem.Instance.SendInfo(mapOk); |
| | | break; |
| | | case ServerType.CrossSever: |
| | | GameNetSystem.Instance.SendToCrossServer(mapOk); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (!command.serverFlag0109) |
| | | { |
| | | done = false; |
| | | progress = timer / duration; |
| | | } |
| | | else |
| | | { |
| | | done = true; |
| | | progress = 1f; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public class WaitLoginCompleteTask : StageLoadTask |
| | | { |
| | | public WaitLoginCompleteTask(StageLoad.StageLoadCommand command) : base(command) |
| | | { |
| | | exceptedWeight = 0.2f; |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | duration = 2f; |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (DTC0403_tagPlayerLoginLoadOK.neverLoginOk) |
| | | { |
| | | done = false; |
| | | progress = timer / duration; |
| | | } |
| | | else |
| | | { |
| | | done = true; |
| | | progress = 1f; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public class PostProcessTask : StageLoadTask |
| | | { |
| | | public PostProcessTask(StageLoad.StageLoadCommand command) : base(command) |
| | | { |
| | | exceptedWeight = 0.1f; |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | StageLoad.Instance.BroadcastStageLoadEndEvent(); |
| | | WindowCenter.Instance.Close<LoadingWin>(); |
| | | SystemSetting.Instance.SetGameFps(SystemSetting.Instance.GetGameFps()); |
| | | |
| | | foreach (var actor in GAMgr.Instance.reAdjustPosList) |
| | | { |
| | | actor.AdjustPos((ushort)actor.ActorInfo.serverBornPos.x, (ushort)actor.ActorInfo.serverBornPos.y); |
| | | } |
| | | |
| | | GAMgr.Instance.reAdjustPosList.Clear(); |
| | | done = true; |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | Application.backgroundLoadingPriority = ThreadPriority.BelowNormal; |
| | | DebugEx.LogFormat("StageLoad => Load Scene : {0} Finished.", command.toMapId); |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | public class WaitSecondsTask : StageLoadTask |
| | | { |
| | | public WaitSecondsTask(StageLoad.StageLoadCommand command, float seconds) : base(command) |
| | | { |
| | | duration = seconds; |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (timer > duration) |
| | | { |
| | | done = true; |
| | | } |
| | | else |
| | | { |
| | | done = false; |
| | | progress = timer / duration; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public class ReturnToNoviceVillageTask : StageLoadTask |
| | | { |
| | | public ReturnToNoviceVillageTask(StageLoad.StageLoadCommand command) : base(command) |
| | | { |
| | | } |
| | | |
| | | public override void Begin() |
| | | { |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | var sendInfo = new CC003_tagCGForceQuitCrossState(); |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | else |
| | | { |
| | | var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID); |
| | | if (mapConfig.MapFBType == (int)MapType.OpenCountry) |
| | | { |
| | | var sjzMapConfig = Config.Instance.Get<MapConfig>(10010); |
| | | var position = new Vector3(sjzMapConfig.BornPoints[0].x, 0, sjzMapConfig.BornPoints[0].y); |
| | | MapTransferUtility.Send_WorldTransfer(10010, position, MapTransferType.WorldTransport, 255, 0); |
| | | } |
| | | else |
| | | { |
| | | ModelCenter.Instance.GetModel<DungeonModel>().ExitCurrentDungeon(); |
| | | } |
| | | } |
| | | |
| | | done = true; |
| | | } |
| | | |
| | | public override void End() |
| | | { |
| | | } |
| | | |
| | | public override void Update() |
| | | { |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | private static string GetAssetBundleNameByMapId(int mapId, int lineId) |
| | | { |
| | | switch (mapId) |
| | | { |
| | | case 0: |
| | | return string.Empty; |
| | | case 1: |
| | | return "maps/level_login"; |
| | | case 2: |
| | | case 3: |
| | | return "maps/createrole_001"; |
| | | default: |
| | | var dataMapId = MapUtility.GetDataMapId(mapId); |
| | | var config = MapResourcesConfig.GetConfig(dataMapId, lineId); |
| | | if (config != null) |
| | | { |
| | | return StringUtility.Contact("maps/", config.MapResources); |
| | | } |
| | | else |
| | | { |
| | | return string.Empty; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
copy from Lua/Gen/StageManagerWrap.cs.meta
copy to Fight/Stage/StageLoadProcessor.cs.meta
| File was copied from Lua/Gen/StageManagerWrap.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1316663bef8bbed4f99dc61ee61da170 |
| | | timeCreated: 1548853305 |
| | | guid: 3130d36ee2ece704cad55a9585d2c528 |
| | | timeCreated: 1548835160 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | #endif |
| | | } |
| | | |
| | | public System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, Snxxz.UI.JadeDynastyEquipModel.JadeDynastySuitAttrData>> __Gen_Delegate_Imp194(object p0) |
| | | public Snxxz.UI.JadeDynastyGemModel __Gen_Delegate_Imp194(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.rawL; |
| | | int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | translator.PushAny(L, p0); |
| | | |
| | | PCall(L, 1, 1, errFunc); |
| | | |
| | | |
| | | Snxxz.UI.JadeDynastyGemModel __gen_ret = (Snxxz.UI.JadeDynastyGemModel)translator.GetObject(L, errFunc + 1, typeof(Snxxz.UI.JadeDynastyGemModel)); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, Snxxz.UI.JadeDynastyEquipModel.JadeDynastySuitAttrData>> __Gen_Delegate_Imp195(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, Snxxz.UI.JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData>> __Gen_Delegate_Imp195(object p0) |
| | | public System.Collections.Generic.Dictionary<int, System.Collections.Generic.Dictionary<int, Snxxz.UI.JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData>> __Gen_Delegate_Imp196(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public void __Gen_Delegate_Imp196(object p0, object p1, object p2) |
| | | public void __Gen_Delegate_Imp197(object p0, object p1, object p2) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp197(object p0, int p1, int p2, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastySuitAttrData p3) |
| | | public bool __Gen_Delegate_Imp198(object p0, int p1, int p2, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastySuitAttrData p3) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp198(object p0, int p1, int p2, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData p3) |
| | | public bool __Gen_Delegate_Imp199(object p0, int p1, int p2, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData p3) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp199(object p0, int p1, int p2, out int p3) |
| | | public bool __Gen_Delegate_Imp200(object p0, int p1, int p2, out int p3) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public System.Collections.Generic.List<int> __Gen_Delegate_Imp200(object p0, int p1) |
| | | public System.Collections.Generic.List<int> __Gen_Delegate_Imp201(object p0, int p1) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp201(object p0, out System.Collections.Generic.List<int> p1, out System.Collections.Generic.List<int> p2) |
| | | public bool __Gen_Delegate_Imp202(object p0, out System.Collections.Generic.List<int> p1, out System.Collections.Generic.List<int> p2) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp202(object p0, int p1, PackType p2, out int p3, out int p4, int p5) |
| | | public bool __Gen_Delegate_Imp203(object p0, int p1, PackType p2, out int p3, out int p4, int p5) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp203(object p0, int p1, out int p2, out int p3) |
| | | public bool __Gen_Delegate_Imp204(object p0, int p1, out int p2, out int p3) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp204(object p0, int p1, PackType p2, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastySuitAttrData p3, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastySuitAttrData p4, int p5) |
| | | public bool __Gen_Delegate_Imp205(object p0, int p1, PackType p2, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastySuitAttrData p3, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastySuitAttrData p4, int p5) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public bool __Gen_Delegate_Imp205(object p0, int p1, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData p2, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData p3) |
| | | public bool __Gen_Delegate_Imp206(object p0, int p1, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData p2, out Snxxz.UI.JadeDynastyEquipModel.JadeDynastyStoneSuitAttrData p3) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | #endif |
| | | } |
| | | |
| | | public Snxxz.UI.GemModel __Gen_Delegate_Imp206(object p0) |
| | | public Snxxz.UI.GemModel __Gen_Delegate_Imp207(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | |
| | | |
| | | Snxxz.UI.GemModel __gen_ret = (Snxxz.UI.GemModel)translator.GetObject(L, errFunc + 1, typeof(Snxxz.UI.GemModel)); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public Snxxz.UI.JadeDynastyGemModel __Gen_Delegate_Imp207(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | | { |
| | | #endif |
| | | RealStatePtr L = luaEnv.rawL; |
| | | int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | translator.PushAny(L, p0); |
| | | |
| | | PCall(L, 1, 1, errFunc); |
| | | |
| | | |
| | | Snxxz.UI.JadeDynastyGemModel __gen_ret = (Snxxz.UI.JadeDynastyGemModel)translator.GetObject(L, errFunc + 1, typeof(Snxxz.UI.JadeDynastyGemModel)); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a0b56727fd4fea343b550221deb3c6ae |
| | | timeCreated: 1548853313 |
| | | timeCreated: 1548941105 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | |
| | | { |
| | | GameNetPackBasic _protocol = (GameNetPackBasic)translator.GetObject(L, 2, typeof(GameNetPackBasic)); |
| | | GameNetSystem.SocketType _type;translator.Get(L, 3, out _type); |
| | | ServerType _type;translator.Get(L, 3, out _type); |
| | | |
| | | gen_to_be_invoked.PushPackage( _protocol, _type ); |
| | | |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.FestivalRedpackModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 21, 19, 8); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 23, 20, 8); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnReceivePackage", _m_OnReceivePackage); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ExistSelfTaskRedpack", _m_ExistSelfTaskRedpack); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "JudgePlayRedpackVoice", _m_JudgePlayRedpackVoice); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ExistRewardableRedpack", _m_ExistRewardableRedpack); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetDayRemind", _m_SetDayRemind); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "onStateUpate", _e_onStateUpate); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "redpackGrabRefresh", _e_redpackGrabRefresh); |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "systemRedpoint", _g_get_systemRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "taskRedpoint", _g_get_taskRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "receiveRedpoint", _g_get_receiveRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "dailyRemindRedpoint", _g_get_dailyRemindRedpoint); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "systemOverdueCount", _s_set_systemOverdueCount); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectType", _s_set_selectType); |
| | |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_ExistRewardableRedpack(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.FestivalRedpackModel gen_to_be_invoked = (Snxxz.UI.FestivalRedpackModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | bool gen_ret = gen_to_be_invoked.ExistRewardableRedpack( ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SetDayRemind(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.FestivalRedpackModel gen_to_be_invoked = (Snxxz.UI.FestivalRedpackModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.SetDayRemind( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_dailyRemindRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.FestivalRedpackModel gen_to_be_invoked = (Snxxz.UI.FestivalRedpackModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.dailyRemindRedpoint); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | |
| | | fileFormatVersion: 2 |
| | | guid: da6d3363c2b5f9942a1af9c701612ac6 |
| | | timeCreated: 1548853784 |
| | | timeCreated: 1548941109 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.GemModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 22, 14, 8); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 22, 15, 9); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "levelUpType", _g_get_levelUpType); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "equipGemTypeDict", _g_get_equipGemTypeDict); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "gemGetWays", _g_get_gemGetWays); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "gemHighestLevelDict", _g_get_gemHighestLevelDict); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "redpointList", _g_get_redpointList); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "gemHoleReds", _g_get_gemHoleReds); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "gemComposeReds", _g_get_gemComposeReds); |
| | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "levelUpType", _s_set_levelUpType); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "equipGemTypeDict", _s_set_equipGemTypeDict); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "gemGetWays", _s_set_gemGetWays); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "gemHighestLevelDict", _s_set_gemHighestLevelDict); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "redpointList", _s_set_redpointList); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "gemHoleReds", _s_set_gemHoleReds); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "gemComposeReds", _s_set_gemComposeReds); |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_gemHighestLevelDict(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.GemModel gen_to_be_invoked = (Snxxz.UI.GemModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.gemHighestLevelDict); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_redpointList(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_gemHighestLevelDict(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.GemModel gen_to_be_invoked = (Snxxz.UI.GemModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.gemHighestLevelDict = (System.Collections.Generic.Dictionary<int, int>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, int>)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_redpointList(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e1af0ed99f284084398c25bca779fa01 |
| | | timeCreated: 1548853317 |
| | | timeCreated: 1548941109 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.JadeDynastyEquipModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 38, 18, 1); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 42, 18, 1); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsLocalSaveActiveSuit", _m_IsLocalSaveActiveSuit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsLocalSaveActiveStoneSuit", _m_IsLocalSaveActiveStoneSuit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsLocalSaveUnLock", _m_IsLocalSaveUnLock); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsPlaySuitPlayerEffect", _m_IsPlaySuitPlayerEffect); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopPlaySuitEffect", _m_StopPlaySuitEffect); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsPlayStoneSuitEffect", _m_IsPlayStoneSuitEffect); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopPlayStoneSuitEffect", _m_StopPlayStoneSuitEffect); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetEquipPaths", _m_TryGetEquipPaths); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetJadeDynastyEquipIndex", _m_TryGetJadeDynastyEquipIndex); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetJadeDynastyEquipPlace", _m_GetJadeDynastyEquipPlace); |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_IsPlaySuitPlayerEffect(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.JadeDynastyEquipModel gen_to_be_invoked = (Snxxz.UI.JadeDynastyEquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsPlaySuitPlayerEffect( ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_StopPlaySuitEffect(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.JadeDynastyEquipModel gen_to_be_invoked = (Snxxz.UI.JadeDynastyEquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& translator.Assignable<UIEffect>(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | UIEffect _effect = (UIEffect)translator.GetObject(L, 2, typeof(UIEffect)); |
| | | bool _isSave = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | gen_to_be_invoked.StopPlaySuitEffect( _effect, _isSave ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 2&& translator.Assignable<UIEffect>(L, 2)) |
| | | { |
| | | UIEffect _effect = (UIEffect)translator.GetObject(L, 2, typeof(UIEffect)); |
| | | |
| | | gen_to_be_invoked.StopPlaySuitEffect( _effect ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.JadeDynastyEquipModel.StopPlaySuitEffect!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_IsPlayStoneSuitEffect(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.JadeDynastyEquipModel gen_to_be_invoked = (Snxxz.UI.JadeDynastyEquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsPlayStoneSuitEffect( ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_StopPlayStoneSuitEffect(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.JadeDynastyEquipModel gen_to_be_invoked = (Snxxz.UI.JadeDynastyEquipModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& translator.Assignable<UIEffect>(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | UIEffect _effect = (UIEffect)translator.GetObject(L, 2, typeof(UIEffect)); |
| | | bool _isSave = LuaAPI.lua_toboolean(L, 3); |
| | | |
| | | gen_to_be_invoked.StopPlayStoneSuitEffect( _effect, _isSave ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 2&& translator.Assignable<UIEffect>(L, 2)) |
| | | { |
| | | UIEffect _effect = (UIEffect)translator.GetObject(L, 2, typeof(UIEffect)); |
| | | |
| | | gen_to_be_invoked.StopPlayStoneSuitEffect( _effect ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.JadeDynastyEquipModel.StopPlayStoneSuitEffect!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_TryGetEquipPaths(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9055d8e221cb52d46aa071f5311cd678 |
| | | timeCreated: 1548853312 |
| | | timeCreated: 1548941104 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.MagicianModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 39, 13, 7); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 39, 14, 7); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "godWeaponUpdate", _e_godWeaponUpdate); |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "godWeaponTypes", _g_get_godWeaponTypes); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "godWeaponBoxDict", _g_get_godWeaponBoxDict); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "godWeaponEffectTypes", _g_get_godWeaponEffectTypes); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "godWeaponIcons", _g_get_godWeaponIcons); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectType", _g_get_selectType); |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_godWeaponBoxDict(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.godWeaponBoxDict); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_godWeaponEffectTypes(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 537bb89ce2b047a4699d1cea51db63bb |
| | | timeCreated: 1548853309 |
| | | timeCreated: 1548941100 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | translator.DelayWrapLoader(typeof(StoryHintModel), StoryHintModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(StageManager), StageManagerWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(LuaBehaviour), LuaBehaviourWrap.__Register); |
| | | |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.Time), UnityEngineTimeWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.GameObject), UnityEngineGameObjectWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit1(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.GameObject), UnityEngineGameObjectWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(UnityEngine.Component), UnityEngineComponentWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DogzModel), SnxxzUIDogzModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DogzPackModel), SnxxzUIDogzPackModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit2(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DogzPackModel), SnxxzUIDogzPackModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.DogzDungeonModel), SnxxzUIDogzDungeonModelWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.PackSendQuestMgr), SnxxzUIPackSendQuestMgrWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.PlayerPackModel), SnxxzUIPlayerPackModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit3(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.PlayerPackModel), SnxxzUIPlayerPackModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.TreasureEffectModel), SnxxzUITreasureEffectModelWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RedpointCenter), SnxxzUIRedpointCenterWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.MagicianModel), SnxxzUIMagicianModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit4(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.MagicianModel), SnxxzUIMagicianModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RoleModel), SnxxzUIRoleModelWrap.__Register); |
| | | |
| | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.ConsumeRebateModel), SnxxzUIConsumeRebateModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.LevelGiftModel), SnxxzUILevelGiftModelWrap.__Register); |
| | | |
| | | } |
| | | |
| | | static void wrapInit5(LuaEnv luaenv, ObjectTranslator translator) |
| | | { |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.LevelGiftModel), SnxxzUILevelGiftModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.MultipleExpModel), SnxxzUIMultipleExpModelWrap.__Register); |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 11479d6613f53454b9f092ed34c058f8 |
| | | timeCreated: 1548853305 |
| | | timeCreated: 1548941096 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | <type fullname="GuideMessageModel" preserve="all"/> |
| | | <type fullname="NewGuideModel" preserve="all"/> |
| | | <type fullname="StoryHintModel" preserve="all"/> |
| | | <type fullname="StageManager" preserve="all"/> |
| | | <type fullname="LuaBehaviour" preserve="all"/> |
| | | <type fullname="ConfigUtil" preserve="all"/> |
| | | <type fullname="LuaGameNetPackBase" preserve="all"/> |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9bc9d85830abbcc4eaa98fa571c8663b |
| | | timeCreated: 1548853319 |
| | | timeCreated: 1548941111 |
| | | licenseType: Pro |
| | | TextScriptImporter: |
| | | userData: |
| | |
| | | fairyLeagueModel.OnRefreshFairyLeagueEvent += CheckActivity;
|
| | | fairyLeagueModel.onFairyLeagueBattleEvent += CheckActivity;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyBoss += CheckActivity;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | NewBieCenter.Instance.guideCompletedEvent += GuideCompletedEvent;
|
| | |
|
| | | var _funcCfg = Config.Instance.Get<FuncConfigConfig>("SpecialActivitys");
|
| | |
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage is DungeonStage)
|
| | | if (StageLoad.Instance.currentStage is DungeonStage)
|
| | | {
|
| | | var _mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | if (_mapConfig.MapFBType == 0)
|
| | |
| | |
|
| | | private void CheckActivity()
|
| | | {
|
| | | if (!mainStage || !(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!mainStage || !(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | |
| | | public static bool IsSceneAssetValid(int mapId, int lineId)
|
| | | {
|
| | | var dataMapId = 0;
|
| | | var mapConfig = Config.Instance.Get<MapConfig>(mapId);
|
| | | if (mapConfig == null)
|
| | | {
|
| | | return false;
|
| | | if (AssetSource.sceneFromEditor || mapId < 100) |
| | | { |
| | | return true; |
| | | }
|
| | |
|
| | | if (mapConfig.MapFBType != 0)
|
| | | {
|
| | | var model = ModelCenter.Instance.GetModel<DungeonModel>();
|
| | | dataMapId = model.GetDataMapIdByMapId(mapId);
|
| | | }
|
| | | else
|
| | | {
|
| | | lineId = 0;
|
| | | dataMapId = mapId;
|
| | | var dataMapId = MapUtility.GetDataMapId(mapId);
|
| | | lineId = MapUtility.GetLineId(mapId, lineId);
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId, lineId);
|
| | | if (mapResConfig == null) |
| | | { |
| | | return false; |
| | | }
|
| | |
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(dataMapId, lineId);
|
| | | if (!IsAssetValid(StringUtility.Contact("maps/", mapResConfig.MapResources.ToLower()))) |
| | | {
|
| | | return false; |
| | |
| | | BossShowing = false;
|
| | | showTargetList = new List<ShowActor>();
|
| | | TimeMgr.Instance.OnSyntonyEvent += OnSyntonyEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | GameObject bossShowCam;
|
| | |
| | | }
|
| | | SetMisstionShow(actorShowModel.BindMissionID);
|
| | | }
|
| | | if (BossShowing && StageManager.Instance.CurrentStage is DungeonStage)
|
| | | if (BossShowing && StageLoad.Instance.currentStage is DungeonStage)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | TimeMgr.Instance.OnSyntonyEvent += OnSyntonyEvent;
|
| | | VoiceHttpRequest.Instance.samplesDecodecComplete += SamplesDecodecComplete;
|
| | | WindowCenter.Instance.windowAfterOpenEvent += WindowAfterOpenEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | PlayerRealmData.OnPlayerCollectEnd += OnPlayerCollectEnd;
|
| | | //SnxxzGame.Instance.AddApplicationOutAction(OnApplicationQuit);
|
| | |
|
| | |
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | bool isDungeon = StageManager.Instance.CurrentStage is DungeonStage;
|
| | | bool isDungeon = StageLoad.Instance.currentStage is DungeonStage;
|
| | | if (!isDungeon)
|
| | | {
|
| | | ClearAllVoice();
|
| | |
| | | private void AutoPlayVoice()
|
| | | {
|
| | | if (voicePlaying || WindowCenter.Instance.IsOpen<LoadingWin>()
|
| | | || !(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | || !(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | private void CheckChatFloatOpen()
|
| | | {
|
| | | if (WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() && !WindowCenter.Instance.IsOpen<LoadingWin>()
|
| | | && StageManager.Instance.CurrentStage is DungeonStage && !WindowCenter.Instance.IsOpen<TreasureBaseWin>())
|
| | | && StageLoad.Instance.currentStage is DungeonStage && !WindowCenter.Instance.IsOpen<TreasureBaseWin>())
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<ChatFloatWin>())
|
| | | {
|
| | |
| | | }
|
| | | if (!WindowCenter.Instance.IsOpen<MainInterfaceWin>()
|
| | | || WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()
|
| | | || StageManager.Instance.isLoading
|
| | | || StageLoad.Instance.isLoading
|
| | | || NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | | return;
|
| | |
| | | BugleItem = int.Parse(_funcCfg.Numerical1);
|
| | |
|
| | | DTC0102_tagCDBPlayer.switchAccountEvent += SwitchAccountEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += PlayerLoginOkEvent;
|
| | |
|
| | | InitChatRedpoints();
|
| | |
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | bool isDungeon = StageManager.Instance.CurrentStage is DungeonStage;
|
| | | bool isDungeon = StageLoad.Instance.currentStage is DungeonStage;
|
| | | if (!isDungeon)
|
| | | {
|
| | | ClearAllChatInfo();
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using System.Text;
|
| | | using UnityEngine; |
| | | |
| | | using UnityEngine;
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class VoiceHttpRequest : SingletonMonobehaviour<VoiceHttpRequest>
|
| | | |
| | | { |
| | |
|
| | | {
|
| | | const string uploadUrl = "http://{0}.voice.2460web.com:53001/voice/upload";
|
| | | const string downloadUrl = "http://{0}.voice.2460web.com:53001/voice/download"; |
| | | |
| | | |
| | | public Queue<VoiceHttp> speechs = new Queue<VoiceHttp>(); |
| | | public Queue<VoiceDecodec> decodecSamples = new Queue<VoiceDecodec>(); |
| | | |
| | | public event Action<VoiceDecodec> samplesDecodecComplete; |
| | | |
| | | private bool onceSuccessRemind = false; |
| | | |
| | | const string downloadUrl = "http://{0}.voice.2460web.com:53001/voice/download";
|
| | |
|
| | |
|
| | | public Queue<VoiceHttp> speechs = new Queue<VoiceHttp>();
|
| | | public Queue<VoiceDecodec> decodecSamples = new Queue<VoiceDecodec>();
|
| | |
|
| | | public event Action<VoiceDecodec> samplesDecodecComplete;
|
| | |
|
| | | private bool onceSuccessRemind = false;
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage is LoginStage)
|
| | | if (StageLoad.Instance.currentStage is LoginStage)
|
| | | {
|
| | | speechs.Clear();
|
| | | }
|
| | |
| | | playerId = _playerId
|
| | | });
|
| | | onceSuccessRemind = false;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void LateUpdate()
|
| | | {
|
| | | if (speechs.Count > 0)
|
| | |
| | | {
|
| | | samplesDecodecComplete(decodecSamples.Dequeue());
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public void Enqueue(float[] _samples, long _tick, int _playerId)
|
| | | {
|
| | | decodecSamples.Enqueue(new VoiceDecodec()
|
| | |
| | | samples = _samples,
|
| | | playerId = _playerId,
|
| | | });
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public struct VoiceHttp
|
| | | {
|
| | | public byte[] encode;
|
| | | public long tick;
|
| | | public int playerId;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public struct VoiceDecodec
|
| | | {
|
| | | public long tick;
|
| | | public int playerId;
|
| | | public float[] samples;
|
| | | } |
| | | } |
| | | }
|
| | | }
|
| | |
| | | return; |
| | | } |
| | | |
| | | if (!AssetVersionUtility.IsUnpriorAssetDownLoadOk()) |
| | | { |
| | | InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.Whole); |
| | | return; |
| | | } |
| | | |
| | | var sendInfo = new CC105_tagCMEnterCrossServer(); |
| | | sendInfo.DataMapID = DATA_MAPID; |
| | | |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | |
| | |
|
| | | private void ClickMatch(int type)
|
| | | {
|
| | | if (type == 1)
|
| | | {
|
| | | if (!AssetVersionUtility.IsUnpriorAssetDownLoadOk())
|
| | | {
|
| | | InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.Whole);
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | if (crossServerModel.isClickCoolTime) return;
|
| | |
|
| | | DebugEx.Log("ClickMatch......");
|
| | |
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | loadSecond = 0;
|
| | | StageManager.Instance.onStageLoadFinish -= OnLoadMapFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnLoadMapFinish;
|
| | | storeModel.RefreshBuyShopLimitEvent -= UpdateBuyShop;
|
| | | TimeUtility.OnServerOpenDayRefresh -= UpdateServerOpenDay;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= UpdatePlayerData;
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | StageManager.Instance.onStageLoadFinish += OnLoadMapFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnLoadMapFinish;
|
| | | storeModel.RefreshBuyShopLimitEvent += UpdateBuyShop;
|
| | | TimeUtility.OnServerOpenDayRefresh += UpdateServerOpenDay;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += UpdatePlayerData;
|
| | |
| | | {
|
| | | if (PlayerDatas.Instance.baseData.FightPoint >= config.Fightpower)
|
| | | {
|
| | | var runeTowerStage = StageManager.Instance.CurrentStage as RuneTowerDungeonStage;
|
| | | var runeTowerStage = StageLoad.Instance.currentStage as RuneTowerDungeonStage;
|
| | | runeTowerStage.PerformChallengeNextLevel();
|
| | | model.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 0);
|
| | | model.UpdateCoolDown(DungeonCoolDownType.TowerTake, 0);
|
| | |
| | | {
|
| | | if (ok)
|
| | | {
|
| | | var runeTowerStage = StageManager.Instance.CurrentStage as RuneTowerDungeonStage;
|
| | | var runeTowerStage = StageLoad.Instance.currentStage as RuneTowerDungeonStage;
|
| | | runeTowerStage.PerformChallengeNextLevel();
|
| | | model.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 0);
|
| | | model.UpdateCoolDown(DungeonCoolDownType.TowerTake, 0);
|
| | |
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | |
| | |
|
| | | protected override void DrawExitTimer(int seconds)
|
| | | {
|
| | | if (m_RuneTowerNext.gameObject.activeInHierarchy) |
| | | if (m_RuneTowerNext.gameObject.activeInHierarchy)
|
| | | {
|
| | | m_ExitTimer.text = Language.Get("DemonDungeonExit");
|
| | | m_NextTimer.text = Language.Get("RuneDungeonVictory_Btn_Next_1", Mathf.Clamp(seconds, 0, int.MaxValue)); |
| | | m_NextTimer.text = Language.Get("RuneDungeonVictory_Btn_Next_1", Mathf.Clamp(seconds, 0, int.MaxValue));
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | var config = Config.Instance.Get<RuneTowerFloorConfig>(runeTowerModel.currentFloor);
|
| | | if (PlayerDatas.Instance.baseData.FightPoint >= config.Fightpower)
|
| | | {
|
| | | var runeTowerStage = StageManager.Instance.CurrentStage as RuneTowerDungeonStage;
|
| | | var runeTowerStage = StageLoad.Instance.currentStage as RuneTowerDungeonStage;
|
| | | runeTowerStage.PerformChallengeNextLevel();
|
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 0);
|
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.TowerTake, 0);
|
| | |
| | | Language.Get("RuneTower25", config.Fightpower),
|
| | | (bool ok) =>
|
| | | {
|
| | | if (ok) |
| | | if (ok)
|
| | | {
|
| | | var runeTowerStage = StageManager.Instance.CurrentStage as RuneTowerDungeonStage;
|
| | | var runeTowerStage = StageLoad.Instance.currentStage as RuneTowerDungeonStage;
|
| | | runeTowerStage.PerformChallengeNextLevel();
|
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 0);
|
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.TowerTake, 0);
|
| | | CloseClick(); |
| | | CloseClick();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | { |
| | | ParseConfig(); |
| | | TimeMgr.Instance.OnHourEvent += UpdateRedPoint; |
| | | StageManager.Instance.onStageLoadFinish+= OnStageLoadFinish; |
| | | StageLoad.Instance.onStageLoadFinish+= OnStageLoadFinish; |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += OnRefreshFairyInfo; |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine += OnRefreshFairyInfo; |
| | | }
|
| | |
|
| | | } |
| | | |
| | | public override void UnInit() |
| | | { |
| | | TimeMgr.Instance.OnHourEvent -= UpdateRedPoint; |
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= OnRefreshFairyInfo;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish; |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= OnRefreshFairyInfo; |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= OnRefreshFairyInfo; |
| | | } |
| | | |
| | |
| | | leagueTableName = cfg.Numerical2; |
| | | |
| | | var configs = Config.Instance.GetAllValues<FamilyConfig>(); |
| | | for (int i = 0; i < configs.Count; i++)
|
| | | {
|
| | | fairyBossWeekCntDict.Add(configs[i].familyLV, configs[i].bossFBCnt);
|
| | | for (int i = 0; i < configs.Count; i++) |
| | | { |
| | | fairyBossWeekCntDict.Add(configs[i].familyLV, configs[i].bossFBCnt); |
| | | } |
| | | |
| | | GetDungeonContinueTime(); |
| | |
| | | } |
| | | } |
| | | |
| | | public int GetFairyBossWeekCount()
|
| | | {
|
| | | var lv = 1;
|
| | | var fairyData = PlayerDatas.Instance.fairyData;
|
| | | if (!fairyData.HasFairy)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | lv = fairyData.fairy.FamilyLV;
|
| | | if (fairyBossWeekCntDict.ContainsKey(lv))
|
| | | {
|
| | | return fairyBossWeekCntDict[lv];
|
| | | }
|
| | | return 0;
|
| | | public int GetFairyBossWeekCount() |
| | | { |
| | | var lv = 1; |
| | | var fairyData = PlayerDatas.Instance.fairyData; |
| | | if (!fairyData.HasFairy) |
| | | { |
| | | return 0; |
| | | } |
| | | lv = fairyData.fairy.FamilyLV; |
| | | if (fairyBossWeekCntDict.ContainsKey(lv)) |
| | | { |
| | | return fairyBossWeekCntDict[lv]; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | public bool TryGetWeekCnt(int _fairyLv, out int cnt)
|
| | | {
|
| | | return fairyBossWeekCntDict.TryGetValue(_fairyLv, out cnt);
|
| | | public bool TryGetWeekCnt(int _fairyLv, out int cnt) |
| | | { |
| | | return fairyBossWeekCntDict.TryGetValue(_fairyLv, out cnt); |
| | | } |
| | | |
| | | private void OnRefreshFairyInfo()
|
| | | {
|
| | | UpdateRedPoint();
|
| | | private void OnRefreshFairyInfo() |
| | | { |
| | | UpdateRedPoint(); |
| | | } |
| | | |
| | | public void UpdateRedPoint() |
| | |
| | | fairyBossPrepareTime = int.Parse(_stepTime.Split(',')[0]); |
| | | } |
| | | |
| | | public void HandInFairyFood()
|
| | | {
|
| | | var singlepack = packModel.GetSinglePackModel(PackType.rptItem);
|
| | | var count = 0;
|
| | | if (singlepack != null)
|
| | | {
|
| | | count = singlepack.GetItemCountByID(fairyBossFood);
|
| | | }
|
| | | if (count > 0)
|
| | | {
|
| | | CA605_tagCMFamilyDonate pak = new CA605_tagCMFamilyDonate();
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("FairyFoodHandError");
|
| | | }
|
| | | public void HandInFairyFood() |
| | | { |
| | | var singlepack = packModel.GetSinglePackModel(PackType.rptItem); |
| | | var count = 0; |
| | | if (singlepack != null) |
| | | { |
| | | count = singlepack.GetItemCountByID(fairyBossFood); |
| | | } |
| | | if (count > 0) |
| | | { |
| | | CA605_tagCMFamilyDonate pak = new CA605_tagCMFamilyDonate(); |
| | | GameNetSystem.Instance.SendInfo(pak); |
| | | } |
| | | else |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("FairyFoodHandError"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | m_ShowCamera.gameObject.SetActive(true);
|
| | | CameraController.Instance.CameraObject.gameObject.SetActive(false);
|
| | |
|
| | | StageManager.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | StageManager.Instance.onStartStageLoadingEvent += OnStartStageLoadingEvent;
|
| | | StageLoad.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | StageLoad.Instance.onStartStageLoadingEvent += OnStartStageLoadingEvent;
|
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | |
| | | OpenUI();
|
| | | WindowCenter.Instance.CloseImmediately<FairyFeastTransmitShowWin>();
|
| | | CameraController.Instance.CameraObject.gameObject.SetActive(true);
|
| | | StageManager.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | StageLoad.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | transform.localPosition = new Vector3(0, 4000, 5000);
|
| | | if (m_ShowCamera != null)
|
| | | {
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | |
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | DailyQuestActionTimer.Instance.RefreshDailyQuestState += RefreshDailyQuestState;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea;
|
| | |
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | DailyQuestActionTimer.Instance.RefreshDailyQuestState -= RefreshDailyQuestState;
|
| | | GA_Hero.OnEnterOrExitArea -= OnEnterOrExitArea;
|
| | | GAMgr.Instance.OnFightNpcRequest -= OnFightNpcUpdate;
|
| | |
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | cacheGotoBossId = 0;
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | grabBossHintOpen = false;
|
| | | notified = false;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | |
|
| | | mapId = _mapId;
|
| | | var dataMapId = MapUtility.GetDataMapId();
|
| | | var lineId = MapUtility.GetLineId();
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId,lineId);
|
| | |
|
| | | var tagChinMap = Config.Instance.Get<MapConfig>(mapId);
|
| | | var mapWidth = mapResConfig.MapScale.x;
|
| | | var mapHeight = mapResConfig.MapScale.y;
|
| | |
| | | TimeUtility.OnServerOpenDayRefresh += OnServerOpenDayRefresh;
|
| | | DTCA003_tagUniversalGameRecInfo.onGetUniversalGameInfo += OnGetUniversalGameInfo;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | TimeMgr.Instance.OnMinuteEvent += MinuteEvent;
|
| | | TimeMgr.Instance.OnDayEvent += DayEvent;
|
| | |
| | |
|
| | | private void MinuteEvent()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage) || !serverInited)
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage) || !serverInited)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage is DungeonStage &&
|
| | | if (StageLoad.Instance.currentStage is DungeonStage &&
|
| | | PlayerDatas.Instance.baseData.MapID == FAIRY_LEAGUE_DUNGEON)
|
| | | {
|
| | | UpdateRedpoint();
|
| | |
| | | TimeMgr.Instance.OnSyntonyEvent += OnSyntonyEvent;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | dungeonModel.dungeonCoolDownEvent += OnBeginTimeEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | GlobalTimeEvent.Instance.secondEvent += SecondEvent;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | get
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage is DungeonStage)
|
| | | if (StageLoad.Instance.currentStage is DungeonStage)
|
| | | {
|
| | | var mapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | if (mapId == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON)
|
| | |
| | | fairyLeagueDugeonCoolDown = false;
|
| | | }
|
| | |
|
| | | bool isDungeon = StageManager.Instance.CurrentStage is DungeonStage;
|
| | | bool isDungeon = StageLoad.Instance.currentStage is DungeonStage;
|
| | | if (!isDungeon)
|
| | | {
|
| | | PlayerDatas.Instance.fairyData.ClearFairyData();
|
| | |
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | pack.RefreshItemCountAct += RefreshItemCountAct;
|
| | | KnapsackTimeCDMgr.Instance.RefreshItemOverdueAct += RefreshItemOverdueTimeAct;
|
| | | }
|
| | |
| | | GameRecInfoDict.Clear();
|
| | | AchieveModel.achievementAwardableEvent -= RefreshAchieveState;
|
| | | AchieveModel.achievementCompletedEvent -= RefreshAchieveState;
|
| | | StageManager.Instance.onStageLoadFinish -= OnLoadMapFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnLoadMapFinish;
|
| | | }
|
| | |
|
| | | public void OnAfterPlayerDataInitialize()
|
| | |
| | | {
|
| | | AchieveModel.achievementProgressUpdateEvent += RefreshAchieveState;
|
| | | AchieveModel.achievementCompletedEvent += RefreshAchieveState;
|
| | | StageManager.Instance.onStageLoadFinish += OnLoadMapFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnLoadMapFinish;
|
| | | AchieveRedPointCtrl();
|
| | | }
|
| | | public override void UnInit()
|
| | |
| | | makeDruglist.Add(fruitlist[i]);
|
| | | }
|
| | | }
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | |
|
| | | SetDevourEquipPlace();
|
| | |
|
| | |
| | | float refProgress = 0f;
|
| | | float expectDuration = 5f;
|
| | |
|
| | | float overTimer = 0f;
|
| | |
|
| | | LoadingType loadingType = LoadingType.Normal;
|
| | |
|
| | | #region Built-in
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | overTimer = 0f;
|
| | | refProgress = 0f;
|
| | | var useDefautBackGround = false;
|
| | | if (!AssetSource.uiFromEditor)
|
| | | {
|
| | |
| | | else
|
| | | {
|
| | | m_ContainerProgress.gameObject.SetActive(true);
|
| | | m_ProgressSlider.value = refProgress = 0f;
|
| | | StageManager.Instance.loadingProgressEvent += UpdateLoadingProgress;
|
| | | m_ProgressSlider.ResetValue(0f);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | StageManager.Instance.loadingProgressEvent -= UpdateLoadingProgress;
|
| | |
|
| | | if (!AssetSource.uiFromEditor)
|
| | | {
|
| | | AssetBundleUtility.Instance.UnloadAssetBundle("ui/sprite/loading", true, false);
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | |
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | |
|
| | | if (loadingType == LoadingType.Normal)
|
| | | {
|
| | | refProgress = Mathf.Clamp01(refProgress + Time.deltaTime / expectDuration);
|
| | | if (StageLoad.Instance.progress + 0.1f > refProgress)
|
| | | {
|
| | | refProgress = Mathf.Clamp01(StageLoad.Instance.progress + 0.1f);
|
| | | }
|
| | |
|
| | | m_ProgressSlider.value = refProgress;
|
| | | }
|
| | | }
|
| | |
|
| | | void UpdateLoadingProgress(float _progress)
|
| | | {
|
| | | m_ProgressSlider.value = refProgress = Mathf.Max(_progress, refProgress);
|
| | | overTimer += Time.deltaTime;
|
| | | if (overTimer > 15f)
|
| | | {
|
| | | overTimer -= 5f;
|
| | |
|
| | | var loginModel = ModelCenter.Instance.GetModel<LoginModel>();
|
| | | if (!loginModel.busy && !CrossServerLogin.Instance.busy && !StageLoad.Instance.isLoading)
|
| | | {
|
| | | WindowCenter.Instance.Close<LoadingWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private List<int> GetShowFunctions(int _level)
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage is LoginStage)
|
| | | if (StageLoad.Instance.currentStage is LoginStage)
|
| | | {
|
| | | m_Content.text = Language.Get("Disconnected_2");
|
| | | }
|
| | |
| | | break;
|
| | | case NetworkReachability.ReachableViaCarrierDataNetwork:
|
| | | case NetworkReachability.ReachableViaLocalAreaNetwork:
|
| | | if (StageManager.Instance.CurrentStage is LoginStage)
|
| | | if (StageLoad.Instance.currentStage is LoginStage)
|
| | | {
|
| | | var loginModel = ModelCenter.Instance.GetModel<LoginModel>();
|
| | | loginModel.busy = false;
|
| | |
| | |
|
| | | private void Cancel()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is LoginStage))
|
| | | if (!(StageLoad.Instance.currentStage is LoginStage))
|
| | | {
|
| | | GameNetSystem.Instance.LoginOut();
|
| | | }
|
| | |
| | | sdkLogined = false;
|
| | | sdkLoginResult = default(SDKUtility.FP_LoginOk);
|
| | |
|
| | | if (StageManager.Instance.CurrentStage is LoginStage)
|
| | | if (StageLoad.Instance.currentStage is LoginStage)
|
| | | {
|
| | | SDKUtility.Instance.FreePlatformLogin();
|
| | | }
|
| | |
| | | {
|
| | | AccountLogin(sdkLoginResult.account, _ip, _port, _gamePort);
|
| | | }
|
| | | else
{
if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl
|| (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj
&& SDKUtility.Yj_AppID.Equals("hwgame")))
{
SDKUtility.Instance.FreePlatformLogin();
}
}
|
| | | else
|
| | | {
|
| | | if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl
|
| | | || (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj
|
| | | && SDKUtility.Yj_AppID.Equals("hwgame")))
|
| | | {
|
| | | SDKUtility.Instance.FreePlatformLogin();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void ReAccountLogin()
|
| | |
| | | case 1:
|
| | | NetLinkWin.Hide();
|
| | | EnterWorld(1);
|
| | | StageManager.Instance.LoadCreateRoleStage();
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = 2,
|
| | | toLineId = 0,
|
| | | needEmpty = false,
|
| | | needLoadResource=true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true
|
| | | });
|
| | | break;
|
| | | case 2:
|
| | | if (!onCreateRole)
|
| | |
| | | else
|
| | | {
|
| | | NetLinkWin.Hide();
|
| | | StageManager.Instance.LoadSelectRoleStage();
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = 3,
|
| | | toLineId = 0,
|
| | | needEmpty = false,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true
|
| | | });
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class ServerListCenter : Singleton<ServerListCenter>
|
| | | |
| | |
|
| | | {
|
| | | public static readonly string[] JUMP_URL = new string[] { "http://pub.game.2460web.com:11000/server_list/?"
|
| | | ,"http://111.230.234.252:11000/server_list/?"};
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage == null || StageManager.Instance.CurrentStage is LoginStage)
|
| | | if (StageLoad.Instance.currentStage == null || StageLoad.Instance.currentStage is LoginStage)
|
| | | {
|
| | | Clock.Create(DateTime.Now + new TimeSpan(TimeSpan.TicksPerSecond), () =>
|
| | | {
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | login = true;
|
| | | }
|
| | |
| | | FirstRecharge,
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | |
|
| | | PlayerTaskDatas.FairyTaskEvent -= FairyTaskEvent;
|
| | | PlayerTaskDatas.FairyTaskEvent += FairyTaskEvent;
|
| | | StageManager.Instance.onStageLoadFinish -= onStageLoadFinish;
|
| | | StageManager.Instance.onStageLoadFinish += onStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= onStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += onStageLoadFinish;
|
| | | }
|
| | |
|
| | |
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, September 12, 2018 |
| | | //-------------------------------------------------------- |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, September 12, 2018
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | |
| | | using Snxxz.UI;
|
| | |
|
| | | //功能预告红点
|
| | | [XLua.LuaCallCSharp] |
| | | [XLua.LuaCallCSharp]
|
| | | public class FeatureNoticeModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>();
|
| | |
| | | Isbool = true;
|
| | | FunctionForecastIndex = 0;
|
| | | DicOpenFuncState.Clear();
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | Isbool = true;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;
|
| | | GlobalTimeEvent.Instance.secondEvent -= secondEvent;
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent;
|
| | |
| | | }
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | OpenFuncId = 0;
|
| | | RedPointChange = false;
|
| | |
| | | var IsOpenMaininterface = WindowCenter.Instance.IsOpen<MainInterfaceWin>();
|
| | | var IsOpenOffLineOnHook = WindowCenter.Instance.IsOpen<OffLineOnHookWin>();
|
| | | var treasureModel = ModelCenter.Instance.GetModel<TreasureModel>();
|
| | | var IsLoading = StageManager.Instance.isLoading;
|
| | | var IsLoading = StageLoad.Instance.isLoading;
|
| | | if (NewBieCenter.Instance.inGuiding || treasureModel.newGotShowing || inDungeon || !IsOpenMaininterface
|
| | | || treasureModel.treasureStageUpShow || WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() ||
|
| | | IsOpenOffLineOnHook || IsLoading)
|
| | |
| | | getReward.DataExStr = string.Empty;
|
| | | GameNetSystem.Instance.SendInfo(getReward);
|
| | | }
|
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | |
| | | public void OnAfterPlayerDataInitialize() |
| | | { |
| | | //StageManager.Instance.onStageLoadFinish += onStageLoadFinish; |
| | | //StageLoad.Instance.onStageLoadFinish += onStageLoadFinish; |
| | | } |
| | | |
| | | public void OnBeforePlayerDataInitialize() |
| | | { |
| | | // StageManager.Instance.onStageLoadFinish -= onStageLoadFinish; |
| | | // StageLoad.Instance.onStageLoadFinish -= onStageLoadFinish; |
| | | } |
| | | |
| | | private void onStageLoadFinish() |
| | |
| | |
|
| | | public override void Init()
|
| | | {
|
| | | StageManager.Instance.onStageLoadFinish += onStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += onStageLoadFinish;
|
| | | NPCInteractProcessor.s_NpcInteractEvent += NpcInterac;
|
| | | FaBaoNPCIdList.Clear();
|
| | | string strFabao = Config.Instance.Get<FuncConfigConfig>("FaBaoNPCID").Numerical1;
|
| | |
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | StageManager.Instance.onStageLoadFinish -= onStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= onStageLoadFinish;
|
| | | NPCInteractProcessor.s_NpcInteractEvent -= NpcInterac;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class TipPanel : Singleton<TipPanel>
|
| | | |
| | |
|
| | | {
|
| | | PlayerMainDate m_MainModel;
|
| | | PlayerMainDate mainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
|
| | |
| | | {
|
| | | WindowCenter.Instance.windowAfterOpenEvent += windowBeforeOpen;
|
| | | NewBieCenter.Instance.guideCompletedEvent += guideCompleted;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | TreasureNewGotWin.CloseTreasureNewGotWinEvent += CloseTreasureNewGotWinEvent;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | yield return null;
|
| | | if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !NewBieCenter.Instance.inGuiding
|
| | | && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() && !StageManager.Instance.isLoading
|
| | | && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() && !StageLoad.Instance.isLoading
|
| | | && !treasureModel.newGotShowing)
|
| | | {
|
| | | IsOPenTip();
|
| | |
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | | if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !NewBieCenter.Instance.inGuiding
|
| | | && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() && !StageManager.Instance.isLoading
|
| | | && StageManager.Instance.CurrentStage is DungeonStage && !treasureModel.newGotShowing)
|
| | | && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() && !StageLoad.Instance.isLoading
|
| | | && StageLoad.Instance.currentStage is DungeonStage && !treasureModel.newGotShowing)
|
| | | {
|
| | | IsOPenTip();
|
| | | }
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class BattleHint : Singleton<BattleHint>
|
| | | |
| | |
|
| | | {
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | |
| | |
|
| | | private void OnSystemNotifyEvent(string msg)
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage)
|
| | | || StageManager.Instance.isLoading)
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage)
|
| | | || StageLoad.Instance.isLoading)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | public void ReceiveEvenKill(string message, ArrayList list)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.MapID != 31160
|
| | | || !(StageManager.Instance.CurrentStage is DungeonStage)
|
| | | || StageManager.Instance.isLoading
|
| | | || !(StageLoad.Instance.currentStage is DungeonStage)
|
| | | || StageLoad.Instance.isLoading
|
| | | || WindowCenter.Instance.IsOpen<TreasureBaseWin>()
|
| | | || WindowCenter.Instance.IsOpen<TreasureSelectWin>())
|
| | | {
|
| | |
| | | evenKills.Clear();
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | |
| | |
|
| | | private bool CheckSend()
|
| | | {
|
| | | if(!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if(!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | public string message = string.Empty;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | |
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class SysNotifyMgr : SingletonMonobehaviour<SysNotifyMgr>
|
| | | |
| | |
|
| | | {
|
| | | /// <summary>
|
| | | /// 服务端下发的数据
|
| | |
| | | private void Awake()
|
| | | {
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInitializeEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StartCoroutine(Co_Instance());
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | base.OnDestroy();
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= BeforePlayerDataInitializeEvent;
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | |
| | | {
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class NewBieCenter : Singleton<NewBieCenter>
|
| | | public class NewBieCenter : Singleton<NewBieCenter>
|
| | | |
| | | {
|
| | |
|
| | |
| | | private void Postprocessing(int guideId)
|
| | | {
|
| | | var guideConfig = Config.Instance.Get<GuideConfig>(guideId);
|
| | | if (guideConfig == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var functionOpenConfig = Config.Instance.Get<FuncOpenLVConfig>(guideConfig.Condition);
|
| | | if (functionOpenConfig != null && functionOpenConfig.ContinueTask == 1)
|
| | | {
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage)
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage)
|
| | | || WindowCenter.Instance.IsOpen<LoadingWin>())
|
| | | {
|
| | | return;
|
| | |
| | | return;
|
| | | }
|
| | | festivalRedpackModel.JudgePlayRedpackVoice(type);
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage)
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage)
|
| | | || WindowCenter.Instance.IsOpen<LoadingWin>())
|
| | | {
|
| | | return;
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage)
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage)
|
| | | || WindowCenter.Instance.IsOpen<LoadingWin>())
|
| | | {
|
| | | return;
|
| | |
| | | CameraController.Instance.CameraObject.gameObject.SetActive(false);
|
| | | WindowCenter.Instance.uiRoot.uicamera.enabled = false;
|
| | |
|
| | | StageManager.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | StageManager.Instance.onStartStageLoadingEvent += OnStartStageLoadingEvent;
|
| | | StageLoad.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | StageLoad.Instance.onStartStageLoadingEvent += OnStartStageLoadingEvent;
|
| | | }
|
| | |
|
| | | void LoadHero()
|
| | |
| | | public void Stop()
|
| | | {
|
| | | IsOpen = false;
|
| | | StageManager.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | StageLoad.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | CameraController.Instance.CameraObject.gameObject.SetActive(true);
|
| | | WindowCenter.Instance.uiRoot.uicamera.enabled = true;
|
| | | WindowCenter.Instance.CloseImmediately<RealmBossShowWin>();
|
| | |
| | |
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | GlobalTimeEvent.Instance.secondEvent += PerSecond;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | specialItemColorMark = false;
|
| | | }
|
| | |
| | | IsMustBuyDay = false;
|
| | | isLogin = true;
|
| | | ClearJumpModel();
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= FuncStateChange;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= windowAfterOpen;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= windowAfterClose;
|
| | |
| | | RefreshTCBPlayerDataEvent += RefreshPlayerData;
|
| | | TimeMgr.Instance.OnHourEvent += RefreshServerHour;
|
| | | GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | WindowCenter.Instance.windowAfterOpenEvent += windowAfterOpen;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += windowAfterClose;
|
| | | NewBieCenter.Instance.guideBeginEvent += GuidBegin;
|
| | |
| | | float autoDecomposeCoolTimer = 0;
|
| | | private void LateUpdate()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | Dictionary<int, Action> tasks = new Dictionary<int, Action>();
|
| | | public TeamFailEnterDungeonHandle()
|
| | | {
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (StageManager.Instance.isLoading)
|
| | | if (StageLoad.Instance.isLoading)
|
| | | {
|
| | | if (!tasks.ContainsKey(31080))
|
| | | {
|
| | |
| | |
|
| | | public void OnTeamClear(H0905_tagTeamClear _serverInfo)
|
| | | {
|
| | | if (_serverInfo.socketType == GameNetSystem.SocketType.CrossSever)
|
| | | if (_serverInfo.socketType == ServerType.CrossSever)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | public void OnTeammateLeave(H0906_tagPlayerLeaveTeamMsg _leaveTeam)
|
| | | {
|
| | | if (_leaveTeam.socketType == GameNetSystem.SocketType.CrossSever)
|
| | | if (_leaveTeam.socketType == ServerType.CrossSever)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | public static void OnStageLoadFinish()
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage is LoginStage
|
| | | || StageManager.Instance.CurrentStage is SelectRoleStage)
|
| | | if (StageLoad.Instance.currentStage is LoginStage
|
| | | || StageLoad.Instance.currentStage is SelectRoleStage)
|
| | | {
|
| | | m_Marquees.Clear();
|
| | | return;
|
| | |
| | |
|
| | | static bool CheckOpenMarquee()
|
| | | {
|
| | | return (StageManager.Instance.CurrentStage is DungeonStage) && !StageManager.Instance.isLoading;
|
| | | return (StageLoad.Instance.currentStage is DungeonStage) && !StageLoad.Instance.isLoading;
|
| | | }
|
| | |
|
| | | public static SystemHintData RequireMarquee()
|
| | |
| | | WindowCenter.Instance.windowAfterOpenEvent += OnWindowOpen;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += OnWindowClose;
|
| | | NewBieCenter.Instance.guideCompletedEvent += GuideComplete;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | GlobalTimeEvent.Instance.secondEvent += PerSecond;
|
| | | }
|
| | |
|
| | |
| | | packageModel.RefreshItemCountAct -= OnPackageItemChange;
|
| | | WindowCenter.Instance.windowAfterOpenEvent -= OnWindowOpen;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= OnWindowClose;
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | GlobalTimeEvent.Instance.secondEvent -= PerSecond;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | exitRecord = 0;
|
| | | }
|
| | |
| | |
|
| | | private void OpenTreasureNewGot()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage) || !serverInited)
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage) || !serverInited)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | WindowCenter.Instance.windowBeforeCloseEvent += windowBeforeClose;
|
| | | WindowCenter.Instance.windowBeforeOpenEvent -= windowBeforeOpenEvent;
|
| | | WindowCenter.Instance.windowBeforeOpenEvent += windowBeforeOpenEvent;
|
| | | StageManager.Instance.onStageLoadFinish -= onStageLoadFinish;
|
| | | StageManager.Instance.onStageLoadFinish += onStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= onStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += onStageLoadFinish;
|
| | | ItemOverdueModel.FirstGoldWPOver -= FirstGoldWPOver;
|
| | | ItemOverdueModel.FirstGoldWPOver += FirstGoldWPOver;
|
| | | FirstGoldWPOver();
|
| | |
| | | TreasureNewGotWin.CloseTreasureNewGotWinEvent += CloseTreasureNewGotWinEvent;
|
| | | NewBieCenter.Instance.guideCompletedEvent += GuideCompletedEvent;
|
| | | packModel.RefreshItemCountAct += RefreshItemCountAct;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | TreasureNewGotWin.CloseTreasureNewGotWinEvent -= CloseTreasureNewGotWinEvent;
|
| | | NewBieCenter.Instance.guideCompletedEvent -= GuideCompletedEvent;
|
| | | packModel.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | yield return WaitingForSecondConst.WaitMS1000;
|
| | | waitingJump = false;
|
| | | if (!NewBieCenter.Instance.inGuiding && !WindowCenter.Instance.IsOpen<LoadingWin>()
|
| | | && StageManager.Instance.CurrentStage is DungeonStage && !deadModel.playerIsDie)
|
| | | && StageLoad.Instance.stageType== Stage.E_StageType.Dungeon && !deadModel.playerIsDie)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<VipRechargeWin>())
|
| | | {
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.stageType == Stage.E_StageType.Dungeon))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.stageType == Stage.E_StageType.Dungeon))
|
| | | {
|
| | | popExperienceWindow = false;
|
| | | }
|
| | |
| | | OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent;
|
| | | OperationTimeHepler.Instance.operationTimeUpdateEvent += OperationTimeUpdateEvent;
|
| | | WindowCenter.Instance.windowAfterOpenEvent += WindowAfterOpenEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | OpenServerActivityCenter.Instance.Register(5, this);
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.stageType == Stage.E_StageType.Dungeon))
|
| | | {
|
| | | showTip = true;
|
| | | todayRemind = false;
|
| | |
| | |
|
| | | private void WindowAfterOpenEvent(Window _win)
|
| | | {
|
| | | if (_win is MainInterfaceWin && StageManager.Instance.CurrentStage is DungeonStage && showTip)
|
| | | if (_win is MainInterfaceWin && StageLoad.Instance.stageType == Stage.E_StageType.Dungeon && showTip)
|
| | | {
|
| | | OperationBase operationBase;
|
| | | if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.MultipleExp, out operationBase)
|
| | |
| | | public override void Init()
|
| | | {
|
| | | OpenServerActivityCenter.Instance.Register(8, this);
|
| | | //StageManager.Instance.onStageLoadFinish += CheckReconnect;
|
| | | //StageLoad.Instance.onStageLoadFinish += CheckReconnect;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | StageManager.Instance.onStageLoadFinish -= CheckReconnect;
|
| | | StageLoad.Instance.onStageLoadFinish -= CheckReconnect;
|
| | | }
|
| | |
|
| | | public bool IsOpen
|
| | |
| | |
|
| | | private void CheckReconnect()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.stageType == Stage.E_StageType.Dungeon))
|
| | | {
|
| | | CheckShowRed();
|
| | | }
|
| | |
| | |
|
| | | private void SecondEvent()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.stageType == Stage.E_StageType.Dungeon))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | private void HourEvent()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | if (!(StageLoad.Instance.stageType == Stage.E_StageType.Dungeon))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | ParseWindowSearchConfig();
|
| | | IsJumpState = false;
|
| | | funcOpenBagItem = Config.Instance.Get<FuncConfigConfig>("OpenBagItem");
|
| | | StageManager.Instance.onStartStageLoadingEvent += ClearCurRecord;
|
| | | StageLoad.Instance.onStartStageLoadingEvent += ClearCurRecord;
|
| | | GlobalTimeEvent.Instance.secondEvent += SecondRefresh;
|
| | | }
|
| | | private Window preWin = null;
|
| | |
| | |
|
| | | private static void OnSelectedBoss(uint _instanceId, int _npcId, bool _show)
|
| | | {
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | var dataMapId = MapUtility.GetDataMapId();
|
| | | var lineId = MapUtility.GetLineId();
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId, lineId);
|
| | |
|
| | | if (mapResConfig == null || mapResConfig.ShowBOSSTime <= 0)//如果这个值为0,不显示boss出现
|
| | | {
|
| | | return;
|
| | |
| | | m_HeroHead.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | MapResourcesConfig mapResConfig = null;
|
| | | if (mapId == PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | | mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | }
|
| | | else
|
| | | {
|
| | | mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(mapId, 0);
|
| | | }
|
| | |
|
| | | var dataMapId = MapUtility.GetDataMapId(mapId);
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId, 0);
|
| | | var mapWidth = mapResConfig.MapScale.x;
|
| | | var mapHeight = mapResConfig.MapScale.y;
|
| | |
|
| | |
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | var dataMapId = MapUtility.GetDataMapId();
|
| | | var lineId = MapUtility.GetLineId();
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId, lineId);
|
| | |
|
| | | if (string.IsNullOrEmpty(mapResConfig.BigMap))
|
| | | {
|
| | | SelectWorldMap();
|
| | |
| | |
|
| | | private void SelectLocalMap()
|
| | | {
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | var dataMapId = MapUtility.GetDataMapId();
|
| | | var lineId = MapUtility.GetLineId();
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId, lineId);
|
| | | if (mapResConfig == null || string.IsNullOrEmpty(mapResConfig.BigMap))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("MapInfo1");
|
| | |
| | |
|
| | | public bool CanOpenLocalMapWin(int mapId)
|
| | | {
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | var dataMapId = MapUtility.GetDataMapId(mapId);
|
| | | var lineId = MapUtility.GetLineId();
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId, lineId);
|
| | | var config = Config.Instance.Get<MapConfig>(mapId);
|
| | | if (string.IsNullOrEmpty(mapResConfig.BigMap)
|
| | | || mapId == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON)
|
| | |
| | | m_MapName.text = StringUtility.Contact(towerConfig.TowerName, floorConfig.FloorName);
|
| | | break;
|
| | | default:
|
| | | var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig();
|
| | | var dataMapId = MapUtility.GetDataMapId();
|
| | | var lineId = MapUtility.GetLineId();
|
| | | var mapResConfig = MapResourcesConfig.GetConfig(dataMapId, lineId);
|
| | | m_MapName.text = mapResConfig.Name;
|
| | | break;
|
| | | }
|
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using TableConfig; |
| | | using Snxxz.UI; |
| | | |
| | | public class MapUtility |
| | | { |
| | | |
| | | public static int GetDataMapId(int mapId) |
| | | { |
| | | var config = Config.Instance.Get<MapConfig>(mapId); |
| | | if (config == null) |
| | | { |
| | | DebugEx.LogErrorFormat("错误的地图id:{0}", mapId); |
| | | return 0; |
| | | } |
| | | |
| | | var dataMapId = 0; |
| | | if (config.MapFBType == (int)MapType.OpenCountry) |
| | | { |
| | | dataMapId = mapId; |
| | | } |
| | | else |
| | | { |
| | | var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>(); |
| | | dataMapId = dungeonModel.GetDataMapIdByMapId(mapId); |
| | | } |
| | | |
| | | return dataMapId; |
| | | } |
| | | |
| | | public static int GetDataMapId() |
| | | { |
| | | return GetDataMapId(PlayerDatas.Instance.baseData.MapID); |
| | | } |
| | | |
| | | public static int GetLineId(int mapId, int lineId) |
| | | { |
| | | var config = Config.Instance.Get<MapConfig>(mapId); |
| | | if (config == null) |
| | | { |
| | | DebugEx.LogErrorFormat("错误的地图id:{0}", mapId); |
| | | return 0; |
| | | } |
| | | |
| | | if (mapId == 52010 || mapId == 52020 || config.MapFBType == (int)MapType.OpenCountry) |
| | | { |
| | | return 0; |
| | | } |
| | | else |
| | | { |
| | | return lineId; |
| | | } |
| | | } |
| | | |
| | | public static int GetLineId() |
| | | { |
| | | return GetLineId(PlayerDatas.Instance.baseData.MapID, PlayerDatas.Instance.baseData.dungeonLineId); |
| | | } |
| | | |
| | | public static int GetMapResourceId(int mapId, int lineId) |
| | | { |
| | | var resourceId = 1; |
| | | var dataMapId = GetDataMapId(mapId); |
| | | var config = MapResourcesConfig.GetConfig(dataMapId, lineId); |
| | | |
| | | if (config != null) |
| | | { |
| | | resourceId = config.ID; |
| | | } |
| | | |
| | | return resourceId; |
| | | } |
| | | |
| | | public static bool IsDungeon(int mapId) |
| | | { |
| | | var config = Config.Instance.Get<MapConfig>(mapId); |
| | | if (config == null) |
| | | { |
| | | DebugEx.LogErrorFormat("错误的地图id:{0}", mapId); |
| | | return false; |
| | | } |
| | | |
| | | return config.MapFBType != (int)MapType.OpenCountry; |
| | | } |
| | | |
| | | } |
copy from Lua/Gen/StageManagerWrap.cs.meta
copy to System/WorldMap/MapUtility.cs.meta
| File was copied from Lua/Gen/StageManagerWrap.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1316663bef8bbed4f99dc61ee61da170 |
| | | timeCreated: 1548853305 |
| | | guid: 1cb580a24ce047d49a9dd13b3c2f14c0 |
| | | timeCreated: 1548677973 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | |
| | | private void Awake() |
| | | { |
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish; |
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish; |
| | | } |
| | | |
| | | protected override void OnDestroy() |
| | | { |
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish; |
| | | StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish; |
| | | base.OnDestroy(); |
| | | } |
| | | |
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (StageManager.Instance.CurrentStage != null)
|
| | | if (StageLoad.Instance.currentStage != null)
|
| | | {
|
| | | if (SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Yj
|
| | | && SDKUtility.Instance.ChannelPlatform != SDKUtility.E_ChannelPlatform.Js)
|
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using DynamicShadowProjector; |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using DynamicShadowProjector;
|
| | | using Snxxz.UI;
|
| | | using TableConfig;
|
| | |
|
| | | public class ActorShadowCaster : MonoBehaviour
|
| | | { |
| | | [SerializeField] Projector m_Projector; |
| | | [SerializeField] DrawTargetObject m_DrawTargetObject; |
| | | [SerializeField] Transform m_Target; |
| | | |
| | | {
|
| | | [SerializeField] Projector m_Projector;
|
| | | [SerializeField] DrawTargetObject m_DrawTargetObject;
|
| | | [SerializeField] Transform m_Target;
|
| | |
|
| | | public static ActorShadowCaster Cast(Transform _followTarget, Transform _castTarget)
|
| | | {
|
| | | var shadow = ActorShadowCasterPool.Require();
|
| | |
| | | }
|
| | |
|
| | | return shadow;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public void Follow(Transform _target)
|
| | | {
|
| | | m_Target = _target;
|
| | |
| | | BossShowModel.Instance.bossShowCompletedEvent -= OnBossShowCompleted;
|
| | | BossShowModel.Instance.bossShowPreparedEvent += OnBeginBossShow;
|
| | | BossShowModel.Instance.bossShowCompletedEvent += OnBossShowCompleted;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public void Cast(Transform _target)
|
| | | {
|
| | | m_DrawTargetObject.target = _target;
|
| | | m_DrawTargetObject.followTarget = false;
|
| | | m_DrawTargetObject.SetCommandBufferDirty();
|
| | |
|
| | | var config = Config.Instance.Get<SceneShadowConfig>(StageManager.Instance.stageAssetName);
|
| | | if (config != null)
|
| | | if (PlayerDatas.Instance.baseData.MapID>100)
|
| | | {
|
| | | m_Projector.transform.localEulerAngles = config.Rotation;
|
| | | m_Projector.material.SetFloat("_Alpha", config.Intensity);
|
| | | var dataMapId = MapUtility.GetDataMapId();
|
| | | var lineId = MapUtility.GetLineId();
|
| | | var mapResourcesConfig = MapResourcesConfig.GetConfig(dataMapId, lineId);
|
| | | var config = Config.Instance.Get<SceneShadowConfig>(mapResourcesConfig.MapResources);
|
| | | if (config != null)
|
| | | {
|
| | | m_Projector.transform.localEulerAngles = config.Rotation;
|
| | | m_Projector.material.SetFloat("_Alpha", config.Intensity);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public void Stop()
|
| | | {
|
| | | BossShowModel.Instance.bossShowPreparedEvent -= OnBeginBossShow;
|
| | | BossShowModel.Instance.bossShowCompletedEvent -= OnBossShowCompleted;
|
| | | ActorShadowCasterPool.Reycle(this);
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void LateUpdate()
|
| | | {
|
| | | if (m_Target == null)
|
| | |
| | | }
|
| | |
|
| | | this.transform.position = m_Target.position;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void OnBeginBossShow()
|
| | | {
|
| | | if (m_Projector != null)
|
| | | {
|
| | | m_Projector.enabled = false;
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void OnBossShowCompleted()
|
| | | {
|
| | | if (m_Projector != null)
|
| | | {
|
| | | m_Projector.enabled = true;
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public static class ActorShadowCasterPool
|
| | | {
|
| | | static GameObjectPoolManager.GameObjectPool pool;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | } |
| | | |
| | | |
| | | } |
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
| | | |
| | | public class StageLoadTimeOutCatcher : MonoBehaviour |
| | | { |
| | | |
| | | const int timeOut = 20;//秒 |
| | | |
| | | public static ProtocolRecorder got0102Time; |
| | | public static ProtocolRecorder gotA126Time; |
| | | public static ProtocolRecorder gotA127Time; |
| | |
| | | public static ProtocolRecorder got0403Time; |
| | | public static ProtocolRecorder send0107Time; |
| | | |
| | | public static StageLoadTimeOutCatcher Begin(int stageId) |
| | | { |
| | | var go = new GameObject("StageLoadTimeOutCatcher"); |
| | | var catcher = go.AddMissingComponent<StageLoadTimeOutCatcher>(); |
| | | catcher.stageId = stageId; |
| | | |
| | | DontDestroyOnLoad(go); |
| | | return catcher; |
| | | } |
| | | static StageLoadTimeOutCatcher timeOutCatcher; |
| | | |
| | | public int stageId = 0; |
| | | DateTime startTime; |
| | | public DateTime startTime; |
| | | |
| | | private void Awake() |
| | | { |
| | | startTime = DateTime.Now; |
| | | } |
| | | |
| | | public void Stop() |
| | | public static void Begin(int stageId) |
| | | { |
| | | if (this.gameObject != null) |
| | | if (timeOutCatcher != null) |
| | | { |
| | | Destroy(this.gameObject); |
| | | DestroyImmediate(timeOutCatcher.gameObject); |
| | | timeOutCatcher = null; |
| | | } |
| | | |
| | | var go = new GameObject("StageLoadTimeOutCatcher"); |
| | | var catcher = go.AddMissingComponent<StageLoadTimeOutCatcher>(); |
| | | catcher.stageId = stageId; |
| | | timeOutCatcher = catcher; |
| | | DontDestroyOnLoad(go); |
| | | } |
| | | |
| | | public static void Stop() |
| | | { |
| | | if (timeOutCatcher != null) |
| | | { |
| | | DestroyImmediate(timeOutCatcher.gameObject); |
| | | timeOutCatcher = null; |
| | | } |
| | | } |
| | | |
| | | void Update() |
| | | public static void ReportLoadingOverTime() |
| | | { |
| | | if (DateTime.Now > startTime + new TimeSpan(timeOut * TimeSpan.TicksPerSecond)) |
| | | if (timeOutCatcher != null) |
| | | { |
| | | var title = StringUtility.Contact(stageId, "地图加载超时"); |
| | | var title = StringUtility.Contact(timeOutCatcher.stageId, "地图加载超时"); |
| | | var description = StringUtility.Contact( |
| | | "开始时间:", startTime.ToString("HH:mm:ss"), "$$", |
| | | "开始时间:", timeOutCatcher.startTime.ToString("HH:mm:ss"), "$$", |
| | | "超时时间:", DateTime.Now.ToString("HH:mm:ss"), "$$", |
| | | got0102Time.ToString(), "$$", |
| | | gotA126Time.ToString(), "$$", |
| | |
| | | got0403Time.ToString()); |
| | | |
| | | ExceptionCatcher.ReportException(title, description); |
| | | Stop(); |
| | | DestroyImmediate(timeOutCatcher.gameObject); |
| | | timeOutCatcher = null; |
| | | } |
| | | } |
| | | |
| | | public static void RecordProtocol(GameNetSystem.SocketType socketType, string number, DateTime time) |
| | | public static void RecordProtocol(ServerType socketType, string number, DateTime time) |
| | | { |
| | | var recorder = new ProtocolRecorder(number, time, socketType); |
| | | switch (number) |
| | |
| | | { |
| | | public string number; |
| | | public DateTime time; |
| | | public GameNetSystem.SocketType socketType; |
| | | public ServerType socketType; |
| | | |
| | | public ProtocolRecorder(string number, DateTime time, GameNetSystem.SocketType socketType) |
| | | public ProtocolRecorder(string number, DateTime time, ServerType socketType) |
| | | { |
| | | this.number = number; |
| | | this.time = time; |
| | |
| | | public static event Action OnCreateRoleTimeRefresh;
|
| | | public static void OnRefreshCreateRoleTime(HA124_tagMCPlayerInfo _package)
|
| | | {
|
| | | if (_package.socketType==GameNetSystem.SocketType.CrossSever)
|
| | | if (_package.socketType==ServerType.CrossSever)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | public static event Action OnServerTimeRefresh;
|
| | | public static void OnRefreshServerTime(HA004_tagServerDateTime vNetData)
|
| | | {
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.CrossSever)
|
| | | if (vNetData.socketType == ServerType.CrossSever)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | public static event Action OnServerOpenDayRefresh;
|
| | | public static void OnRefreshServerOpenDay(HA005_tagOpenServerDay package)
|
| | | {
|
| | | if (package.socketType == GameNetSystem.SocketType.CrossSever)
|
| | | if (package.socketType == ServerType.CrossSever)
|
| | | {
|
| | | return;
|
| | | }
|