Ejemplo n.º 1
0
    public override void Start()
    {
        base.Start();

        ChangeState(idleState);
        if (patrolState != null)
        {
            //Debug.Log("Evade");
            patrolState.Enter(this);
        }
        else
        {
            //Debug.Log("Create");
            patrolState = new PatrolState();
            patrolState.Enter(this);
            if (patrolState != null)
            {
                Debug.Log("null");
            }
        }
        OnValidate();
    }