From 28a16bc08b937f12031c1f4af0da4ac924fbc212 Mon Sep 17 00:00:00 2001
From: leonard Wu <364452445@qq.com>
Date: 星期二, 07 八月 2018 14:04:22 +0800
Subject: [PATCH] 初始化版本库
---
System/MainInterfacePanel/PlayerMainDate.cs | 710 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 353 insertions(+), 357 deletions(-)
diff --git a/System/MainInterfacePanel/PlayerMainDate.cs b/System/MainInterfacePanel/PlayerMainDate.cs
index 95dbc8d..5256589 100644
--- a/System/MainInterfacePanel/PlayerMainDate.cs
+++ b/System/MainInterfacePanel/PlayerMainDate.cs
@@ -1,357 +1,353 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Friday, November 24, 2017
-//--------------------------------------------------------
-using UnityEngine;
-using System.Collections;
-using UnityEngine.UI;
-using TableConfig;
-using System.Collections.Generic;
-using System;
-using Snxxz.UI;
-
-//鐢ㄤ簬璁板綍涓荤晫闈㈢殑涓�浜涗俊鎭�
-
-public class PlayerMainDate : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
-{
- CapacityDelayModel m_CapacityDelayModel;
- CapacityDelayModel capacityDelayModel { get { return m_CapacityDelayModel ?? (m_CapacityDelayModel = ModelCenter.Instance.GetModel<CapacityDelayModel>()); } }
- PlayerDeadModel _deadModel;
- PlayerDeadModel DeadModel
- { get { return _deadModel ?? (_deadModel = ModelCenter.Instance.GetModel<PlayerDeadModel>()); } }
- PlayerPackModel m_PlayerPackModel;
- PlayerPackModel playerPack
- {
- get { return m_PlayerPackModel ?? (m_PlayerPackModel = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
- }
- //鐢ㄤ簬璁板綍XP鎶�鑳界殑淇℃伅
- public delegate void OnXpSkill();
- public static event OnXpSkill Event_XpSkill;
- public int SkillID = 0;
- //--------------------------------------------------------------
- public Dictionary<int, int> GetCurrencyItemID = new Dictionary<int, int>();
-
- //鍏充簬鑷姩瀵昏矾
- public bool MoveBool = false;
-
- //-------鐢ㄤ簬姣忓垎閽熺粡楠岀殑鑾峰彇
- public delegate void OnExperience(int _source, int _ExpPoint, int _Exp);//锛�1.鍗曚綅缁忛獙浜跨偣锛�2.缁忛獙鍗曚綅鐐癸級
- public static event OnExperience Event_Experience;
-
- //--------------------鐢ㄤ簬鎴樻枟鍔涙粴鍔�
- private int prowNum = 0;
- public int ProwNumAdd = 0;
- private bool prowBool = true;
-
- //----------鐢ㄤ簬鏄剧ず鐢甸噺锛�
- public float ElectricQuantity = 1;
- public static Action ElectricQuantityEvent;
- //---------鐢ㄤ簬缃戠粶淇″彿锛�
- public int NetworkState = 1;
- public int WifiSignal = 3;//wifi淇″彿寮哄害
- public static Action NetworkStateEvent;
-
- //--------濞茬殗閬楄抗锛涗腑鐨勫眰鏁拌褰曚竴涓嬩笅
- public int _layerNumber = 1;//鏈嶅姟绔殑灞傛暟
- public int LayerNumber
- {
- get
- {
- if (_layerNumber < 0)
- {
- _layerNumber = 0;
- }
- return _layerNumber;
- }
- set
- {
- _layerNumber = value;
- }
- }
- public int LayerNumberNow = 0;//鐜板湪鐨勯�夋嫨灞傛暟
- //-------------鐢ㄦ潵鎺т綇涓荤晫闈㈢殑Tip鐨勬墽琛岃皟鐢�
- public bool IsTipBool = true;
-
-
- //----------璁板綍浠诲姟闈㈡澘鐜╁鏄惁鎵ц鐐瑰嚮锛岃繘琛岃嚜鍔ㄤ换鍔�
- public bool IsSelfMotionTask = false;
-
-
- //-------------璁板綍浠欑洘浠诲姟鏀惧純浠诲姟鍚︿笉鍐嶆彁绀�
- public bool IsBoolFairyAuTaskAbandon = false;
- //------------璁板綍浠欑洘浠诲姟鑺辫垂浠欑帀鏄惁涓嶅啀鎻愮ず
- public bool IsBoolFairyAuTask = false;
-
- //------------璁板綍璧忛噾浠诲姟鑺辫垂浠欑帀鏄惁涓嶅啀鎻愮ず
- public bool IsBoolCoinTask = false;
- //-----璁板綍褰撳墠绁炵浠诲姟鐨処D
- public int MysteriousTaskID = 0;
- // 鐢ㄦ潵璁板綍鍖哄煙鐘舵�� 锛圥K妯″紡锛�
-
- public int AreaState = 0;//榛樿鍜屽钩鐘舵��
-
- //-------鐢ㄤ簬璁板綍鍦˙oss鍖哄煙浠诲姟鏉$殑鏄鹃殣鐘舵��
- public bool IsBossAreaTask = false;
- //----榫欓泙鐜妧鑳介鍔ㄨ鐨勫垏鎹㈡帴鍙�
- public void FunctionButton()//鐩存帴寮�濮嬪姛鑳芥寜閽粍
- {
- WindowCenter.Instance.Get<MainInterfaceWin>().IsShowButtonGroup();
- }
- //-----鏄惁鍦ㄨ嚜鍔ㄥ己鍖栦腑
- public bool StrengthegingBool = false;//鏄惁鍐嶈嚜鍔ㄥ己鍖栦腑
- public int StrengthegingAddFight = 0;//瀛樺彇闇�瑕佹坊鍔犵殑鎴樻枟鍔涘��
- // --鐢ㄤ簬浠诲姟浠欑帀涓嶈冻璐拱椋為瀷
- public bool IsFlyShoseBool = false;
- public int FlyShoseTaskID = 0;
- //--------鑾峰彇鐜╁姝讳骸鐘舵��
- public bool IsDead = false;
- public override void Init()
- {
- IsTipBool = true;
- ElectricQuantity = SDKUtility.ElectricQuantity;
- if (GetCurrencyItemID.Count <= 0)
- {
- string str = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MoneyDisplayModel").Numerical1;
- GetCurrencyItemID = ConfigParse.GetDic<int,int>(str);
-
- }
- OneKeyList.Clear();
- var funconfig = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("OneKeyBtnMap");
- int[] Listmap = ConfigParse.GetMultipleStr<int>(funconfig.Numerical1);
- for (int i = 0; i < Listmap.Length; i++)
- {
- OneKeyList.Add(Listmap[i]);
- }
- NetworkState = (int)SDKUtility.Instance.NetWorkState;
- }
- //----------鍏充簬鏌愪簺鍓湰鍙互杩涜鍦板浘鎸傛満
- public List<int> OneKeyList = new List<int>();
-
- //----------浣跨敤濞茬殗鍗疯酱鍚庣殑Buff琛ㄧ幇
- public static event Action EmperorBuffEvent;
- public bool IsEmperor = false;
- private void UseItemSuccessAct(int Index, int ItemID)
- {
- if (ItemID == 221)
- {
- if (!WindowCenter.Instance.CheckOpen<MainInterfaceWin>())
- {
- WindowCenter.Instance.CloseAll(WindowCenter.CloseAllIgnoreType.SystemAndCustom);
- WindowCenter.Instance.Open<MainInterfaceWin>();
- }
- if (PlayerDatas.Instance.hero != null)
- {
- SFXController _sfx = SFXPlayUtility.Instance.PlayBattleEffect(5174, PlayerDatas.Instance.hero);
- _sfx.m_OnFinished += OnSFXDisable;
- }
-
- }
- }
- private void OnSFXDisable(SFXController _controller)
- {
- _controller.m_OnFinished -= OnSFXDisable;
- if (EmperorBuffEvent != null)
- {
- IsEmperor = true;
- EmperorBuffEvent();
- }
- }
-
-
- public override void UnInit()
- {
-
- }
-
- public void OnPlayerLoginOk()
- {
- MapTransferUtility.s_OnHeroStartMoveToNPC -= OnStartPathFind;
- PlayerDatas.Instance.hero.OnPathFindStop -= OnFinishedPathFind;
- SDKUtility.Instance.onBatteryChanged -= OnBatteryChanged;//鐢甸噺
- SDKUtility.Instance.onNetStatusChanged -= OnNetStatusChanged;//鏃犵綉缁�
- SDKUtility.Instance.onPhoneSignalChanged -= onPhoneSignalChanged;//鎵嬫満缃戠粶
- SDKUtility.Instance.onWifiSignalChanged -= onWifiSignalChanged;//Wifi缃戠粶
- StrengtheningSripts.IsFightUp -= IsFightUp;//鍋滄鑷姩寮哄寲
- DeadModel.playerDieEvent -= playerDieEvent;
- playerPack.UseItemSuccessAct -= UseItemSuccessAct;
-
- MapTransferUtility.s_OnHeroStartMoveToNPC += OnStartPathFind;
- PlayerDatas.Instance.hero.OnPathFindStop += OnFinishedPathFind;
- SDKUtility.Instance.onBatteryChanged += OnBatteryChanged;//鐢甸噺
- SDKUtility.Instance.onNetStatusChanged += OnNetStatusChanged;//鏃犵綉缁�
- SDKUtility.Instance.onPhoneSignalChanged += onPhoneSignalChanged;//鎵嬫満缃戠粶
- SDKUtility.Instance.onWifiSignalChanged += onWifiSignalChanged;//Wifi缃戠粶
- StrengtheningSripts.IsFightUp += IsFightUp;//鍋滄鑷姩寮哄寲
- DeadModel.playerDieEvent += playerDieEvent;//鑾峰彇鐜╁姝讳骸鐘舵��
- playerPack.UseItemSuccessAct += UseItemSuccessAct;
- }
-
-
-
- private void playerDieEvent()
- {
- IsDead = true;
- }
-
- public void OnBeforePlayerDataInitialize()
- {
- FlyShoseTaskID = 0;
- IsFlyShoseBool = false;
- StrengthegingAddFight = 0;
- StrengthegingBool = false;
- IsTipBool = true;
- prowNum = 0;
- ProwNumAdd = 0;
- prowBool = true;
- SkillID = 0;
- MoveBool = false;
- IsSelfMotionTask = false;
- IsBoolFairyAuTask = false;
- IsBoolFairyAuTaskAbandon = false;
- IsBoolCoinTask = false;
- IsBossAreaTask = false;
- IsDead = false;
- IsEmperor = false;
- if (PlayerDatas.Instance.hero != null)
- {
- MapTransferUtility.s_OnHeroStartMoveToNPC -= OnStartPathFind;
- PlayerDatas.Instance.hero.OnPathFindStop -= OnFinishedPathFind;
- }
-
- }
-
- private void OnNetStatusChanged(int arg0)
- {
- NetworkState = arg0;
- if (NetworkStateEvent != null)
- {
- NetworkStateEvent();
- }
- }
-
- private void onWifiSignalChanged(int arg0)
- {
- WifiSignal = arg0;
- NetworkState = arg0;
- if (NetworkStateEvent != null)
- {
- NetworkStateEvent();
- }
- }
-
- private void onPhoneSignalChanged(int arg0)
- {
- NetworkState = arg0;
- if (NetworkStateEvent != null)
- {
- NetworkStateEvent();
- }
- }
-
- private void OnBatteryChanged(int arg0, int arg1)
- {
- ElectricQuantity = SDKUtility.ElectricQuantity;
- if (ElectricQuantityEvent != null)
- {
- ElectricQuantityEvent();
- }
- }
-
-
- private void OnStartPathFind()
- {
-
- MoveBool = true;
- }
-
- private void OnFinishedPathFind()
- {
-
- MoveBool = false;
- }
- public void XpSkill(int _SkillID, int _RemainTime)
- {
- SkillID = _SkillID;
- if (Event_XpSkill != null)
- Event_XpSkill();
- }
-
- public void PowerAdd(int power)
- {
- if (prowBool)
- {
- prowNum = power;
- prowBool = false;
- }
- else
- {
- if (power > prowNum)
- {
- ProwNumAdd = power - prowNum;
- if (StrengthegingBool || StrengthegingAddFight!=0)
- {
- StrengthegingAddFight += ProwNumAdd;
- }
- prowNum = power;
- if (!StrengthegingBool && StrengthegingAddFight==0)
- {
- if (WindowCenter.Instance.CheckOpen<PowerAddWin>())
- {
- WindowCenter.Instance.CloseImmediately<PowerAddWin>();
- }
- WindowCenter.Instance.Open<PowerAddWin>();
- }
-
- }
- else
- {
- prowNum = power;
- }
- }
- }
-
- private void IsFightUp()//瀛樺偍鑷姩寮哄寲涓棿鐨勫��
- {
- if (StrengthegingAddFight > 0)
- {
- SnxxzGame.Instance.StartCoroutine(LoadingIE());
- }
-
- }
-
- IEnumerator LoadingIE()
- {
- yield return new WaitForSeconds(0.5f);
- ProwNumAdd = StrengthegingAddFight;
- StrengthegingAddFight = 0;
- if (WindowCenter.Instance.CheckOpen<PowerAddWin>())
- {
- WindowCenter.Instance.CloseImmediately<PowerAddWin>();
- }
- WindowCenter.Instance.Open<PowerAddWin>();
- }
-
- public void KissMonsterExperience(int _source, int _ExpPoint, int _Exp)//锛�1.鍗曚綅缁忛獙浜跨偣锛�2.缁忛獙鍗曚綅鐐癸級
- {
- if (Event_Experience != null)
- {
- Event_Experience(_source, _ExpPoint, _Exp);
- }
- }
- public bool IsRedPointShowPanel()//褰撲富鐣岄潰鏈夊甫鏈夆�滈鈥濆瓧鐨勭孩鐐逛笂灞傞潰鏉块粯璁ゅ睍寮�
- {
- bool IsBool = false;
- var State1 = RedpointCenter.Instance.GetRedpointState(201);//绂忓埄
- var State2 = RedpointCenter.Instance.GetRedpointState(210);
- if (State1 == RedPointState.Simple || State2 == RedPointState.Simple)
- {
- IsBool = true;
- }
- return IsBool;
- }
-}
-
-
-
-
-
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Friday, November 24, 2017
+//--------------------------------------------------------
+using UnityEngine;
+using System.Collections;
+using UnityEngine.UI;
+using TableConfig;
+using System.Collections.Generic;
+using System;
+using Snxxz.UI;
+
+//鐢ㄤ簬璁板綍涓荤晫闈㈢殑涓�浜涗俊鎭�
+
+public class PlayerMainDate : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
+{
+ CapacityDelayModel m_CapacityDelayModel;
+ CapacityDelayModel capacityDelayModel { get { return m_CapacityDelayModel ?? (m_CapacityDelayModel = ModelCenter.Instance.GetModel<CapacityDelayModel>()); } }
+ PlayerDeadModel _deadModel;
+ PlayerDeadModel DeadModel
+ { get { return _deadModel ?? (_deadModel = ModelCenter.Instance.GetModel<PlayerDeadModel>()); } }
+ PlayerPackModel m_PlayerPackModel;
+ PlayerPackModel playerPack
+ {
+ get { return m_PlayerPackModel ?? (m_PlayerPackModel = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
+ }
+ //鐢ㄤ簬璁板綍XP鎶�鑳界殑淇℃伅
+ public delegate void OnXpSkill();
+ public static event OnXpSkill Event_XpSkill;
+ public int SkillID = 0;
+ //--------------------------------------------------------------
+ public Dictionary<int, int> GetCurrencyItemID = new Dictionary<int, int>();
+
+ //鍏充簬鑷姩瀵昏矾
+ public bool MoveBool = false;
+
+ //-------鐢ㄤ簬姣忓垎閽熺粡楠岀殑鑾峰彇
+ public delegate void OnExperience(int _source, int _ExpPoint, int _Exp);//锛�1.鍗曚綅缁忛獙浜跨偣锛�2.缁忛獙鍗曚綅鐐癸級
+ public static event OnExperience Event_Experience;
+
+ //--------------------鐢ㄤ簬鎴樻枟鍔涙粴鍔�
+ private int prowNum = 0;
+ public int ProwNumAdd = 0;
+ private bool prowBool = true;
+
+ //----------鐢ㄤ簬鏄剧ず鐢甸噺锛�
+ public float ElectricQuantity = 1;
+ public static Action ElectricQuantityEvent;
+ //---------鐢ㄤ簬缃戠粶淇″彿锛�
+ public int NetworkState = 1;
+ public int WifiSignal = 3;//wifi淇″彿寮哄害
+ public static Action NetworkStateEvent;
+
+ //--------濞茬殗閬楄抗锛涗腑鐨勫眰鏁拌褰曚竴涓嬩笅
+ public int _layerNumber = 1;//鏈嶅姟绔殑灞傛暟
+ public int LayerNumber
+ {
+ get
+ {
+ if (_layerNumber < 0)
+ {
+ _layerNumber = 0;
+ }
+ return _layerNumber;
+ }
+ set
+ {
+ _layerNumber = value;
+ }
+ }
+ public int LayerNumberNow = 0;//鐜板湪鐨勯�夋嫨灞傛暟
+ //-------------鐢ㄦ潵鎺т綇涓荤晫闈㈢殑Tip鐨勬墽琛岃皟鐢�
+ public bool IsTipBool = true;
+
+
+ //----------璁板綍浠诲姟闈㈡澘鐜╁鏄惁鎵ц鐐瑰嚮锛岃繘琛岃嚜鍔ㄤ换鍔�
+ public bool IsSelfMotionTask = false;
+
+
+ //-------------璁板綍浠欑洘浠诲姟鏀惧純浠诲姟鍚︿笉鍐嶆彁绀�
+ public bool IsBoolFairyAuTaskAbandon = false;
+ //------------璁板綍浠欑洘浠诲姟鑺辫垂浠欑帀鏄惁涓嶅啀鎻愮ず
+ public bool IsBoolFairyAuTask = false;
+
+ //------------璁板綍璧忛噾浠诲姟鑺辫垂浠欑帀鏄惁涓嶅啀鎻愮ず
+ public bool IsBoolCoinTask = false;
+ //-----璁板綍褰撳墠绁炵浠诲姟鐨処D
+ public int MysteriousTaskID = 0;
+ // 鐢ㄦ潵璁板綍鍖哄煙鐘舵�� 锛圥K妯″紡锛�
+
+ public int AreaState = 0;//榛樿鍜屽钩鐘舵��
+
+ //-------鐢ㄤ簬璁板綍鍦˙oss鍖哄煙浠诲姟鏉$殑鏄鹃殣鐘舵��
+ public bool IsBossAreaTask = false;
+ //----榫欓泙鐜妧鑳介鍔ㄨ鐨勫垏鎹㈡帴鍙�
+ public void FunctionButton()//鐩存帴寮�濮嬪姛鑳芥寜閽粍
+ {
+ WindowCenter.Instance.Get<MainInterfaceWin>().IsShowButtonGroup();
+ }
+ //-----鏄惁鍦ㄨ嚜鍔ㄥ己鍖栦腑
+ public bool StrengthegingBool = false;//鏄惁鍐嶈嚜鍔ㄥ己鍖栦腑
+ public int StrengthegingAddFight = 0;//瀛樺彇闇�瑕佹坊鍔犵殑鎴樻枟鍔涘��
+ // --鐢ㄤ簬浠诲姟浠欑帀涓嶈冻璐拱椋為瀷
+ public bool IsFlyShoseBool = false;
+ public int FlyShoseTaskID = 0;
+ //--------鑾峰彇鐜╁姝讳骸鐘舵��
+ public bool IsDead = false;
+ public override void Init()
+ {
+ IsTipBool = true;
+ ElectricQuantity = SDKUtility.Instance.BatteryLevel;
+ if (GetCurrencyItemID.Count <= 0)
+ {
+ string str = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MoneyDisplayModel").Numerical1;
+ GetCurrencyItemID = ConfigParse.GetDic<int, int>(str);
+
+ }
+ OneKeyList.Clear();
+ var funconfig = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("OneKeyBtnMap");
+ int[] Listmap = ConfigParse.GetMultipleStr<int>(funconfig.Numerical1);
+ for (int i = 0; i < Listmap.Length; i++)
+ {
+ OneKeyList.Add(Listmap[i]);
+ }
+ NetworkState = (int)SDKUtility.Instance.NetworkType;
+ }
+ //----------鍏充簬鏌愪簺鍓湰鍙互杩涜鍦板浘鎸傛満
+ public List<int> OneKeyList = new List<int>();
+
+ //----------浣跨敤濞茬殗鍗疯酱鍚庣殑Buff琛ㄧ幇
+ public static event Action EmperorBuffEvent;
+ public bool IsEmperor = false;
+ private void UseItemSuccessAct(int Index, int ItemID)
+ {
+ if (ItemID == 221)
+ {
+ if (!WindowCenter.Instance.CheckOpen<MainInterfaceWin>())
+ {
+ WindowCenter.Instance.CloseAll(WindowCenter.CloseAllIgnoreType.SystemAndCustom);
+ WindowCenter.Instance.Open<MainInterfaceWin>();
+ }
+ if (PlayerDatas.Instance.hero != null)
+ {
+ SFXController _sfx = SFXPlayUtility.Instance.PlayBattleEffect(5174, PlayerDatas.Instance.hero);
+ _sfx.m_OnFinished += OnSFXDisable;
+ }
+
+ }
+ }
+ private void OnSFXDisable(SFXController _controller)
+ {
+ _controller.m_OnFinished -= OnSFXDisable;
+ if (EmperorBuffEvent != null)
+ {
+ IsEmperor = true;
+ EmperorBuffEvent();
+ }
+ }
+
+
+ public override void UnInit()
+ {
+
+ }
+
+ public void OnPlayerLoginOk()
+ {
+ MapTransferUtility.s_OnHeroStartMoveToNPC -= OnStartPathFind;
+ PlayerDatas.Instance.hero.OnPathFindStop -= OnFinishedPathFind;
+ SDKUtility.Instance.OnBatteryLevelChanged -= OnBatteryChanged;//鐢甸噺
+ SDKUtility.Instance.OnNetworkStatusChanged -= OnNetStatusChanged;//鏃犵綉缁�
+ StrengtheningSripts.IsFightUp -= IsFightUp;//鍋滄鑷姩寮哄寲
+ DeadModel.playerDieEvent -= playerDieEvent;
+ playerPack.UseItemSuccessAct -= UseItemSuccessAct;
+
+ MapTransferUtility.s_OnHeroStartMoveToNPC += OnStartPathFind;
+ PlayerDatas.Instance.hero.OnPathFindStop += OnFinishedPathFind;
+ SDKUtility.Instance.OnBatteryLevelChanged += OnBatteryChanged;//鐢甸噺
+ SDKUtility.Instance.OnNetworkStatusChanged += OnNetStatusChanged;//鏃犵綉缁�
+ StrengtheningSripts.IsFightUp += IsFightUp;//鍋滄鑷姩寮哄寲
+ DeadModel.playerDieEvent += playerDieEvent;//鑾峰彇鐜╁姝讳骸鐘舵��
+ playerPack.UseItemSuccessAct += UseItemSuccessAct;
+ }
+
+
+
+ private void playerDieEvent()
+ {
+ IsDead = true;
+ }
+
+ public void OnBeforePlayerDataInitialize()
+ {
+ FlyShoseTaskID = 0;
+ IsFlyShoseBool = false;
+ StrengthegingAddFight = 0;
+ StrengthegingBool = false;
+ IsTipBool = true;
+ prowNum = 0;
+ ProwNumAdd = 0;
+ prowBool = true;
+ SkillID = 0;
+ MoveBool = false;
+ IsSelfMotionTask = false;
+ IsBoolFairyAuTask = false;
+ IsBoolFairyAuTaskAbandon = false;
+ IsBoolCoinTask = false;
+ IsBossAreaTask = false;
+ IsDead = false;
+ IsEmperor = false;
+ if (PlayerDatas.Instance.hero != null)
+ {
+ MapTransferUtility.s_OnHeroStartMoveToNPC -= OnStartPathFind;
+ PlayerDatas.Instance.hero.OnPathFindStop -= OnFinishedPathFind;
+ }
+
+ }
+
+ private void OnNetStatusChanged(NetworkReachability arg0)
+ {
+ NetworkState = (int)arg0;
+ if (NetworkStateEvent != null)
+ {
+ NetworkStateEvent();
+ }
+ }
+
+ private void onWifiSignalChanged(int arg0)
+ {
+ WifiSignal = arg0;
+ NetworkState = arg0;
+ if (NetworkStateEvent != null)
+ {
+ NetworkStateEvent();
+ }
+ }
+
+ private void onPhoneSignalChanged(int arg0)
+ {
+ NetworkState = arg0;
+ if (NetworkStateEvent != null)
+ {
+ NetworkStateEvent();
+ }
+ }
+
+ private void OnBatteryChanged(int arg0)
+ {
+ ElectricQuantity = SDKUtility.Instance.BatteryLevel;
+ if (ElectricQuantityEvent != null)
+ {
+ ElectricQuantityEvent();
+ }
+ }
+
+
+ private void OnStartPathFind()
+ {
+
+ MoveBool = true;
+ }
+
+ private void OnFinishedPathFind()
+ {
+
+ MoveBool = false;
+ }
+ public void XpSkill(int _SkillID, int _RemainTime)
+ {
+ SkillID = _SkillID;
+ if (Event_XpSkill != null)
+ Event_XpSkill();
+ }
+
+ public void PowerAdd(int power)
+ {
+ if (prowBool)
+ {
+ prowNum = power;
+ prowBool = false;
+ }
+ else
+ {
+ if (power > prowNum)
+ {
+ ProwNumAdd = power - prowNum;
+ if (StrengthegingBool || StrengthegingAddFight != 0)
+ {
+ StrengthegingAddFight += ProwNumAdd;
+ }
+ prowNum = power;
+ if (!StrengthegingBool && StrengthegingAddFight == 0)
+ {
+ if (WindowCenter.Instance.CheckOpen<PowerAddWin>())
+ {
+ WindowCenter.Instance.CloseImmediately<PowerAddWin>();
+ }
+ WindowCenter.Instance.Open<PowerAddWin>();
+ }
+
+ }
+ else
+ {
+ prowNum = power;
+ }
+ }
+ }
+
+ private void IsFightUp()//瀛樺偍鑷姩寮哄寲涓棿鐨勫��
+ {
+ if (StrengthegingAddFight > 0)
+ {
+ SnxxzGame.Instance.StartCoroutine(LoadingIE());
+ }
+
+ }
+
+ IEnumerator LoadingIE()
+ {
+ yield return new WaitForSeconds(0.5f);
+ ProwNumAdd = StrengthegingAddFight;
+ StrengthegingAddFight = 0;
+ if (WindowCenter.Instance.CheckOpen<PowerAddWin>())
+ {
+ WindowCenter.Instance.CloseImmediately<PowerAddWin>();
+ }
+ WindowCenter.Instance.Open<PowerAddWin>();
+ }
+
+ public void KissMonsterExperience(int _source, int _ExpPoint, int _Exp)//锛�1.鍗曚綅缁忛獙浜跨偣锛�2.缁忛獙鍗曚綅鐐癸級
+ {
+ if (Event_Experience != null)
+ {
+ Event_Experience(_source, _ExpPoint, _Exp);
+ }
+ }
+ public bool IsRedPointShowPanel()//褰撲富鐣岄潰鏈夊甫鏈夆�滈鈥濆瓧鐨勭孩鐐逛笂灞傞潰鏉块粯璁ゅ睍寮�
+ {
+ bool IsBool = false;
+ var State1 = RedpointCenter.Instance.GetRedpointState(201);//绂忓埄
+ var State2 = RedpointCenter.Instance.GetRedpointState(210);
+ if (State1 == RedPointState.Simple || State2 == RedPointState.Simple)
+ {
+ IsBool = true;
+ }
+ return IsBool;
+ }
+}
+
+
+
+
+
--
Gitblit v1.8.0