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();
	}
Example #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 static void loadNextGameInLoop(AGGameIndex gameIndex){
		
		Debug.Log("Game switched");
		int gIndex = (int) gameIndex;
		gIndex++;
		startGame((AGGameIndex)gIndex);
	}
Example #4
0
    public static void loadNextGameInLoop(AGGameIndex gameIndex)
    {
        Debug.Log("Game switched");
        int gIndex = (int)gameIndex;

        gIndex++;
        startGame((AGGameIndex)gIndex);
    }
 public Hashtable getGameDataForIndex(AGGameIndex gameIndex)
 {
     if(allCateriesData == null) {
         Debug.Log("all game data not initialzed call getSharedData with progression file");
         return null;
     }
     return (Hashtable)allCateriesData[(int)gameIndex];
 }
 public Hashtable getGameDataForIndex(AGGameIndex gameIndex)
 {
     if (allCateriesData == null)
     {
         Debug.Log("all game data not initialzed call getSharedData with progression file");
         return(null);
     }
     return((Hashtable)allCateriesData[(int)gameIndex]);
 }
    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();
    }
Example #8
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
    }
    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
    }
Example #11
0
    void createGameIcons()
    {
        string  textureName;
        Vector3 iconPosition;

        foreach (DictionaryEntry entry in gameIconsTable)
        {
            GameObject gameIcon = Instantiate(gameIconPrefab) as GameObject;
            gameIconScript = (JW_GameIcon)gameIcon.GetComponent <JW_GameIcon>();
            _gameIconIndex = (AGGameIndex)System.Convert.ToInt32(entry.Key);
            textureName    = (string)entry.Value;
            iconPosition   = gameIconPositions();
            gameIconScript.gameIconInitializer((int)_gameIconIndex, textureName, iconPosition);
            _gameIcons.Add(gameIcon);

            GameObject label = Instantiate(nameLabelPrefab) as GameObject;
            if (_gameIconIndex == AGGameIndex.k_ShapePond)
            {
                label.renderer.material    = labelPondGameMat;
                label.transform.position   = new Vector3(3, 10, -150);
                label.transform.localScale = new Vector3(160, 28, 1);
            }
            else if (_gameIconIndex == AGGameIndex.k_NamingFruits)
            {
                label.renderer.material    = labelFruitGameMat;
                label.transform.position   = new Vector3(-262, 10, -150);
                label.transform.localScale = new Vector3(160, 28, 1);
            }
            else if (_gameIconIndex == AGGameIndex.k_MemoryAnimal)
            {
                label.renderer.material    = labelMemoryAnimalMat;
                label.transform.position   = new Vector3(262, 10, -150);
                label.transform.localScale = new Vector3(160, 28, 1);
            }
            else if (_gameIconIndex == AGGameIndex.k_2DShapesColors)
            {
                label.renderer.material    = label2DShapesMat;
                label.transform.position   = new Vector3(-265, -224, -150);
                label.transform.localScale = new Vector3(160, 28, 1);
            }
        }
    }
    private void getSkillIDForGame(AGGameIndex gindex)
    {
        switch (gindex)
        {
        case AGGameIndex.k_NamingFruits: {
            if (_CategoryIndex == (int)NamingFruits_CategoryID.id_Food)
            {
                currentSkillID    = 32;
                catergoryName     = "Food";
                shapeResourceName = "FruitGame";
            }
            else if (_CategoryIndex == (int)NamingFruits_CategoryID.id_AlplabeticOrder)
            {
                currentSkillID    = 131;
                catergoryName     = "Alphabetic Order";
                shapeResourceName = "FruitGame";
            }
        } break;

        case AGGameIndex.k_2DShapesColors: {
            if (_CategoryIndex == (int)SimpleColors_CategoryID.id_Colors)
            {
                currentSkillID    = 132;                                    //temp
                catergoryName     = "Colors";
                shapeResourceName = "SimpleColors";
            }
            else if (_CategoryIndex == (int)SimpleColors_CategoryID.id_2DShapes)
            {
                currentSkillID    = 51;                                    // temp
                catergoryName     = "2-D Shapes";
                shapeResourceName = "SimpleColors";
            }
        } break;

        case AGGameIndex.k_ShapePond:
            currentSkillID = 51; break;

        default: Debug.Log("Wrong Game Index"); break;
        }
    }
Example #13
0
    public static void startGame(AGGameIndex gameIndex)
    {
        currentGameIndex = (int)gameIndex;
        switch (gameIndex)
        {
        case AGGameIndex.k_Beeworld_NumberSequence:
            Application.LoadLevel("BW_NumberSequence");
            break;

        case AGGameIndex.k_Beeworld_CoutingUpDown:
            Application.LoadLevel("BW_NumberLineArithmetic");
            break;

        case AGGameIndex.k_NamingFruits:
            Application.LoadLevel("NamingFruits");
            break;

        case AGGameIndex.k_ShapePond:
            Application.LoadLevel("JWPondGame");
            break;

        case AGGameIndex.k_MemoryAnimal:
            Application.LoadLevel("JW_MemoryAnimals");
            break;

        case AGGameIndex.k_2DShapesColors: {
            Application.LoadLevel("NamingFruits");
        } break;

        case AGGameIndex.k_FishWorld_HideNSeek: {
            Application.LoadLevel("FishWorld_HideNSeek");
        } break;

        default:
            startGame(AGGameIndex.k_NamingFruits);
            return;
        }
    }
