protected override void MStart() { system_Race = GetComponent <System_Race>(); systemStarships = GetComponent <System_Starships>(); List <List <Starship> > starships = GetComponent <StarshipsSpawnMover>().MoveStarshipsOnSpawns(); List <Transform> transforms = new List <Transform>(); for (int i = 0; i < starships.Count; ++i) { for (int j = 0; j < starships[i].Count; ++j) { transforms.Add(starships[i][j].transform); } } system_Race.Initialize(transforms); systemStarships.InitializeStarshipsTeams(starships); }
private void Awake() { GameManager.Initialize(); SceneController.LoadAdditiveScene(sceneLocationName); GameText.DeactivateEvent(); GameText.SetInGameTextNowEvent(textAsset); playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>(); playerCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>(); playerStarship = playerController.GetComponent <Starship>(); playerController.GetComponent <Health>().OnDeath += OnPlayerDeath; systemStarships = GetComponent <System_Starships>(); PlayerStarshipTr = playerController.transform; EndTrigger.OnPlayerStarshipEnter += PlayerStarshipEnterEndTrigger; }
private void Awake() { GameManager.Initialize(); SceneController.LoadAdditiveScene(sceneLocation); GameText.DeactivateEvent(); GameText.SetInGameTextNowEvent(textAsset); systemStarships = GetComponent <System_Starships>(); playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>(); playerCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>(); playerStarship = playerController.GetComponent <Starship>(); playerController.GetComponent <Health>().OnDeath += OnPlayerDeath; systemStarships.StarshipsTeams.Add(new System_Starships.StarshipsTeam(playerStarship.GetComponent <Starship>())); systemStarships.StarshipsTeams.Add(new System_Starships.StarshipsTeam()); playerCamera.SetPositionWithOffset(playerController.transform.position); screenDark.SetDark(false); playerController.SetLockControl(true); }
protected override void MStart() { systemStarships = GetComponent <System_Starships>(); systemStarships.InitializeStarshipsTeams(GetComponent <StarshipsSpawnMover>().MoveStarshipsOnSpawns()); systemStarships.OnOneTeamLeft += EndGame; }