Esempio n. 1
0
    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);
    }
Esempio n. 2
0
 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");
 }
Esempio n. 3
0
 public void GameStart()
 {
     InGameSaveManager.ClearSaveData();//GTS : 인게임 세이브 데이터 초기화
     LoadingManager.LoadScene("Levels/Floor0");
 }