Beispiel #1
0
 void Awake()
 {
     DontDestroyOnLoad(this.gameObject);
     myWaypointManager = FindObjectOfType<WayPoint_Manager>();
     if(!myWaypointManager)
     {
         Debug.LogError("You need to have a waypoint manager object in the scene");
     }
 }
 // Use this for initialization
 void Start()
 {
     m_Transform = GetComponent<Transform>();
     my_Ships = new List<GameObject>();
     myWaypointManager = FindObjectOfType<WayPoint_Manager>();
     if(!myWaypointManager)
     {
         Debug.LogError("You need to have a waypoint manager object in the scene");
     }
 }
 // Use this for initialization
 void Start()
 {
     m_Transform       = GetComponent <Transform>();
     my_Ships          = new List <GameObject>();
     myWaypointManager = FindObjectOfType <WayPoint_Manager>();
     if (!myWaypointManager)
     {
         Debug.LogError("You need to have a waypoint manager object in the scene");
     }
 }
    void Start()
    {
        m_rigidbody = GetComponent <Rigidbody>();
        m_transform = GetComponent <Transform>();

        //Gives the Enemy its laser spawn poitions.
        m_lasers    = GetComponentsInChildren <Laser_Hardpoint>();
        myRadar     = GetComponentInChildren <Enemy_Radar>();
        m_CurrSpeed = m_MaxSpeed;

        myWaypointManager = FindObjectOfType <WayPoint_Manager>();
        if (!myWaypointManager)
        {
            Debug.LogError("You need to have a waypoint manager object in the scene");
        }
    }
    // Use this for initialization
    void Start()
    {
        Cursor.visible = false;
        gameObject.tag = Tags.ELITE_ZOMBIE;

        life = 100;

        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();
    }
    // Use this for initialization
    void Start()
    {
        StopAllCoroutines();

        gameObject.tag = Tags.FAST_ZOMBIE;

        isDead = false;

        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();
    }