예제 #1
0
    public void setStations()
    {
        if (!tGTS.isOn)
        {
            PersistantSaver.playerData.stationStats[0].active = false;
        }
        if (!tINK.isOn)
        {
            PersistantSaver.playerData.stationStats[1].active = false;
        }
        if (!tINT.isOn)
        {
            PersistantSaver.playerData.stationStats[2].active = false;
        }
        if (!tLMG.isOn)
        {
            PersistantSaver.playerData.stationStats[3].active = false;
        }
        if (!tKIK.isOn)
        {
            PersistantSaver.playerData.stationStats[4].active = false;
        }

        PersistantSaver.saveToHardDrive();
    }
예제 #2
0
    IEnumerator ChangeQuestion()
    {
        interactable = false;

        currentQuestion++;

        if (currentQuestion >= StationData.stations[station].quizQuestions.Length)
        {
            PersistantSaver.playerData.currentQuestion = -1;
            PersistantSaver.playerData.currentScene    = nextScene;
            PersistantSaver.saveToHardDrive();
            yield return(new WaitForSeconds(waitChangeTime));

            SceneManager.LoadScene(nextScene);
        }

        else
        {
            PersistantSaver.playerData.currentQuestion = currentQuestion;
            PersistantSaver.saveToHardDrive();
            yield return(new WaitForSeconds(waitChangeTime));

            foreach (Button but in buttons)
            {
                but.gameObject.GetComponent <Image>().color = Color.white;
            }

            FillQuiz(StationData.stations[station].quizQuestions[currentQuestion]);
            interactable = true;
            startTime    = System.DateTime.Now;
        }
    }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        station = PersistantSaver.getCurrentStation();

        PersistantSaver.playerData.stationStats[station].discovered = true;

        currentQuestion = PersistantSaver.playerData.currentQuestion + 1;
        if (currentQuestion > StationData.stations[station].quizQuestions.Length)
        {
            PersistantSaver.playerData.currentQuestion = -1;
            SceneManager.LoadScene(nextScene);
        }

        else
        {
            startTime  = System.DateTime.Now;
            timer.text = timeInSeconds + "";

            FillQuiz(StationData.stations[station].quizQuestions[currentQuestion]);
        }

        PersistantSaver.saveToHardDrive();
    }
예제 #4
0
 // Use this for initialization
 void Start()
 {
     Debug.Log("saving scene: " + SceneManager.GetActiveScene().name);
     PersistantSaver.playerData.currentScene = SceneManager.GetActiveScene().name;
     PersistantSaver.saveToHardDrive();
 }