Ejemplo n.º 1
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
            GameDataHandler.CheckFolder();
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
        }

        GameDataHandler.LoadGemCount(out goldCount, out topazCount, out rubyCount, out sapphireCount, out diamondCount);
        var allcard = GameDataHandler.LoadCards();

        if (allcard != null)
        {
            AllCards = allcard;
        }
        //AllCards = GameDataHandler.LoadCards();
        stage_count = GameDataHandler.LoadStageCount();
        mapName     = "Stage" + stage_count;
        // GameDataHandler.SaveCards(AllCards);
    }