Beispiel #1
0
    public void loadLevelOrQuestion()
    {
        questionPlayed++;
        isUserPlayedTheQuestion          = true;
        totalWrongAttempts               = 0;
        loadingQuestionOrLevelInProgress = true;
        Debug.Log("Total Attempts: " + totalAttempts + " Total Corrects: " + totalCorrects);
        bool isleveldone = false;

        if (totalAttempts > 0)
        {
            isleveldone = pgDataManager.calculateResult(totalAttempts, totalCorrects);
        }
        if (questionPlayed >= 5)
        {
            AGGameState.loadNextGameInLoop(AGGameIndex.k_ShapePond);              // to play in loop
            return;
        }
        if (isleveldone)                                                   // Check result
        {
            StartCoroutine(ResetLevel(0.5F, nextLevelDecision.loadLevel)); // load new level
        }
        else
        {
            StartCoroutine(ResetLevel(0.5F, nextLevelDecision.loadQuestion));        // load next question
        }
    }
    void Start()
    {
        FingerGestures.OnFingerTap += FingerGestures_OnFingerTap;

        bool noError;

        noError = PListManager.ParsePListFile(gameData.text, ref gameDataTable);

        if (noError)
        {
            allPositions     = (Hashtable)gameDataTable["positions"];
            availableAnimals = (ArrayList)gameDataTable["availableAnimals"];
        }
        else
        {
            //next game
            AGGameState.loadNextGameInLoop(AGGameIndex.k_MemoryAnimal);
        }

        dataManager = new MADataManager(AGGameIndex.k_MemoryAnimal, 0, progression.text);

        ickyAnimations = ickyModel.GetComponent <MAIckyAnimations>();

        nextQuestion();
    }
Beispiel #3
0
    public void flowerLayerDestroyed()
    {
        questionsInSession++;

        if (questionsInSession >= 5)
        {
            AGGameState.loadNextGameInLoop(AGGameIndex.k_Beeworld_NumberSequence);
            return;
        }
        else
        {
            nextQuestion();
        }
    }
 void celebrationAnimationFinished()
 {
     if (questionsPlayed >= 5)
     {
         AGGameState.loadNextGameInLoop(AGGameIndex.k_MemoryAnimal);
     }
     else
     {
         questionsPlayed++;
         if (dataManager.calculateResult(attempts, corrects))
         {
             dataManager.fetchLevelData();
         }
         nextQuestion();
     }
 }
Beispiel #5
0
    public void flowerLayerDestroyed()
    {
        /*if(currentCategoryIndex == 0)
         *      currentCategoryIndex = 1;
         * else if(currentCategoryIndex == 1)
         *      currentCategoryIndex = 0;
         */
        //dataManager.saveData();
        //dataManager = new BWDataManager(AGGameIndex.k_Beeworld_CoutingUpDown, currentCategoryIndex, progression.text);

        questionsInSession++;

        if (questionsInSession >= 5)
        {
            AGGameState.loadNextGameInLoop(AGGameIndex.k_Beeworld_CoutingUpDown);
        }
        else
        {
            nextQuestion();
        }
    }
    public IEnumerator callNextGame(float delay)
    {
        yield return(new WaitForSeconds(delay));

        AGGameState.loadNextGameInLoop(AGGameIndex.k_NamingFruits);         // to play in loop
    }