Esempio n. 1
0
 public static void AddGoldCube(int count)
 {
     PlayerData.goldCube         += count;
     PlayerData.getGoldCubeCount += count;
     PlayerDataSystem.Save();
     Debug.Log(count + "의 골큐획득! > " + goldCube);
 }
Esempio n. 2
0
 private void OnApplicationQuit()
 {
     if (isPlayerDataLoad)
     {
         PlayerDataSystem.Save();
         ConfigurationDataSystem.Save();
     }
 }
Esempio n. 3
0
 public static void UseUndoCount()
 {
     if (undoCount > 0)
     {
         PlayerData.undoTryCount++;
         PlayerData.undoCount--;
         PlayerDataSystem.Save();
     }
 }
Esempio n. 4
0
 public void PurchaseRemoveAd()
 {
     PlayerData.isRemoveAd = true;
     PlayerDataSystem.Save();
     PlayerData.AddCharacter(16);
     AdMobManager.Instance.HideBanner();
     GameSystemManager.ShowAlertMessage(new AlertMessage(1, string.Format("{0}", LocalizationManager.GetText("Alert_BuyRemoveAdYes")), null, GameAssetsManager.instance.CharacterAssets[16].asset, null));
     StartManager.Instance.AddCharToGrid(16);
     Debug.Log("광고 구매완료");
 }
Esempio n. 5
0
 private void UpdateCheckPlayTime()
 {
     playTimeCheckTime += Time.deltaTime;
     if (playTimeCheckTime > 30)
     {
         PlayerData.totalPlayTime += .5f;
         PlayerDataSystem.Save();
         playTimeCheckTime = .0f;
     }
 }
Esempio n. 6
0
    IEnumerator StageClearing()
    {
        SoundManager.PlaySound(SoundManager.Sound.StageClear);
        string bestClearCountString = MapDataManager.GetMapClearCount(StageNumber);
        int    bestClearCount       = bestClearCountString == "?" ? 999 : int.Parse(bestClearCountString);

        if (bestClearCount == MoveCount)
        {
            StartCoroutine(StageClearEffect(3));
        }
        else if (MoveCount > bestClearCount && MoveCount <= bestClearCount * 1.5f)
        {
            StartCoroutine(StageClearEffect(2));
        }
        else if (MoveCount > bestClearCount * 1.5f && MoveCount < bestClearCount * 5)
        {
            StartCoroutine(StageClearEffect(1));
        }

        StageClearInfoSave();
        if (isGoldCubeClear)
        {
            isGoldCubeClear = false;
            if (bestClearCount == MoveCount)
            {
                PlayerData.AddGoldCube(2);
            }
            else
            {
                PlayerData.AddGoldCube(1);
            }
        }
        StageNumber = StageNumber < 100? StageNumber + 1 : 100;
        if (StageNumber > PlayerData.currentStage)
        {
            PlayerData.currentStage = StageNumber;
            PlayerDataSystem.Save();
        }
        yield return(new WaitForSeconds(.5f));

        controller.Jump();
        yield return(new WaitForSeconds(3.0f));

        if (StageNumber != 1)
        {
            if (StageNumber == 50)
            {
                GooglePlayManager.Instance.OnAddAchievement(2);
            }
            GameStart(StageNumber);
            AdMobManager.Instance.ShowInterstitial();
        }
    }
Esempio n. 7
0
 public static void AddCharacter(int characterNumber)
 {
     if (!IsHavingCharacter(characterNumber))
     {
         string havingCharacterDataString = havingCharacters;
         PlayerData.havingCharacters = havingCharacterDataString + "," + characterNumber.ToString();
         PlayerDataSystem.Save();
         Debug.Log(characterNumber + " 캐릭터 획득!");
     }
     else
     {
         Debug.Log("이미 가지고 있는 캐릭터!");
     }
 }
Esempio n. 8
0
 public void SelectCharacter()
 {
     if (Input.GetMouseButtonDown(0))
     {
         Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
         RaycastHit hit;
         if (Physics.Raycast(ray, out hit, Mathf.Infinity))
         {
             MapNode node = GetCharNodeFromWorldPoint(hit.transform.position - CharacterTransform.position);
             if (node != null)
             {
                 SoundManager.PlaySound(SoundManager.Sound.CharacterSelect);
                 PlayerData.currentCharacter = node.type;
                 PlayerDataSystem.Save();
             }
         }
     }
 }
Esempio n. 9
0
    public static void UpdateClearStageInfo(List <ClearStageInfo> clearStageList)
    {
        StringBuilder data = new StringBuilder();

        for (int i = 0; i < clearStageList.Count; i++)
        {
            if (i == 0)
            {
                data.Append(clearStageList[i].Serialization());
            }
            else
            {
                data.Append("," + clearStageList[i].Serialization());
            }
        }
        PlayerData.stageInfo = data.ToString();
        PlayerDataSystem.Save();
    }
Esempio n. 10
0
 public static void Retry()
 {
     PlayerData.retryCount++;
     PlayerDataSystem.Save();
 }
Esempio n. 11
0
 public static void AddUndoCount(int count)
 {
     undoCount += count;
     PlayerDataSystem.Save();
 }
Esempio n. 12
0
 public static void UseGoldCube(int count)
 {
     PlayerData.goldCube -= count;
     PlayerDataSystem.Save();
 }
Esempio n. 13
0
 public static void AddMoveCount(int count)
 {
     PlayerData.moveCount += count;
     PlayerDataSystem.Save();
 }