private void DisplayCompletedGameScreen() { completedGameCGD.OpenDisplay(); unfinishedGameCGD.CloseDisplay(); GameManager gm = FindObjectOfType <GameManager>(); gameNameText.text = gm.CurrentGame.Name; CalculateGameScore(gm.CurrentGame); overallScoreText.text = "Overall: \t" + FormatPlacementString(overallPlacement); funScoreText.text = "Fun: \t\t" + FormatPlacementString(funPlacement); graphicsScoreText.text = "Graphics: \t" + FormatPlacementString(graphicsPlacement); audioScoreText.text = "Audio: \t" + FormatPlacementString(audioPlacement); // TODO: display the images stored in the game int screenshotsToDisplay = Mathf.Min(gm.CurrentGame.Screenshots.Count, screenshotImages.Length); for (int i = 0; i < screenshotImages.Length; i++) { screenshotImages[i].gameObject.SetActive(i < screenshotsToDisplay); if (i < screenshotsToDisplay) { screenshotImages[i].sprite = gm.CurrentGame.Screenshots[i]; } } noScreenshotsText.gameObject.SetActive(screenshotsToDisplay == 0); }
public void NewGame(string gameName = "Untitled") { CurrentGame = new Game(gameName); Motivation = defaultMotivation; Timer = defaultTimer; FunInspirationTimer = 0f; GraphicsInspirationTimer = 0f; AudioInspirationTimer = 0f; timerCoroutine = StartCoroutine(TimerCoroutine()); motivationCoroutine = StartCoroutine(MotivationCoroutine()); inspirationCoroutine = StartCoroutine(InspirationCoroutine()); startGameCGD.CloseDisplay(); gameResultCGD.CloseDisplay(); minigameCGD.OpenDisplay(); informationBarCGD.OpenDisplay(); minigameButtonsCG.blocksRaycasts = true; onGameStarted?.Invoke(); }
public void StartJam() { minigameManager.CloseAllMinigames(); informationBarCGD.CloseDisplay(); startGameCGD.OpenDisplay(); minigameCGD.CloseDisplay(); gameResultCGD.CloseDisplay(); minigameButtonsCG.blocksRaycasts = false; currentLF++; onLudumFactorumUpdated?.Invoke(currentLF); }
public void ShowGameResult(bool completed) { canvasGroupDisplay.OpenDisplay(); if (completed) { DisplayCompletedGameScreen(); } else { DisplayUnfinishedGameScreen(); } StartCoroutine(NextJamCountdown()); }
private void FinishGame(bool completed) { StopCoroutine(timerCoroutine); StopCoroutine(motivationCoroutine); StopCoroutine(inspirationCoroutine); minigameButtonsCG.blocksRaycasts = false; startGameCGD.CloseDisplay(); minigameCGD.CloseDisplay(); informationBarCGD.CloseDisplay(); gameResultCGD.OpenDisplay(); minigameManager.CloseAllMinigames(); gameResultDisplay.ShowGameResult(completed); UpdateSkills(); onGameFinished?.Invoke(); }
private void DisplayUnfinishedGameScreen() { completedGameCGD.CloseDisplay(); unfinishedGameCGD.OpenDisplay(); }