private void LoadIngameSaveData() { PlayerControl pc = player.GetComponent <PlayerControl>(); pc.DeckManager = new DeckManager(); pc.HandManager = UIManager.instance.GetHand(); pc.DeckManager.Deck = startDeck; pc.DeckManager.AttainCards = startAttain; pc.HandManager.MakeCards(5); if (InGameSaveManager.CheckSaveData()) { List <CardSaveData> deckData = InGameSaveManager.DeckCards; List <int> attainData = InGameSaveManager.AttainCards; for (int i = 0; i < deckData.Count; i++) { startDeck.Add(Card.GetCard(deckData[i])); } for (int i = 0; i < attainData.Count; i++) { startAttain.Add(Card.GetCard(attainData[i])); } endingCondition = InGameSaveManager.Ending; startLevel = InGameSaveManager.Floor; startHp = InGameSaveManager.Hp; buildSeed = InGameSaveManager.Seed; isLoaded = true; InGameSaveManager.ClearSaveData(); } else { for (int i = 0; i < 10; i++)//노말카드 랜덤 12장 생성 { startDeck.Add(Card.GetCard(91)); } startDeck.Add(Card.GetCard(92)); startDeck.Add(Card.GetCard(92)); startDeck.Add(Card.GetCard(93)); startDeck.Add(Card.GetCard(93)); startDeck.Add(Card.GetCard(94)); endingCondition = new EndingConditions(); startLevel = 1; startHp = Config.instance.FullHp; isLoaded = false; } pc.ReLoadDeck(); player.SetHp(startHp); Card.SetPlayer(player); MyCamera.instance.StartPlayerTrace(player); }
void Start() { SoundDelegate.instance.PlayBGM(BGM.FIELDTITLECUT); if (!InGameSaveManager.CheckSaveData())//GTS : 인게임 세이브 체크 추가 { canvas.Find("Btn_Continue").gameObject.SetActive(false); } CheckNew(); }
public void OnStartButtonDown() { if (!isBtnEnable) { return; } ButtonDown(); //SceneManager.LoadScene("Levels/LoadingScene"); if (InGameSaveManager.CheckSaveData()) { startPanel.SetActive(true); return; } isBtnEnable = false; InGameSaveManager.ClearSaveData();//GTS : 인게임 세이브 데이터 초기화 LoadingManager.LoadScene("Levels/Floor0"); }