Ejemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
            life   = 100;
            thrown = false;
            StopAllCoroutines();

            coroutinePatrolEnded = true;
            co = null; wa = null; blood = null;

            currentWayPoint = -1;
            currentState    = AIStates.Patrol;

            animator = GetComponent <Animator>();
            initAnimator();

            wayPoints = new List <Transform>(15);
            wp        = WayPoint_Manager.getInstance();
            wayPoints = wp.getWayPointsPath();

            setNextRandomPoint();
        }
Ejemplo n.º 2
0
        private void Start()
        {
            agent            = gameObject.GetComponent <NavMeshAgent>();
            coroutine_script = gameObject.GetComponent <Coroutines_Script>();

            hungry      = 100;
            hungry_time = 0.005f;
            min_hungry  = 0.1f;

            currentWayPoint = -1;
            currentState    = AIStates.Patrol;

            //animator = gameObject.GetComponent<Animator>();
            idletime = animations[0].length;

            wayPoints = new List <Transform>(15);
            wp        = WayPoint_Manager.getInstance();
            wayPoints = wp.getWayPointsPath();

            setNextRandomPoint();

            //setAnimatorTriggerParameters("Empty_state_loaded");
        }
        // Use this for initialization
        public void Start()
        {
            gameObject.tag = Tags.NORMAL_ZOMBIE;

            life = 100;

            isAttacking = false;

            coroutinePatrolEnded = true;
            co = null; wa = null; blood = null;

            currentWayPoint = -1;
            currentState    = AIStates.Patrol;

            animator = GetComponentInParent <Animator>();
            initAnimator();
            setAgentParameters(0, 0);

            wayPoints = new List <Transform>(15);
            wp        = WayPoint_Manager.getInstance();
            wayPoints = wp.getWayPointsPath();

            setNextRandomPoint();
        }