public static void AddGoldCube(int count) { PlayerData.goldCube += count; PlayerData.getGoldCubeCount += count; PlayerDataSystem.Save(); Debug.Log(count + "의 골큐획득! > " + goldCube); }
private void OnApplicationQuit() { if (isPlayerDataLoad) { PlayerDataSystem.Save(); ConfigurationDataSystem.Save(); } }
public static void UseUndoCount() { if (undoCount > 0) { PlayerData.undoTryCount++; PlayerData.undoCount--; PlayerDataSystem.Save(); } }
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("광고 구매완료"); }
private void UpdateCheckPlayTime() { playTimeCheckTime += Time.deltaTime; if (playTimeCheckTime > 30) { PlayerData.totalPlayTime += .5f; PlayerDataSystem.Save(); playTimeCheckTime = .0f; } }
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(); } }
private void StructExecute(List <Vector3> initPositions, List <float> initRadius, Vector3 targetPosition) { Stopwatch sw = new Stopwatch(); PlayerDataSystem playerDataSystem = new PlayerDataSystem(initPositions, initRadius); sw.Start(); var count = playerDataSystem.IsCollision(targetPosition, initPositions.Count); sw.Stop(); Debug.Log($"Struct execute finished! Count: {count.Count}, time elapsed: {sw.Elapsed}"); }
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("이미 가지고 있는 캐릭터!"); } }
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(); } } } }
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(); }
void LoadData() { PlayerDataSystem.Load(); ConfigurationDataSystem.Load(); ItemManager.Instance.LoadItemData(); }
public static void Retry() { PlayerData.retryCount++; PlayerDataSystem.Save(); }
public static void AddUndoCount(int count) { undoCount += count; PlayerDataSystem.Save(); }
public static void UseGoldCube(int count) { PlayerData.goldCube -= count; PlayerDataSystem.Save(); }
public static void AddMoveCount(int count) { PlayerData.moveCount += count; PlayerDataSystem.Save(); }