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 PlayerStarshipEnterEndTrigger() { playerCamera.SetLockMove(true); playerController.SetLockControl(true); MoverEnd.MoveLine(playerController.GetComponent <Starship>()); EndGame(); }
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 void StartTarget() { playerTrigger.OnPlayerStarshipEnter -= StartTarget; OnStart?.Invoke(); player_Controller.SetLockControl(true, false, false); isMovePlayer = true; mainCamera.EnableTargetMove(CameraTr); }
private void OnStartDialogEnd() { GameTimer.StartDecreasingTimerEvent(timeToSupportInSeconds, OnTimerEnd); GameAudio.StartAudiosEvent(audioClips, 0.12f, false); playerController.SetLockControl(false); isBattle = true; }
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() { 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.OnNextDialog += OnNextDialog; GameDialogs.StartDialogEvent(OnStartDialogEnd); }
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); }