예제 #1
0
 protected override void onStart()
 {
     base.onStart();
     waitOver = false;
     openNext = false;
     ActionUtils.RunAction(GameObjectAgent.getAgentGameObject(gameObject, gameObject), target);
 }
예제 #2
0
    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);
        }
    }