public void SaveIntroTrigger(IntroTrigger introTrigger) { System.Runtime.Serialization.Formatters.Binary.BinaryFormatter _binaryFormatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); System.IO.MemoryStream _memoryStream = new System.IO.MemoryStream(); _binaryFormatter.Serialize(_memoryStream, introTrigger); PlayerPrefs.SetString("IntroTrigger", Convert.ToBase64String(_memoryStream.GetBuffer())); }
private void Start() { introTrigger = NewGameManager.Instance.LoadIntroTrigger(); yukgack.gameObject.SetActive(false); spotlightObject.gameObject.SetActive(false); StartCoroutine(Sequence()); NewGameManager.Instance.PauseBGM(); }
// Use this for initialization void Start() { compareTouchToStart = NewGameManager.Instance.IsSkipTouchToStart; introTrigger = NewGameManager.Instance.LoadIntroTrigger(); if (introTrigger == null) { introTrigger = new IntroTrigger(); NewGameManager.Instance.SaveIntroTrigger(introTrigger); } }
private IEnumerator EndSequence() { yield return(StartCoroutine(OffSpotlight())); IntroTrigger _introTrigger = NewGameManager.Instance.LoadIntroTrigger(); if (_introTrigger != null) { _introTrigger.isNeedIntro = false; NewGameManager.Instance.SaveIntroTrigger(_introTrigger); } NextScene(); }
public IntroTrigger LoadIntroTrigger() { IntroTrigger _introTrigger = null; string _introTriggerString = PlayerPrefs.GetString("IntroTrigger"); if (!string.IsNullOrEmpty(_introTriggerString)) { System.Runtime.Serialization.Formatters.Binary.BinaryFormatter _binaryFormatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); System.IO.MemoryStream _memoryStream = new System.IO.MemoryStream(Convert.FromBase64String(_introTriggerString)); _introTrigger = (IntroTrigger)_binaryFormatter.Deserialize(_memoryStream); } return(_introTrigger); }
// Use this for initialization void Start() { introTrigger = NewGameManager.Instance.LoadIntroTrigger(); if (introTrigger == null) { introTrigger = new IntroTrigger(); NewGameManager.Instance.SaveIntroTrigger(introTrigger); } if (introTrigger.isNeedSelectSubject) { ActiveTutorial(); StartCoroutine(StartSelectTutorial()); } else if (introTrigger.isNeedSubjectResultAfter && NewGameManager.Instance.GetEndSubjectList().Count > 0) { ActiveTutorial(); StartCoroutine(SubjectResultAfterTutorial()); } }
private void Start() { //DeleteAllRecord(); //CreateTestGameReulst(8); // 테스트 케이스 자동생성 //SaveGameRecord(); // 결과 저장 //Debug.Log("저장된 결과 개수 : " + LoadGameRecord().Count); //List<GameRecord> _list = LoadGameRecord(); //for (int i = 0; i < _list.Count; i++) //{ // Debug.Log("시간 : " + _list[i].time); // for(int p = 0; p < _list[i].gameResults.Length; p++) // { // List<GameResult> _resultList = _list[i].gameResults[p]; // for(int q = 0; q < _resultList.Count; q++) // { // Debug.Log(_resultList[q].name + " : " + _resultList[q].resultValue); // } // } //} startIntroTrigger = LoadIntroTrigger(); }