Esempio n. 1
0
        /// <summary>
        /// 注册msg消息到DataCenter,关联对应的DC处理msg消息
        /// </summary>
        public void RegisterDCHooks()
        {
            /// 示例
            ///DataCenter.RegisterDCHooks(MsgType.kMsgGS2CLServerTimeNotice, GameTimeDC.RecvMsgGS2CLServerTimeNotice);

            EventCenter.RegisterHooks(EventCenterType.SimServer_DataUpataNotify, UserDC.UpdateData);
        }
Esempio n. 2
0
    private void RegisterHooks()
    {
        EventCenter.RegisterHooks(EventCenterType.Battle_LoadBallFinish, SetBallTransform);
        EventCenter.RegisterHooks(EventCenterType.Battle_SwitchCamera2Fly, SwitchCamera2Fly);
        EventCenter.RegisterHooks(EventCenterType.Battle_SwitchCamera2Roll, SwitchCamera2Roll);
        EventCenter.RegisterHooks(EventCenterType.Battle_SwitchCamera2RollDrive, SwitchCamera2RollDrive);
        EventCenter.RegisterHooks(EventCenterType.Battle_SwitchCamera2NearHole, SwitchCamera2NearHole);
        EventCenter.RegisterHooks(EventCenterType.Battle_SkyView, SwitchCamera2Sky);
        EventCenter.RegisterHooks(EventCenterType.Battle_SightView, SwitchCamera2FlyDrive);
        EventCenter.RegisterHooks(EventCenterType.Battle_DragMapMoveCamera, DragMapMoveCamera);
        EventCenter.RegisterHooks(EventCenterType.Battle_ScaleMapMoveCamera, ScaleMapMoveCamera);

        EventCenter.RegisterHooks(EventCenterType.Battle_RoundStart, RoundStart);
    }
Esempio n. 3
0
    public void CombatInit()
    {
        SetLifeData();
        if (m_Attr != null)
        {
            m_TotalTime = m_Attr.LifeTime * 0.001f;
        }

        RoleSkin();
        EventCenter.RegisterHooks(NDEventType.StatusCG, SetStatus);

        if (m_PetType == 1002)
        {
            InitHP();
            HP          = fullHP;
            m_TotalTime = float.MaxValue;
        }
        if (m_PetType == 1003)
        {
        }
    }
Esempio n. 4
0
    public virtual void InitBuild()
    {
        InitHP();
        HP = fullHP;

        SetSkin();
        //读取连击次数
        m_fAttackTickReady = 0;
        if (m_Skill != null)
        {
            BuildSkill skillBuild = m_Skill as BuildSkill;
            if (skillBuild.PropSkillInfo.m_attckmodeid > 0)
            {
                skillBuild.PropSkillInfo.GetAttackTimes(ref m_Attacktimes);
            }
            else
            {
                m_Attacktimes.Add(0.0f);
            }
        }
        m_nAttackCount = m_Attacktimes.Count;

        EventCenter.RegisterHooks(NDEventType.StatusCG, SetStatus);
        // -----buildingroom
        BuildColider bc = GetComponent <BuildColider>();

        if (bc != null)
        {
            bc.EnableBattleCollider(true);
        }
        BuildInfo info = CmCarbon.GetBuildInfo(this.m_Core.m_DataID);

        if (info != null)
        {
            ShowHP(info.BuildType, info.m_bear);
            m_roomType = info.m_RoomType;
        }
    }
Esempio n. 5
0
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_UpdateRingPos, UpdatePos);
     EventCenter.RegisterHooks(EventCenterType.Battle_ShowRing, ShowRing);
 }
Esempio n. 6
0
 private void RegisterHooks()
 {
     EventCenter.RegisterHooks(EventCenterType.Battle_DrawPath, RefreshGolfPath);
     EventCenter.RegisterHooks(EventCenterType.Battle_BattingFinish, BattingFinish);
 }
Esempio n. 7
0
 // 注册消息函数
 private void RegisterHooks()
 {
     EventCenter.RegisterHooks(EventCenterType.Battle_PathCrossHole, SetHoleEffect);
 }
Esempio n. 8
0
 // 注册消息函数
 private void RegisterHooks()
 {
     EventCenter.RegisterHooks(EventCenterType.Battle_RoundStart, OnBattle_RoundStart);
 }
Esempio n. 9
0
 public void Init(int SceneID)
 {
     m_SceneID = SceneID;
     EventCenter.RegisterHooks(NDEventType.StatusInterrupt, InterruptStatus);
 }
Esempio n. 10
0
 private void RegisterHooks()
 {
     EventCenter.RegisterHooks(EventCenterType.Battle_BattingFinish, BattingFinish);
 }