// Updates each text whenever they change in game once the player gains a point
        void Update()
        {
            if (currentScore > scoreLastFrame)
            {
                currentScoreText.text = "S: " + currentScore.ToString("F0");
                scoreTextColour.FlashWhite();
                scoreLastFrame = currentScore;
            }

            // Activates multiplier text if multiplier is over 2
            if (multiplier >= 2 && lastFrameMultiplier < multiplier)
            {
                multiplierText.text = "COMBO X " + multiplier.ToString("F0");
                multiplierTextColour.FlashWhite();
            }
            else if (multiplier < 2)
            {
                multiplierText.text = "";
            }
            lastFrameMultiplier = multiplier;

            if (currentScore >= highScore)
            {
                highScoreText.text = "HI: " + highScore.ToString("F0");
                highScoreTextColour.FlashWhite();
                highScore = currentScore;
                SaveDataManager <OrbitalSaveData> .data.highscore = highScore;
                SaveDataManager <OrbitalSaveData> .SaveData();
            }
        }
Ejemplo n.º 2
0
 public void CompareAndSaveHighScore(float fastestTime)
 {
     if (fastestTime > highScore.FastestTime)
     {
         highScore.SetNewFastestTime(fastestTime);
         SaveDataManager.SaveData(highScore, Global.saveFile_HighScore);
     }
 }
        public void ChangeGameColour(float hue)
        {
            Color colour = Color.HSVToRGB(hue, 0.73f, 1f);

            SaveDataManager <OrbitalSaveData> .data.colour = colour;
            SaveDataManager <OrbitalSaveData> .SaveData();

            ColourLoader.UpdateAllColours();
        }
        public void ChangeGlobalVolume(float volume)
        {
            Debug.Log("Changing global volume!");

            AudioManager.Instance.ChangeGlobalVolume(volume);

            SaveDataManager <OrbitalSaveData> .data.volume = volume;
            SaveDataManager <OrbitalSaveData> .SaveData();
        }
Ejemplo n.º 5
0
 // Update is called once per frame
 void Update()
 {
     if (started && !finished)
     {
         timer -= Time.deltaTime;
         if (timer < 0)
         {
             finished = true;
             contador.gameObject.SetActive(false);
             SD.Test();
             // float[] aux = new float[7];
             SD.SaveData("Gazes", Gazes);
             SD.SaveData("LeftHand", Lhand);
             SD.SaveData("RightHand", Rhand);
             SD.SaveData("Sound", Sound);
             SD.SaveData("Vokaturi", Vokaturi);
             //  contador.text = " " + mirada[0] * 100 / frames[0] + "%" + " " + mirada[1]*100/frames[1]+ "%" + " " + mirada[2] * 100 / frames[2] + "%";
             //Call the pcrps questions
             Preguntas.SetActive(true);
         }
         else
         {
             contador.text = "" + (int)timer;
         }
         //   Debug.Log(timer);
     }
 }
Ejemplo n.º 6
0
    private void Awake()
    {
        if (instance != null)
        {
            Destroy(gameObject);
            return;
        }

        instance = this;

        saveDataManager = new SaveDataManager();

        if (!saveDataManager.IsFirstGameStar)
        {
            foreach (var level in gameSettings.GetAllLevel)
            {
                level.RandomizeLevel();
            }
        }
        saveDataManager.SaveData();
    }
Ejemplo n.º 7
0
 public void SavePosition()
 {
     SetPosition();
     SaveDataManager.SaveData(shipPosition, "Testing");
 }
Ejemplo n.º 8
0
 public void SaveToDisk()
 {
     SaveDataManager.SaveData(_items, DataConsts.INVENTORY_DATA_FILE);
 }
Ejemplo n.º 9
0
 private void SaveName()
 {
     saveDataManager.SaveData(rank, InputString.text);
 }
Ejemplo n.º 10
0
    //セーブする
    private void Save()
    {
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.PlayCount, playCount);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C1WashCount, saveDataNew.C1WashCount);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C2WashCount, saveDataNew.C2WashCount);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C3WashCount, saveDataNew.C3WashCount);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C4WashCount, saveDataNew.C4WashCount);

        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.WashChainCount, saveDataNew.WashChainCount);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.ChachSopeCount, saveDataNew.ChachSopeCount);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.CrashCount, saveDataNew.CrashCount);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.WashCarCount, saveDataNew.WashCarCount);
        if (saveDataNew.isRain == true)
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RainPlayFlg, 1);
        }
        else
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RainPlayFlg, 0);
        }

        if (saveDataNew.isFog == true)
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.FogPlayFlg, 1);
        }
        else
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.FogPlayFlg, 0);
        }
        if (saveDataNew.isWind == true)
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.WindPlayFlg, 1);
        }
        else
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.WindPlayFlg, 0);
        }
        if (saveDataNew.isSekkenChanPlay == true)
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.SekkenChanPlayFlg, 1);
        }
        else
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.SekkenChanPlayFlg, 0);
        }
        if (saveDataNew.isSekkenKun0Play == true)
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.SekkenKun0PlayFlg, 1);
        }
        else
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.SekkenKun0PlayFlg, 0);
        }
        if (saveDataNew.C1HideWashFlg == true)
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C1HideWash, 1);
        }
        else
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C1HideWash, 0);
        }

        if (saveDataNew.C2HideWashFlg == true)
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C2HideWash, 1);
        }
        else
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C2HideWash, 0);
        }
        if (saveDataNew.C3HideWashFlg == true)
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C3HideWash, 1);
        }
        else
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C3HideWash, 0);
        }
        if (saveDataNew.C4HideWashFlg == true)
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C4HideWash, 1);
        }
        else
        {
            saveDataManager.SaveData(SaveDataManager.ESaveDataNo.C4HideWash, 0);
        }
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint1, rankingPoint[0]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint2, rankingPoint[1]);

        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint3, rankingPoint[2]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint4, rankingPoint[3]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint5, rankingPoint[4]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint6, rankingPoint[5]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint7, rankingPoint[6]);

        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint8, rankingPoint[7]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint9, rankingPoint[8]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataNo.RankingPoint10, rankingPoint[9]);

        //ランキングの名前をセーブ
        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName1, rankingName[0]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName2, rankingName[1]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName3, rankingName[2]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName4, rankingName[3]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName5, rankingName[4]);

        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName6, rankingName[5]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName7, rankingName[6]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName8, rankingName[7]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName9, rankingName[8]);
        saveDataManager.SaveData(SaveDataManager.ESaveDataStringNo.RankingName10, rankingName[9]);
    }
Ejemplo n.º 11
0
 public void SavePress(int fileNr)
 {
     SaveDataManager.SaveData(fileNr);
     ShowMessageBox("Game was saved!", false);
 }
 public void SaveData()
 {
     SaveDataManager.SaveData(KeyInputText.text, ValueInputText.text);
 }