Exemplo n.º 1
0
    public void Initialize()
    {
        patientDataManager = FindObjectOfType <PatientDataManager>();

        testDelete.onClick.AddListener(DeleteData);
        cardSaveData     = LoadCustomCardsFromLocal();
        categorySaveData = LoadCustomCategoriesFromLocal();
    }
Exemplo n.º 2
0
    public void LevelStarted(int categoryIndex, int level)
    {
        if (currentCategoryData == null || (categoryIndex >= 0 && categoryIndex < categoriesData.Length && categoriesData[categoryIndex] != currentCategoryData))
        {
            currentCategoryData = categoriesData[categoryIndex];
        }
        currentLevel = level;


        if (currentLevel == 0 && !currentCategoryData.completableInitialized)
        {
            var categoryName = categories[categoryIndex].name_id;
            TrackerAsset.Instance.Completable.Initialized(categoryName, CompletableTracker.Completable.Completable);
            currentCategoryData.completableInitialized = true;
        }

        var levelName = GameManager.Instance.GetCurrentLevelName();

        TrackerAsset.Instance.Accessible.Accessed(levelName);
    }
Exemplo n.º 3
0
    private void Init()
    {
        categoriesData = new CategorySaveData[categories.Count];
        for (int i = 0; i < categoriesData.Length; i++)
        {
            CategorySaveData data = new CategorySaveData();
            data.lastLevelUnlocked = i <= lastCategoryUnlocked ? 0 : -1;
            data.totalStars        = 0;
            data.levelsData        = new LevelSaveData[categories[i].levels.Count];
            for (int j = 0; j < data.levelsData.Length; j++)
            {
                data.levelsData[j]       = new LevelSaveData();
                data.levelsData[j].stars = -1;
            }
            categoriesData[i] = data;
        }

        currentCategoryData         = categoriesData[0];
        currentLevel                = 0;
        levelsCreated               = new LevelsCreatedSaveData();
        levelsCreated.levelsCreated = new string[0];
        levelsCreatedHash           = new List <string>();
        levelsCreatedCategory.levels.Clear();
    }