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