Esempio n. 1
0
    private void AntiRegisterHooks()
    {
        EventCenter.AntiRegisterHooks(EventCenterType.Battle_LoadBallFinish, SetBallTransform);
        EventCenter.AntiRegisterHooks(EventCenterType.Battle_SwitchCamera2Fly, SwitchCamera2Fly);
        EventCenter.AntiRegisterHooks(EventCenterType.Battle_SwitchCamera2Roll, SwitchCamera2Roll);
        EventCenter.AntiRegisterHooks(EventCenterType.Battle_SwitchCamera2RollDrive, SwitchCamera2RollDrive);
        EventCenter.AntiRegisterHooks(EventCenterType.Battle_SwitchCamera2NearHole, SwitchCamera2NearHole);
        EventCenter.AntiRegisterHooks(EventCenterType.Battle_SkyView, SwitchCamera2Sky);
        EventCenter.AntiRegisterHooks(EventCenterType.Battle_SightView, SwitchCamera2FlyDrive);
        EventCenter.AntiRegisterHooks(EventCenterType.Battle_DragMapMoveCamera, DragMapMoveCamera);
        EventCenter.AntiRegisterHooks(EventCenterType.Battle_ScaleMapMoveCamera, ScaleMapMoveCamera);

        EventCenter.RegisterHooks(EventCenterType.Battle_RoundStart, RoundStart);
    }
Esempio n. 2
0
    public override void BeforeDead()
    {
        base.BeforeDead();
        int wood = m_Attr.Wood;

        if (wood > 0)
        {
            Vector3 pos = MapGrid.GetMG(m_Attr.Pos).pos;
            pos += new Vector3(0, 0.5f, 1.2f);//此处y控制深度, z控制高度

            DropResource.Drop(ResourceType.Wood, wood, pos);
            CmCarbon.SetAddWinWood(wood);
        }
        int stone = m_Attr.Stone;

        if (stone > 0)
        {
            Debug.Log("get stone:" + stone + "," + this);
        }
        int steel = m_Attr.Steel;

        if (steel > 0)
        {
            Debug.Log("get steel:" + steel + "," + this);
        }

        List <Life> listRAW = new List <Life>();

        CM.SearchLifeMListInBoat(ref listRAW, LifeMType.SOLDIER, LifeMCamp.ATTACK);

        foreach (var item in listRAW)
        {
            Role r = item as Role;
            r.ChangeTarget(ChangeTargetReason.ClearOtherTarget, this);
        }
        EventCenter.AntiRegisterHooks(NDEventType.StatusCG, SetStatus);
        Destroy();
    }
Esempio n. 3
0
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_UpdateRingPos, UpdatePos);
     EventCenter.RegisterHooks(EventCenterType.Battle_ShowRing, ShowRing);
 }
Esempio n. 4
0
 public override void KillSelf(float delay = 0)
 {
     EventCenter.AntiRegisterHooks(NDEventType.StatusCG, SetStatus);
     Dead();
     Destroy();
 }
Esempio n. 5
0
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_DrawPath, RefreshGolfPath);
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_BattingFinish, BattingFinish);
 }
Esempio n. 6
0
 // 反注册消息函数
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_PathCrossHole, SetHoleEffect);
 }
Esempio n. 7
0
 // 反注册消息函数
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_RoundStart, OnBattle_RoundStart);
 }
Esempio n. 8
0
 public virtual void OnDestroy()
 {
     EventCenter.AntiRegisterHooks(NDEventType.StatusCG, SetStatus);
 }
Esempio n. 9
0
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_BattingFinish, BattingFinish);
 }