public override void Enter() { fleetManager = owner.GetComponent <FleetManager>(); // Get VideoManager videoManager = GameObject.Find("VideoManager").GetComponent <VideoManager>(); // Load the scene and wait for it to initiallise fleetManager.StartCoroutine(LoadScene()); // Destroy the USS Saratoga fleetManager.StartCoroutine(DestroySaratoga()); }
public override void Enter() { fleetManager = owner.GetComponent <FleetManager>(); // Load the scene and wait for it to initiallise fleetManager.StartCoroutine(LoadScene()); }
public override void Enter() { fleetManager = owner.GetComponent <FleetManager>(); // Get VideoManager //videoManager = GameObject.Find("VideoManager").GetComponent<VideoManager>(); //videoManager.playingVideo = false; // Load the scene and wait for it to initiallise fleetManager.StartCoroutine(LoadScene()); //videoPlayed = false; // Destroy the USS Melbourne fleetManager.StartCoroutine(DestroyMelbourne()); }
public override void Enter() { fleetManager = owner.GetComponent <FleetManager>(); // Get inital no of ships alive initialShipsAlive = fleetManager.ships.Count; // Create the next attacking wave NextWave(); // Load the scene and wait for it to initiallise fleetManager.StartCoroutine(LoadScene()); }
IEnumerator LoadScene() { AsyncOperation asyncSceneChange = SceneManager.LoadSceneAsync("scene5", LoadSceneMode.Single); while (!asyncSceneChange.isDone) { yield return(null); } camera = GameObject.Find("Main Camera"); followShip = camera.GetComponent <FollowShip>(); followShipsAlive = camera.GetComponent <FollowShipsAlive>(); changeCamera = ChangeCamera(); fleetManager.StartCoroutine(changeCamera); }
public override void Enter() { fleetManager = owner.GetComponent <FleetManager>(); // Get inital no of ships alive initialShipsAlive = fleetManager.ships.Count; // Set more ships to attack shipsToAttack = Random.Range(3, 5); for (int i = 1; i < fleetManager.ships.Count && i < shipsToAttack; i++) { Boid ship = fleetManager.ships[i]; ship.GetComponent <StateMachine>().ChangeState(new AttackState(fleetManager.borg)); ship.maxSpeed = Random.Range(20.0f, 30.0f); ship.StartCoroutine(ship.ChangeSpeed()); } // Load the scene and wait for it to initiallise fleetManager.StartCoroutine(LoadScene()); }