protected override void onStart() { base.onStart(); waitOver = false; openNext = false; ActionUtils.RunAction(GameObjectAgent.getAgentGameObject(gameObject, gameObject), target); }
public static GameObject getAgentGameObject(object requester, GameObject obj, bool returnself) { if (obj == null) { return(null); } GameObjectAgent a = obj.GetComponent <GameObjectAgent>(); if (a == null) { return(returnself ? obj : null); } else { GameObject Agent = a.getAgent(requester); if (Agent == null && returnself) { return(obj); } return(Agent); } }