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); }
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(); }
private void AntiRegisterHooks() { EventCenter.AntiRegisterHooks(EventCenterType.Battle_UpdateRingPos, UpdatePos); EventCenter.RegisterHooks(EventCenterType.Battle_ShowRing, ShowRing); }
public override void KillSelf(float delay = 0) { EventCenter.AntiRegisterHooks(NDEventType.StatusCG, SetStatus); Dead(); Destroy(); }
private void AntiRegisterHooks() { EventCenter.AntiRegisterHooks(EventCenterType.Battle_DrawPath, RefreshGolfPath); EventCenter.AntiRegisterHooks(EventCenterType.Battle_BattingFinish, BattingFinish); }
// 反注册消息函数 private void AntiRegisterHooks() { EventCenter.AntiRegisterHooks(EventCenterType.Battle_PathCrossHole, SetHoleEffect); }
// 反注册消息函数 private void AntiRegisterHooks() { EventCenter.AntiRegisterHooks(EventCenterType.Battle_RoundStart, OnBattle_RoundStart); }
public virtual void OnDestroy() { EventCenter.AntiRegisterHooks(NDEventType.StatusCG, SetStatus); }
private void AntiRegisterHooks() { EventCenter.AntiRegisterHooks(EventCenterType.Battle_BattingFinish, BattingFinish); }