Example #1
0
    // Start is called before the first frame update

    public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        baseAi     = animator.gameObject.GetComponent <BaseAi>();
        otherUnits = baseAi.GetUnitsList();
        piece      = animator.gameObject.GetComponent <Piece>();
        agent      = animator.gameObject.GetComponent <NavMeshAgent>();
    }
Example #2
0
 override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     otherUnits = baseAi.GetUnitsList();
 }