private void Start() { systemStarships.InitializeStarshipsTeams(GetComponent <StarshipsSpawnMover>().MoveStarshipsOnSpawns()); GameAudio.StartAudioEvent(audioClip, 0.4f, true); if (!StaticSettings.isRestart) { SetGameStop(true); GameDialogs.StartDialogEvent(StartGame); } else { GameGoals.SetActiveGoalEvent(true); StaticSettings.isRestart = false; systemStarships.SetStarshipsLock(false); systemStarships.SetStarshipsLock(1, true); GameDialogs.ShowInGameDialogEvent(0); } systemStarships.SetStarshipsActive(2, false); systemStarships.SetStarshipsLock(2, true); systemStarships.SetStarshipsActive(3, false); systemStarships.SetStarshipsLock(3, true); systemStarships.StarshipsTeams[1].OnTeamDevastated += FirstWaveDead; systemStarships.StarshipsTeams[2].OnTeamDevastated += SecondWaveDead; }
private IEnumerator Start() { systemStarships.InitializeStarshipsTeams(GetComponent <StarshipsSpawnMover>().MoveStarshipsOnSpawns()); GameAudio.StartAudioEvent(audioClip, 0.125f, true); if (!StaticSettings.isRestart) { playerController.SetLockControl(true); playerCamera.SetLockMove(false); systemStarships.SetStarshipsLock(true); MoverStartPlayer.ToStartPosition(playerStarship); playerCamera.SetPositionWithOffset(PlayerStarshipTr.position); playerController.SetActiveCanvas(false); MoverStartZ2.Move(Z2Starship); Z5_Scene.SetActive(true); Z2_Scene.SetActive(true); Z5animator.SetFloat("Part(speed)", 1); yield return(MoverStartPlayer.IStarshipMove(playerStarship)); cruiserAttack.StartAim(); Z5Image.SetActive(true); Z2Image.SetActive(true); playerCamera.EnableTargetMove(cameraTarget); GameDialogs.StartDialogEvent(OnStartDialogEnd); GameDialogs.OnNextDialog += OnNextDialog; } else { GameGoals.SetActiveGoalEvent(true); StaticSettings.isRestart = false; systemStarships.SetStarshipsLock(false); MoverStartPlayer.ToEndPosition(playerStarship); MoverStartZ2.ToEndPosition(Z2Starship); Z2StarshipAI.SetTargetToFollowWithMaxDistance(PlayerStarshipTr); systemStarships.SetStarshipsFollowEnemy(true); cruiserAttack.StartAim(); FrigateHealth.SetActive(true); cruiserAttack.StartAttack(OnBattleEnd); isBattle = true; } }
private void Start() { MStart(); Checkpoint(StaticSettings.checkpointID); if (!isRestart && StaticSettings.checkpointID == 0) { player_Starship_Controller.SetLockControl(true); player_Starship_Controller.SetActiveCanvas(false); player_Camera_Controller.SetPositionWithOffset(MoverStart.GetEndPosition()); MoverStart.Move(playerStarship); GameDialogs.StartDialogEvent(EndDialogEvent); } else { isRestart = false; GameGoals.SetActiveGoalEvent(true); if (StaticSettings.checkpointID == 0) { MoverStart.ToEndPosition(playerStarship); } } }
private IEnumerator ISlidesEnd() { yield return(StartCoroutine(screenDark.IDark())); slide.SetActive(false); yield return(StartCoroutine(screenDark.ITransparent())); GameDialogs.StartDialogEvent(OnStartDialogEnd); GameDialogs.OnNextDialog += OnNextDialog; }
private IEnumerator Start() { systemStarships.InitializeStarshipsTeams(GetComponent <StarshipsSpawnMover>().MoveStarshipsOnSpawns()); systemStarships.OnOneTeamLeft += OnOneTeamLeft; GameAudio.StartAudioEvent(audioClip, 0.4f, true); if (!StaticSettings.isRestart) { playerController.SetLockControl(true); playerCamera.SetLockMove(false); systemStarships.SetStarshipsLock(true); MoverStart.ToStartPosition(playerStarship); playerCamera.SetPositionWithOffset(PlayerStarshipTr.position); playerController.SetActiveCanvas(false); yield return(MoverStart.IStarshipMove(playerStarship)); playerCamera.EnableTargetMove(cameraTarget); GameDialogs.StartDialogEvent(OnStartDialogEnd); GameDialogs.OnNextDialog += OnNextDialog; } else { GameGoals.SetActiveGoalEvent(true); StaticSettings.isRestart = false; systemStarships.SetStarshipsLock(false); MoverStart.ToEndPosition(playerStarship); Z2StarshipAI.SetTargetToFollowWithMaxDistance(PlayerStarshipTr); systemStarships.StarshipsTeams[1].SetFollowTarget(PlayerStarshipTr); systemStarships.SetStarshipsFollowEnemy(true); isBattle = true; } }
private void Start() { MStart(); GameAudio.StartAudioEvent(audioClip, 0.3f, true); if (!StaticSettings.isRestart) { SetGameStop(true); GameDialogs.StartDialogEvent(StartGame); } else { StaticSettings.isRestart = false; MRestart(); } playerCamera.UpdatePlayerLookPosition(); }
private void Start() { GameAudio.StartAudioEvent(audioClip, 0.4f, true); playerController.SetLockControl(true); playerCamera.SetLockMove(false); Z2StarshipAI.SetLockControl(true); playerCamera.SetPositionWithOffset(PlayerStarshipTr.position); playerCamera.EnableTargetMove(Target); playerController.SetActiveCanvas(false); Z2Image.SetActive(true); GameDialogs.StartDialogEvent(OnStartDialogEnd); }