Example #1
0
    public void SaveData()
    {
        UserStatus us = new UserStatus();

        us.SetProperty(Mute, DarknessMode);
        us.SetUserStatus(highscore, playcount);

        if (gameStatus == GameStatus.GameOver || ViewManager.Instance.retry)
        {
            map = new Map();
            rightAddLineCount = 0;
            LeftAddLineCount  = 0;
            score             = 0;
            combo             = 1;

            for (int i = 0; i < 5; i++)
            {
                map.AddLineRight(mapSetting.GetLine(0));
            }

            rightLeft   = mapSetting.GetLeft(leftLeft);
            rightString = mapSetting.GetLine(map.tap);
            leftLeft    = mapSetting.GetLeft(rightLeft);
            leftString  = mapSetting.GetLine(map.tap);
        }

        if (tutorialMode)
        {
            us.SetMapInformation(map, rightString, leftString, rightLeft, leftLeft, 0);
        }
        else
        {
            us.SetMapInformation(map, rightString, leftString, rightLeft, leftLeft, score);
        }
        SaveLoadManager.SavePlayer(us);
    }