public BWDataManager (AGGameIndex gameIndex, int categoryIndex, string file) {
		
		if(gameIndex == AGGameIndex.k_Beeworld_NumberSequence) {
			currentCategoryID = 179;
			currentCategory = "Number Sequence";
		} else {
			if(categoryIndex == 0) {
				currentCategoryID = 178;
				currentCategory = "Counting Up From";
			} else {
				currentCategoryID = 180;
				currentCategory = "Counting Down From";
			}
		}
		
		CategoriesData data = CategoriesData.getSharedData(file);
		Hashtable numberSequenceData = data.getGameDataForIndex(gameIndex);
		ArrayList availableCat = (ArrayList)numberSequenceData["availableCategories"];
		allLevels = (Hashtable)availableCat[categoryIndex];
		
#if (!MAC_PLATFORM)
		coreManager = new CoreDataManager(currentCategoryID);
		allCategoriesCoreData = coreManager.getResultDict();
		currentLevel = coreManager.getCurrentLevel();
#endif
		fetchLevelData();
	}
Beispiel #2
0
    public BWDataManager(AGGameIndex gameIndex, int categoryIndex, string file)
    {
        if (gameIndex == AGGameIndex.k_Beeworld_NumberSequence)
        {
            currentCategoryID = 179;
            currentCategory   = "Number Sequence";
        }
        else
        {
            if (categoryIndex == 0)
            {
                currentCategoryID = 178;
                currentCategory   = "Counting Up From";
            }
            else
            {
                currentCategoryID = 180;
                currentCategory   = "Counting Down From";
            }
        }

        CategoriesData data = CategoriesData.getSharedData(file);
        Hashtable      numberSequenceData = data.getGameDataForIndex(gameIndex);
        ArrayList      availableCat       = (ArrayList)numberSequenceData["availableCategories"];

        allLevels = (Hashtable)availableCat[categoryIndex];

#if (!MAC_PLATFORM)
        coreManager           = new CoreDataManager(currentCategoryID);
        allCategoriesCoreData = coreManager.getResultDict();
        currentLevel          = coreManager.getCurrentLevel();
#endif
        fetchLevelData();
    }
    public MADataManager(AGGameIndex gameIndex, int categoryIndex, string file)
    {
        CategoriesData data = CategoriesData.getSharedData(file);
        Hashtable maData = data.getGameDataForIndex(gameIndex);
        allLevels = (Hashtable)maData["allLevels"];

        #if (!MAC_PLATFORM)
        coreManager = new CoreDataManager(currentCategoryID);
        allCategoriesCoreData = coreManager.getResultDict();
        currentLevel = coreManager.getCurrentLevel();
        #endif
        fetchLevelData();
    }
Beispiel #4
0
    public MADataManager(AGGameIndex gameIndex, int categoryIndex, string file)
    {
        CategoriesData data   = CategoriesData.getSharedData(file);
        Hashtable      maData = data.getGameDataForIndex(gameIndex);

        allLevels = (Hashtable)maData["allLevels"];

#if (!MAC_PLATFORM)
        coreManager           = new CoreDataManager(currentCategoryID);
        allCategoriesCoreData = coreManager.getResultDict();
        currentLevel          = coreManager.getCurrentLevel();
#endif
        fetchLevelData();
    }
    public JW_DataManager(AGGameIndex gIndex, int categoryIndex, string file)
    {
        _CategoryIndex = categoryIndex;
        gameIndex      = (int)gIndex;

        getSkillIDForGame(gIndex);
        CategoriesData data         = CategoriesData.getSharedData(file);
        Hashtable      shapesData   = data.getGameDataForIndex(gIndex);
        ArrayList      availableCat = (ArrayList)shapesData["skills"];

        allLevels = (Hashtable)availableCat[categoryIndex];

        //----------- Core Communication
        #if (!MAC_PLATFORM)
        coreManager           = new CoreDataManager(currentSkillID);
        allCategoriesCoreData = coreManager.getResultDict();
        currentLevel          = coreManager.getCurrentLevel();
        #endif
    }
Beispiel #6
0
    public static void addDummyCategoryData()
    {
        int [] categoryIDs = { 169, 178, 179, 180, 51, 132, 32, 131 };

        for (int i = 0; i < categoryIDs.Length; i++)
        {
            CoreDataManager coreManager           = new CoreDataManager(categoryIDs[i]);
            Hashtable       allCategoriesCoreData = coreManager.getResultDict();

            foreach (string key in allCategoriesCoreData.Keys)
            {
                Hashtable objDict = (Hashtable)allCategoriesCoreData[key];

                int attempted = AGGameState.GetAsInt(objDict["attempted"]);
                int solved    = AGGameState.GetAsInt(objDict["solved"]);

                objDict["attempted"] = attempted + UnityEngine.Random.Range(10, 13);
                objDict["solved"]    = solved + UnityEngine.Random.Range(6, 10);
            }

            coreManager.setResultDict(allCategoriesCoreData);
            coreManager.saveManager();
        }
    }
    public JW_DataManager(AGGameIndex gIndex, int categoryIndex, string file)
    {
        _CategoryIndex=categoryIndex;
        gameIndex=(int)gIndex;

        getSkillIDForGame(gIndex);
        CategoriesData data = CategoriesData.getSharedData(file);
        Hashtable shapesData = data.getGameDataForIndex(gIndex);
        ArrayList availableCat = (ArrayList)shapesData["skills"];
        allLevels = (Hashtable)availableCat[categoryIndex];

           //----------- Core Communication
        #if (!MAC_PLATFORM)
                coreManager = new CoreDataManager(currentSkillID);
                allCategoriesCoreData = coreManager.getResultDict();
                currentLevel = coreManager.getCurrentLevel();
        #endif
    }