Ejemplo n.º 1
0
        private void OnCreatureSelect(GameObject o)
        {
            Show();

            _dna      = o.GetComponent <Dna>();
            _fov      = o.GetComponent <CreatureFieldOfView>();
            _movement = o.GetComponent <CreatureMovement>();
        }
Ejemplo n.º 2
0
        public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
            base.OnStateEnter(animator, stateInfo, layerIndex);
            _movement = gameObject.GetComponent <CreatureMovement>();
            _fov      = gameObject.GetComponent <CreatureFieldOfView>();

            _movement.isRunning = false;
            _movement.target    = GetFoodPos();
        }