public void SkipConversation() { if (currentMomentConversation == 0) { initScene.ActivateLoadingCanvas(); } else { finalScene.ActivateLoadingCanvas(); } }
public void EnableNextDialogueText() { if (arrayOfActivateTexts [currentActivateText].isFinalDialogue == false) { currentActivateText = nextDialogue; arrayOfActivateTexts [currentActivateText].SendReloadTextBoxManager(); } else if (arrayOfActivateTexts [currentActivateText].isFinalDialogue == true) { if (currentMomentConversation == 0) { loadLevel.ActivateLoadingCanvas(); //Destroy(cons.gameObject); } else { loadMap.ActivateLoadingCanvas(); } } }
public void CheckGameState() { if (isWin == true) { CalculateStarsToSave(); int level = PlayerPrefs.GetInt("CurrentLevel"); string passedLevelPref = "Level" + level.ToString() + "Passed"; PlayerPrefs.SetInt(passedLevelPref, 1); int tmp = PlayerPrefs.GetInt("FinalStoryConversation"); if (tmp == 0) { mapScene.ActivateLoadingCanvas(); } else { PlayerPrefs.SetInt("ConversationMoment", 1); conversationScene.ActivateLoadingCanvas(); } } if (isGameOver == true) { gameplayScene.ActivateLoadingCanvas(); } }
public void SaveLevelVariables() { if (canSelectLevel == true) { allSounds.PlayClip(0); PlayerPrefs.SetInt("ConversationMoment", 0); PlayerPrefs.SetInt("CurrentLevel", levelValue); PlayerPrefs.SetInt("InitialStoryConversation", haveInitialConversation); PlayerPrefs.SetInt("FinalStoryConversation", haveFinalConversation); PlayerPrefs.SetInt("EnemiesToDefeat", numbOfEnemiesToDefeat); PlayerPrefs.SetFloat("LevelTime", timeToReachLevel); PlayerPrefs.SetInt("MaxNumbOfMovements", maxNumbOfMovements); PlayerPrefs.SetInt("WinCondition", winCondition); for (int i = 0; i < allLoseCondition.Length; i++) { string tmp = "LoseCondition" + (i + 1).ToString(); PlayerPrefs.SetInt(tmp, allLoseCondition[i]); } PlayerPrefs.SetInt("NumbOfLoseConditions", allLoseCondition.Length); if (haveInitialConversation == 0) { gameplayScene.ActivateLoadingCanvas(); } else { storyScene.ActivateLoadingCanvas(); } } else { allSounds.PlayClip(1); } }