Esempio n. 1
0
 public void OnFormClosed()
 {
     this.UnregisterEvents();
     this.m_battleFloatDigitManager.ClearAllBattleFloatText();
     this.m_battleEquipSystem.Clear();
     if (this._miniMapSys != null)
     {
         this._miniMapSys.Clear();
         this._miniMapSys = null;
     }
     if (this._killNotify != null)
     {
         this._killNotify.Clear();
         this._killNotify = null;
     }
     if (this.m_towerHitMgr != null)
     {
         this.m_towerHitMgr.Clear();
         this.m_towerHitMgr = null;
     }
     if (this._battleStatView != null)
     {
         this._battleStatView.Clear();
         this._battleStatView = null;
     }
     this._battleForm = null;
 }
Esempio n. 2
0
        public void OpenForm(CBattleSystem.FormType formType)
        {
            this.m_MaxBattleFPS   = 0f;
            this.m_MinBattleFPS   = 3.40282347E+38f;
            this.m_AveBattleFPS   = 0f;
            this.m_BattleFPSCount = 0f;
            this.m_frameCount     = 0;
            if (formType == CBattleSystem.FormType.Fight)
            {
                this._battle3DTouch = new InBattle3DTouch();
                this._battle3DTouch.Init();
                this._battleForm = new FightForm();
            }
            else if (formType == CBattleSystem.FormType.Watch)
            {
                this._battleForm = new WatchForm();
            }
            if (this._battleForm == null || !this._battleForm.OpenForm())
            {
                this._battleForm = null;
                return;
            }
            Player hostPlayer = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer();

            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            this.m_battleEquipSystem.Initialize(this.FightFormScript, hostPlayer.Captain, curLvelContext.IsMobaMode(), curLvelContext.m_isBattleEquipLimit);
            this._miniMapSys = new MinimapSys();
            this._miniMapSys.Init(this.FormScript, curLvelContext);
            this._killNotify = new KillNotify();
            this._killNotify.Init();
            this._killNotify.Hide();
            this.m_towerHitMgr = new TowerHitMgr();
            this.m_towerHitMgr.Init();
            if (curLvelContext.IsMobaMode())
            {
                this._battleStatView = new BattleStatView();
                this._battleStatView.Init();
            }
            this.pauseControl = new PauseControl(this.FormScript);
            this.RegisterEvents();
        }
Esempio n. 3
0
        public void OpenForm(FormType formType)
        {
            this.m_MaxBattleFPS   = 0f;
            this.m_MinBattleFPS   = float.MaxValue;
            this.m_AveBattleFPS   = 0f;
            this.m_BattleFPSCount = 0f;
            this.m_frameCount     = 0;
            if (formType == FormType.Fight)
            {
                this._battleForm = new Assets.Scripts.GameSystem.FightForm();
            }
            else if (formType == FormType.Watch)
            {
                this._battleForm = new Assets.Scripts.GameSystem.WatchForm();
            }
            if ((this._battleForm == null) || !this._battleForm.OpenForm())
            {
                this._battleForm = null;
            }
            else
            {
                Player hostPlayer = Singleton <GamePlayerCenter> .instance.GetHostPlayer();

                SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

                this.m_battleEquipSystem.Initialize(this.FightFormScript, hostPlayer.Captain, curLvelContext.IsMobaMode(), curLvelContext.m_isBattleEquipLimit);
                this._miniMapSys = new MinimapSys();
                this._miniMapSys.Init(this.FormScript, curLvelContext);
                this._killNotify = new KillNotify();
                this._killNotify.Init(this.FormScript);
                this._killNotify.Hide();
                this.m_towerHitMgr = new Assets.Scripts.GameSystem.TowerHitMgr();
                this.m_towerHitMgr.Init();
                if (curLvelContext.IsMobaMode())
                {
                    this._battleStatView = new Assets.Scripts.GameSystem.BattleStatView();
                    this._battleStatView.Init();
                }
                this.RegisterEvents();
            }
        }
Esempio n. 4
0
        public void Init()
        {
            this.IsPlaying = false;
            Singleton <EventRouter> .get_instance().AddEventHandler <KillDetailInfo>(EventID.AchievementRecorderEvent, new Action <KillDetailInfo>(this.OnAchievementEvent));

            this.m_formScript        = KillNotify.GetKillNotifyFormScript();
            this.node                = Utility.FindChild(this.m_formScript.gameObject, "KillNotify_New");
            this.animatorScript      = Utility.GetComponetInChild <CUIAnimatorScript>(this.node, "KillNotify_Sub");
            this.KillerImg           = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/KillerHead/KillerImg");
            this.VictimImg           = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/VictimHead/VictimImg");
            this.killerHead          = Utility.FindChild(this.node, "KillNotify_Sub/KillerHead");
            this.VictimHead          = Utility.FindChild(this.node, "KillNotify_Sub/VictimHead");
            this.assistList          = Utility.FindChild(this.node, "KillNotify_Sub/AssistHeadList");
            this.assistHeads[0]      = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_1");
            this.assistHeads[1]      = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_2");
            this.assistHeads[2]      = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_3");
            this.assistHeads[3]      = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_4");
            this.assistHeadFrames[0] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_1/Frame");
            this.assistHeadFrames[1] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_2/Frame");
            this.assistHeadFrames[2] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_3/Frame");
            this.assistHeadFrames[3] = Utility.GetComponetInChild <Image>(this.node, "KillNotify_Sub/AssistHeadList/Pl_Assist/Pl_Head/Head_4/Frame");
            this.Hide();
            this.hideTimer = Singleton <CTimerManager> .GetInstance().AddTimer(KillNotify.HideTime, -1, new CTimer.OnTimeUpHandler(this.OnPlayEnd));

            Singleton <CTimerManager> .GetInstance().PauseTimer(this.hideTimer);

            this.play_delta_timer = Singleton <CTimerManager> .GetInstance().AddTimer(KillNotify.s_play_deltaTime, -1, new CTimer.OnTimeUpHandler(this.On_Play_DeltaEnd));

            Singleton <CTimerManager> .GetInstance().PauseTimer(this.play_delta_timer);

            SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext();

            if (curLvelContext != null && curLvelContext.IsFireHolePlayMode())
            {
                this.sub_sys = new FireHoleKillNotify();
            }
        }