예제 #1
0
파일: Shop.cs 프로젝트: IsSnowing/CookieJar
    public void unlockBorder()
    {
        GameController.Load();

        string s = "abcde";

        Debug.Log("example: " + s.Substring(2, 1));
        string middle = GameController.BorderLock.Substring(index, 1);

        Debug.Log("this is startindex: " + index + " this is endindex: " + 1 + " this is middle " + middle);
        if (middle == "1")
        {
            //if there is more coins
            if (GameController.Coins >= amountCoins)
            {
                GameController.Coins -= amountCoins;
                string start = GameController.BorderLock.Substring(0, index);
                string end   = GameController.BorderLock.Substring(index + 1);
                GameController.BorderLock = start + "0" + end;

                //GameController.Save();
                Skins.saveSkin(str);
            }
        }
        else
        {
            Skins.saveSkin(str);
        }
    }