private void OnTriggerExit(Collider other) { if (other.gameObject == null || other.gameObject.layer != mPlayerMask) { return; } ActorMono actor_mono = ActorHelper.GetActorMono(other.gameObject); if (actor_mono == null) { return; } var actor = actor_mono.BindActor; if (actor == null || actor.UnitType != EUnitType.UNITTYPE_PLAYER) { return; } actor.IsInSafeArea = false; if (actor == Game.GetInstance().GetLocalPlayer()) { UINotice.Instance.ShowMessage(xc.TextHelper.GetConstText("CODE_TEXT_LOCALIZATION_45")); } }
void OnTriggerEnter(Collider other) { if (other.gameObject == null || other.gameObject.layer != mPlayerMask) { return; } // 不是本地玩家,不要捡 ActorMono actor_mono = ActorHelper.GetActorMono(other.gameObject); if (actor_mono == null) { return; } var actor = actor_mono.BindActor; if (actor == null || actor.UID.obj_idx != Game.GetInstance().LocalPlayerID.obj_idx) { return; } // 死了也不要捡 if (actor.IsDead()) { return; } //Pick(); }
void OnTriggerExit(Collider other) { if (other.gameObject == null || other.gameObject.layer != mPlayerMask) { return; } ActorMono actor_mono = ActorHelper.GetActorMono(other.gameObject); if (actor_mono == null) { return; } var actor = actor_mono.BindActor; if (actor == null || actor.UID.obj_idx != Game.GetInstance().LocalPlayerID.obj_idx) { return; } }
void OnTriggerExit(Collider other) { if (other.gameObject == null || other.gameObject.layer != LayerMask.NameToLayer("Player")) { return; } Actor localPlayer = Game.Instance.GetLocalPlayer(); if (localPlayer != null && localPlayer.GetModelParent().Equals(other.gameObject) == false) { return; } ActorMono act_mono = ActorHelper.GetActorMono(other.gameObject); if (act_mono == null) { return; } Player act = act_mono.BindActor as Player; if (act != null && act.UID.Equals(Game.GetInstance().LocalPlayerID)) { if (ExitId > 0) { UranusManager.Instance.ActiveLevelNode(ExitId); if (LifeTime == Neptune.Collider.ETypeLifeTime.ONCE) { ColliderObjectManager.Instance.RemoveColliderObject(Id); } } ColliderObjectManager.Instance.TriggerColliderObject(Id); } }
/// <summary> /// 响应点击玩家的消息 /// </summary> /// <param name="data"></param> void OnClickPlayer(CEventBaseArgs data) { if (SceneHelp.Instance.IgnoreClickPlayer) { return; } GameObject select_object = (GameObject)data.arg; if (select_object != null) { ActorMono act_mono = ActorHelper.GetActorMono(select_object); if (act_mono != null && act_mono.BindActor != null) { if (act_mono.BindActor.IsDead() || act_mono.BindActor.IsLocalPlayer) { return; } m_LvText.text = act_mono.BindActor.Level.ToString(); for (int i = 0; i < m_IconImage.childCount; ++i) { m_IconImage.GetChild(i).gameObject.SetActive(false); } int voc_id = (int)act_mono.BindActor.VocationID; var voc_image_object = m_IconImage.Find(voc_id.ToString()); if (voc_image_object != null) { voc_image_object.gameObject.SetActive(true); } m_Target = select_object; gameObject.SetActive(true); } } }