Example #14
0
	public static void startGame (AGGameIndex gameIndex) {
		
		currentGameIndex = (int)gameIndex;
		switch (gameIndex) {
		
		case AGGameIndex.k_Beeworld_NumberSequence:
			Application.LoadLevel("BW_NumberSequence");
			break;
			
		case AGGameIndex.k_Beeworld_CoutingUpDown:
			Application.LoadLevel("BW_NumberLineArithmetic");
			break;	
			
		case AGGameIndex.k_NamingFruits:
			Application.LoadLevel("NamingFruits");
			break;
			
		case AGGameIndex.k_ShapePond:
			Application.LoadLevel("JWPondGame");
			break;
			
		case AGGameIndex.k_MemoryAnimal:
			Application.LoadLevel("JW_MemoryAnimals");
			break;
		case AGGameIndex.k_2DShapesColors:{
				Application.LoadLevel("NamingFruits");
		}break;
			
		case AGGameIndex.k_FishWorld_HideNSeek:{
				Application.LoadLevel("FishWorld_HideNSeek");
		}break;	
			
		default:
			startGame(AGGameIndex.k_NamingFruits);
			return;
		}
	}
    void createGameIcons()
    {
        string textureName;
        Vector3 iconPosition;

        foreach(DictionaryEntry entry in gameIconsTable){

        GameObject gameIcon =Instantiate(gameIconPrefab) as GameObject;
        gameIconScript = (JW_GameIcon)gameIcon.GetComponent<JW_GameIcon>();
        _gameIconIndex = (AGGameIndex)System.Convert.ToInt32(entry.Key);
        textureName = (string)entry.Value;
        iconPosition = gameIconPositions();
        gameIconScript.gameIconInitializer((int)_gameIconIndex, textureName, iconPosition);
        _gameIcons.Add(gameIcon);

            GameObject label = Instantiate(nameLabelPrefab) as GameObject;
            if(_gameIconIndex == AGGameIndex.k_ShapePond) {
                label.renderer.material = labelPondGameMat;
                label.transform.position = new Vector3(3,10,-150);
                label.transform.localScale = new Vector3(160, 28, 1);
            } else if(_gameIconIndex == AGGameIndex.k_NamingFruits) {
                label.renderer.material = labelFruitGameMat;
                label.transform.position = new Vector3(-262,10,-150);
                label.transform.localScale = new Vector3(160, 28, 1);
            } else if(_gameIconIndex == AGGameIndex.k_MemoryAnimal) {
                label.renderer.material = labelMemoryAnimalMat;
                label.transform.position = new Vector3(262,10,-150);
                label.transform.localScale = new Vector3(160, 28, 1);
            }
            else if(_gameIconIndex == AGGameIndex.k_2DShapesColors) {
                label.renderer.material = label2DShapesMat;
                label.transform.position = new Vector3(-265,-224,-150);
                label.transform.localScale = new Vector3(160, 28, 1);
            }
        }
    }
Example #16
0
    public void goToGame()
    {
        AGGameIndex index = (AGGameIndex)_currentGameIndex;

        AGGameState.startGame(index);
    }
 private void getSkillIDForGame(AGGameIndex gindex)
 {
     switch(gindex){
         case AGGameIndex.k_NamingFruits:{
                 if(_CategoryIndex==(int)NamingFruits_CategoryID.id_Food){
                     currentSkillID=32;
                     catergoryName = "Food";
                     shapeResourceName = "FruitGame";
                         }
                 else if(_CategoryIndex==(int)NamingFruits_CategoryID.id_AlplabeticOrder){
                         currentSkillID=131;
                         catergoryName="Alphabetic Order";
                         shapeResourceName = "FruitGame";
                         }
                     }break;
     case AGGameIndex.k_2DShapesColors:{
              if(_CategoryIndex==(int) SimpleColors_CategoryID.id_Colors){
                         currentSkillID=132; //temp
                         catergoryName="Colors";
                         shapeResourceName = "SimpleColors";
                         }
         else if(_CategoryIndex==(int) SimpleColors_CategoryID.id_2DShapes){
                         currentSkillID=51; // temp
                         catergoryName="2-D Shapes";
                         shapeResourceName = "SimpleColors";
                         }
                     }break;
         case AGGameIndex.k_ShapePond:
                 currentSkillID= 51;break;
         default: Debug.Log("Wrong Game Index");break;
         }
 }