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