// Update is called once per frame void Update() { if (CurrentEndingState != EndingState.GameNotStart) { StateTrueFalse = true; } else { if (CurrentEndingState == EndingState.GameNotStart) { if (this.gameObject.GetComponent <QuizCSVParser>().ChooseQuiz != QuizCSVParser.QuizType.NotYet) { if (CurrentEndingState != EndingState.GamePlaying) { CurrentEndingState = EndingState.GamePlaying; } } else { StateTrueFalse = false; if (Time.timeScale != 0) { Time.timeScale = 0; } } } } // ManagingEndings(); }
void EndingChecking() { if (m_ProgressConfig.FailureCount >= m_ProgressConfig.FailureTolerance) { m_EndingState = EndingState.FAILURE; } else { if (m_ProgressConfig.TRexScore >= m_ProgressConfig.StegosaursScore && m_ProgressConfig.TRexScore >= m_ProgressConfig.PterosaursScore) { m_EndingState = EndingState.TRex; //SetGameStateManager((int)GameStateManager.GameState.Ending); //SceneManager.LoadScene(m_EndingConfig.TRexEndingSceneName); } else if (m_ProgressConfig.StegosaursScore >= m_ProgressConfig.TRexScore && m_ProgressConfig.StegosaursScore >= m_ProgressConfig.PterosaursScore) { m_EndingState = EndingState.STEGOSARUS; //SetGameStateManager((int)GameStateManager.GameState.Ending); //SceneManager.LoadScene(m_EndingConfig.StegosaursEndingSceneName); } else if (m_ProgressConfig.PterosaursScore >= m_ProgressConfig.TRexScore && m_ProgressConfig.PterosaursScore >= m_ProgressConfig.StegosaursScore) { m_EndingState = EndingState.PTEROSAUR; //SetGameStateManager((int)GameStateManager.GameState.Ending); //SceneManager.LoadScene(m_EndingConfig.PterosaursEndingSceneName); } } /* * string emailIDstring = m_endingEmailConfig._EmailBody [(int)m_EndingState]; * string[] emailID = emailIDstring.Split(','); * * if (emailID.Length <= 0) * { * Debug.LogError("Email ID Parse Error!"); * } * * for (int i = 0; i < emailID.Length; i++) * { * * Debug.Log(m_mailconfig._Titles[int.Parse(emailID[i])]+" "+ m_mailconfig._SenderName[int.Parse(emailID[i])]+""+m_mailconfig._EmailBody[int.Parse(emailID[i])]); * EmailContent emailContent=new EmailContent(); * emailContent.TITLE = m_mailconfig._Titles[int.Parse(emailID[i])]; * emailContent.SENDER = m_mailconfig._SenderName[int.Parse(emailID[i])]; * emailContent.BODY_TEXT = m_mailconfig._EmailBody[int.Parse(emailID[i])]; * * m_EmailManager.FillInEmail(emailContent); * }*/ EmailContent emailContent = new EmailContent(); emailContent.TITLE = m_endingEmailConfig._Titles[(int)m_EndingState]; emailContent.SENDER = m_endingEmailConfig._SenderName[(int)m_EndingState]; emailContent.BODY_TEXT = m_endingEmailConfig._EmailBody[(int)m_EndingState]; m_EmailManager.FillInEmail(emailContent); }
// Use this for initialization void Start() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } gameState = GameState.Idle; playState = PlayState.Title; endingState = EndingState.None; eventVariable = new EventVariable(); dataAES = new DataEncryption(); activateMouseCursorTexture = Resources.Load <Texture2D>("Image/Cursor/Active"); isEncrypted = true; }
public void SetEndingState(EndingState endingState) { this.endingState = endingState; }