Ejemplo n.º 1
0
    // Use this for initialization
    public virtual void Start()
    {
        animator    = GetComponent <Animator>();
        cam         = Camera.main;
        body        = GetComponent <Rigidbody>();
        inputBuffer = new DayInputBuffer();

        if (fsm != null)
        {
            //Give player animator to state fsm
            fsm.animator = animator;
            fsm.entityB  = this;
            fsm.Start();

            Debug.Log(this);
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        animator     = GetComponent <Animator>();
        cam          = Camera.main;
        body         = GetComponent <Rigidbody>();
        inputBuffer  = new DayInputBuffer();
        navMeshAgent = GetComponent <NavMeshAgent>();

        if (fsm != null)
        {
            //Give player animator to state fsm
            fsm.animator = animator;
            fsm.bossB    = this;
            fsm.Start();

            Debug.Log(this);
        }
    }