Beispiel #1
0
        private void Start()
        {
            animationContoller = GetComponent <AnimationController>();

            animationContoller.animator = GetComponent <Animator>();

            animationContoller.TransitToWeaponTypeAnimation(weaponType);

            state = new Idle(animationContoller, this.transform, baseCharacterInput);
        }
Beispiel #2
0
        void Start()
        {
            rigidbody = GetComponent <Rigidbody>();

            agent = GetComponent <NavMeshAgent>();

            agentTransform = GetComponent <Transform>();

            animationController = GetComponent <AnimationController>();

            animationController.animator = GetComponent <Animator>();

            animationController.TransitToWeaponTypeAnimation(WeaponType.UnArmed);

            animationController.Idle(true);

            StartCoroutine(TargetCoroutine());

            agent.stoppingDistance = 2f;

            agentState = new IdleAgent(this.transform, this.agent, this.animationController);
        }