private void FixedUpdate() { if (isShowedSlide && isBattle && !isPlayerDead) { time += Time.fixedDeltaTime; if (!isShowDialog1 && time > timeToIngameDialog1) { isShowDialog1 = true; GameDialogs.ShowInGameDialogEvent(0); } if (!isShowDialog2 && time > timeToIngameDialog2) { isShowDialog2 = true; GameDialogs.ShowInGameDialogEvent(1); } timeToWave += Time.fixedDeltaTime; if (timeToWave > wavesTimeInterval) { wavesTimeInterval *= 1.02f; timeToWave = 0; StopAllCoroutines(); StartCoroutine(IWave()); } } }
private void StartGame() { GameGoals.SetActiveGoalEvent(true); GameDialogs.ShowInGameDialogEvent(0); systemStarships.SetStarshipsLock(1, true); SetGameStop(false); }
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 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 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 IEnumerator IOnBattleEnd() { isBattle = false; playerTrigger.OnPlayerStarshipEnter += EndDialog; ExitDoor.Move(); Z2StarshipAI.SetTargetAndDestinationToShowPath(PlayerStarshipTr, Destination); yield return(GameDialogs.IShowInGameDialogEvent(0)); }
private IEnumerator IOnOneTeamLeft() { isBattle = false; Border.SetActive(false); Z2StarshipAI.SetTargetAndDestinationToShowPath(PlayerStarshipTr, Destination); yield return(GameDialogs.IShowInGameDialogEvent(0)); Wait = IWait1(); StartCoroutine(Wait); }
private IEnumerator ISlidesEnd() { yield return(StartCoroutine(screenDark.IDark())); slide.SetActive(false); yield return(StartCoroutine(screenDark.ITransparent())); GameDialogs.StartDialogEvent(OnStartDialogEnd); GameDialogs.OnNextDialog += OnNextDialog; }
private IEnumerator IWait2() { yield return(new WaitForSeconds(waitTime2)); isWaited2 = true; yield return(GameDialogs.IShowInGameDialogEvent(4)); Wait = IWait3(); StartCoroutine(Wait); }
private IEnumerator IWaited() { isWaited = true; yield return(GameDialogs.IShowInGameDialogEvent(5)); isWaitedSayed = true; if (isWaitingToAnswer) { GameDialogs.ShowInGameDialogEvent(1); } }
private IEnumerator IRush() { if (!isDisqualified) { yield return(GameDialogs.IShowInGameDialogEvent(2)); isShowedDialog2 = true; } systemStarships.SetStarshipsActive(2, true); systemStarships.SetStarshipsActive(3, true); systemStarships.CombineTeams(3, 0); }
private void OnCollisionEnter(Collision collision) { if (bulletsCount < bulletsCountOn2 && collision.gameObject.CompareTag("Bullet") && collision.gameObject.GetComponent <Bullet>().GetBulletType() == Bullet.BulletType.Player) { bulletsCount += 1; if (bulletsCountOn1 == bulletsCount) { GameDialogs.ShowInGameDialogEvent(inGameDialogId1); } if (bulletsCountOn2 == bulletsCount) { GameDialogs.ShowInGameDialogEvent(inGameDialogId2); } } }
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 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 FixedUpdate() { if (!isEnd) { if (Input.GetKey(KeyCode.N)) { EndGame(); } if (!isPlayerDead) { if (!isBattle) { if (systemStarships.GetMinDistanceTeamToPoint(0, BattleTr.position) < distanceBattle) { isBattle = true; systemStarships.SetStarshipsLock(1, false); systemStarships.SetStarshipsFollowEnemy(0, true); GameGoals.ShowGoalEvent(1); GameDialogs.ShowInGameDialogEvent(1); } } else if (!isDisqualified) { if (Vector3.Distance(PlayerStarshipTr.position, BattleTr.position) > distanceDisqualification) { timeOut += Time.fixedDeltaTime; if (!isShowedText) { isShowedText = true; GameDialogs.ShowInGameDialogEvent(4); } if (timeOut > timeDisqualification) { StartCoroutine(IDisqualificate()); } } else { isShowedText = false; timeOut = 0; } } } } }
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); }
private void FixedUpdate() { if (!isEnd) { if (Input.GetKey(KeyCode.N)) { EndGame(); } if (!isPlayerDead) { if (isBattle && !isSayed && Vector3.Distance(PlayerStarshipTr.position, Z2StarshipAI.transform.position) < 5f) { isSayed = true; GameDialogs.ShowInGameDialogEvent(1); } } } }
private IEnumerator IDisqualificate() { isDisqualified = true; yield return(GameDialogs.IShowInGameDialogEvent(5)); int team = systemStarships.StarshipChangeTeamToNew(C07Starship, 0); systemStarships.StarshipChangeTeam(PlayerStarship, 0, team); C07Health.SetInvincible(false); C07Starship.SetFollowTarget(PlayerStarshipTr); systemStarships.StarshipsTeams[0].SetFollowTarget(PlayerStarshipTr); if (isShowedDialog2) { GameDialogs.ShowInGameDialogEvent(3); } else { GameDialogs.ShowInGameDialogEvent(7); } }
private IEnumerator IShowDialog() { if (Wait != null) { StopCoroutine(Wait); } if (!isWaited) { if (!isWaited1) { yield return(GameDialogs.IShowInGameDialogEvent(1)); Wait = IWait1(); } else if (!isWaited2) { yield return(GameDialogs.IShowInGameDialogEvent(1)); Wait = IWait2(); } else if (!isWaited3) { isWaitingToAnswer = true; Wait = IWait3(); } StartCoroutine(Wait); } else { if (isWaitedSayed) { GameDialogs.ShowInGameDialogEvent(1); } else { isWaitingToAnswer = true; } } }
private void Dialog5() { Dialog5Trigger.OnPlayerStarshipEnter -= Dialog5; GameDialogs.ShowInGameDialogEvent(5); GameGoals.ShowGoalEvent(5); }
private void Dialog7() { Dialog7Trigger.OnPlayerStarshipEnter -= Dialog7; GameDialogs.ShowInGameDialogEvent(7); }
private IEnumerator ITimerEnd() { yield return(GameDialogs.IShowInGameDialogEvent(2)); GameTimer.DeactivateEvent(); }
public DialogRowScheme GetDialogRow(long id) { return(GameDialogs.Get(id)); }
private void ShowDialog3() { Dialog3Trigger.OnPlayerStarshipEnter -= ShowDialog3; GameDialogs.ShowInGameDialogEvent(3); }
private void ShowDialog2() { Dialog2Trigger.OnPlayerStarshipEnter -= ShowDialog2; GameDialogs.ShowInGameDialogEvent(2); }
private void ShowDialog1() { Dialog1Trigger.OnPlayerStarshipEnter -= ShowDialog1; GameDialogs.ShowInGameDialogEvent(1); }
private void ShowDialog0() { Dialog0Trigger.OnPlayerStarshipEnter -= ShowDialog0; GameDialogs.ShowInGameDialogEvent(0); }
private void C07Health_OnDeath() { GameDialogs.ShowInGameDialogEvent(6); }
private void Dialog6() { Dialog6Trigger.OnPlayerStarshipEnter -= Dialog6; GameDialogs.ShowInGameDialogEvent(6); }
private void EndDialog() => GameDialogs.ShowInGameDialogEvent(1);