예제 #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);
    }
예제 #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();
    }
예제 #3
0
파일: GolfRing.cs 프로젝트: 741645596/Golf
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_UpdateRingPos, UpdatePos);
     EventCenter.RegisterHooks(EventCenterType.Battle_ShowRing, ShowRing);
 }
예제 #4
0
 public override void KillSelf(float delay = 0)
 {
     EventCenter.AntiRegisterHooks(NDEventType.StatusCG, SetStatus);
     Dead();
     Destroy();
 }
예제 #5
0
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_DrawPath, RefreshGolfPath);
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_BattingFinish, BattingFinish);
 }
예제 #6
0
 // 反注册消息函数
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_PathCrossHole, SetHoleEffect);
 }
예제 #7
0
 // 反注册消息函数
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_RoundStart, OnBattle_RoundStart);
 }
예제 #8
0
 public virtual void OnDestroy()
 {
     EventCenter.AntiRegisterHooks(NDEventType.StatusCG, SetStatus);
 }
예제 #9
0
파일: GolfBall.cs 프로젝트: 741645596/Golf
 private void AntiRegisterHooks()
 {
     EventCenter.AntiRegisterHooks(EventCenterType.Battle_BattingFinish, BattingFinish);
 }