示例#1
0
        public void Init(CUIFormScript formObj)
        {
            this.IsPlaying = false;
            Singleton <EventRouter> .instance.AddEventHandler <KillDetailInfo>(EventID.AchievementRecorderEvent, new Action <KillDetailInfo>(this.OnAchievementEvent));

            this.node           = Utility.FindChild(formObj.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.Hide();
            this.hideTimer = Singleton <CTimerManager> .GetInstance().AddTimer(HideTime, -1, new CTimer.OnTimeUpHandler(this.OnPlayEnd));

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

            this.play_delta_timer = Singleton <CTimerManager> .GetInstance().AddTimer(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();
            }
        }
示例#2
0
        public void Clear()
        {
            Singleton <EventRouter> .instance.RemoveEventHandler <KillDetailInfo>(EventID.AchievementRecorderEvent, new Action <KillDetailInfo>(this.OnAchievementEvent));

            this.KillInfoList.Clear();
            this.animatorScript = null;
            this.killerHead     = (GameObject)(this.VictimHead = null);
            this.KillerImg      = (Image)(this.VictimImg = null);
            Singleton <CTimerManager> .GetInstance().RemoveTimer(this.hideTimer);

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

            this.IsPlaying = false;
            this.node      = null;
            if (this.sub_sys != null)
            {
                this.sub_sys.Clear();
                this.sub_sys = null;
            }
        }
示例#3
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();
            }
        }
示例#4
0
        public void Clear()
        {
            Singleton <EventRouter> .get_instance().RemoveEventHandler <KillDetailInfo>(EventID.AchievementRecorderEvent, new Action <KillDetailInfo>(this.OnAchievementEvent));

            this.KillInfoList.Clear();
            this.animatorScript   = null;
            this.killerHead       = (this.VictimHead = null);
            this.KillerImg        = (this.VictimImg = null);
            this.assistHeads      = null;
            this.assistHeadFrames = null;
            Singleton <CTimerManager> .GetInstance().RemoveTimer(this.hideTimer);

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

            this.IsPlaying = false;
            this.node      = null;
            if (this.sub_sys != null)
            {
                this.sub_sys.Clear();
                this.sub_sys = null;
            }
            this.m_formScript = null;
            Singleton <CUIManager> .get_instance().CloseForm(KillNotify.s_killNotifyFormPath);
        }