CommandCallbackType sMSGEctypePlayerReviveHandle(byte[] dataBuffer, int socketID) { SMSGEctypePlayerRevive_SC sMSGEctypePlayerRevive_SC = SMSGEctypePlayerRevive_SC.ParsePackage(dataBuffer); GameDataManager.Instance.ResetData(DataType.CountDownUI, sMSGEctypePlayerRevive_SC); //UIEventManager.Instance.TriggerUIEvent(UIEventType.CountDownUI, sMSGEctypePlayerRevive_SC); return(CommandCallbackType.Continue); }
public void Show(object obj) { IsShow = true; SMSGEctypePlayerRevive_SC sMSGEctypePlayerRevive_SC = (SMSGEctypePlayerRevive_SC)obj; if (CountUIObj == null) { CountUIObj = CreatObjectToNGUI.InstantiateObj(CountDownUIPrefab, BattleUIManager.Instance.GetScreenTransform(ScreenPositionType.Center)); CountUIScript = CountUIObj.GetComponent <CountdownUITips>(); //CountUIScript.SetButtonText01(LanguageTextManager.GetString("IDS_H1_197")); } CountUIObj.transform.localPosition = new Vector3(0, 0, -50); CurrentTime = (int)sMSGEctypePlayerRevive_SC.dwReliveTime - (int)(Time.realtimeSinceStartup - sMSGEctypePlayerRevive_SC.ReceiveMsgTime); StopAllCoroutines(); StartCoroutine(CountDown()); SoundManager.Instance.PlaySoundEffect("Sound_UIEff_DeadCountdown", true); }
void ResetCountDownTimeHandle(object obj) { SMSGEctypePlayerRevive_SC sMSGEctypePlayerRevive_SC = (SMSGEctypePlayerRevive_SC)obj; if (sMSGEctypePlayerRevive_SC.dwActorID != PlayerManager.Instance.FindHeroDataModel().ActorID) { return; } m_lastEctypePlayerReviveMsg = sMSGEctypePlayerRevive_SC; float CurrentTime = EctypeManager.Instance.GetCurrentEctypeData().ReviveTime - (sMSGEctypePlayerRevive_SC.dwReliveTime / 1000f - (Time.realtimeSinceStartup - sMSGEctypePlayerRevive_SC.ReceiveMsgTime)); if (heroResurrectionTips != null) { heroResurrectionTips.ResetCutDownTime(CurrentTime); } }