public void Add(long uuid, Transform actorTarget, int actorType, long ownerId = 0L) { ActorVisibleCtrl actorVisibleCtrl = actorTarget.get_gameObject().AddUniqueComponent <ActorVisibleCtrl>(); this.m_avclist.set_Item(uuid, actorVisibleCtrl); actorVisibleCtrl.AwakeSelf(actorType, uuid, ownerId, actorTarget.get_gameObject().GetInterface <IActorVisible>()); actorVisibleCtrl.set_enabled(true); }
public void Remove(Transform actorTarget) { ActorVisibleCtrl component = actorTarget.GetComponent <ActorVisibleCtrl>(); if (component != null) { component.set_enabled(false); component.RemoveAVC(); this.m_avclist.Remove(component.uuid); } }