//getting component references
        void Start()
        {
            animator = GetComponentInChildren <Animator>();

            switch (mType)
            {
            case MovementType.splineMove:
                hMove = GetComponent <splineMove>();
                break;

            case MovementType.bezierMove:
                bMove = GetComponent <bezierMove>();
                break;

            case MovementType.navMove:
                nAgent = GetComponent <UnityEngine.AI.NavMeshAgent>();
                break;
            }
        }
Exemplo n.º 2
0
        //getting component references
        void Start()
        {
            animator = GetComponentInChildren<Animator>();

            switch (mType)
            {
                case MovementType.splineMove:
                    hMove = GetComponent<splineMove>();
                    break;
                case MovementType.bezierMove:
                    bMove = GetComponent<bezierMove>();
                    break;
                case MovementType.navMove:
                    nAgent = GetComponent<NavMeshAgent>();
                    break;
            }
        }