Example #1
0
    void StartGame()
    {
        swipeCounter = 0;
        if (gamestate == Gamestate.idle)
        {
            //do game start preparations
            OnNewGame.Invoke();

            if (CountryNameGenerator.instance != null)
            {
                CountryNameGenerator.instance.actualizeTexts(true);
                GenderGenerator.instance.actualizeUI();
                GameLogger.instance.clearGameLog();                     //delete the last game log for the new game
            }


            gamestate = Gamestate.gameActive;
            saveGameState();
        }
    }
Example #2
0
    IEnumerator cyclicTestValue()
    {
        yield return(null);

        //wait at least one frame bevore testing
        while (true)
        {
            while (CardStack.instance.getCardMoveEnabled() == false && onlyCountWhileGameActive == true)
            {
                yield return(null);
            }

            if (valueManager.instance.AreConditinsForResultMet(conditionsToTest))
            {
                OnConditionsTrue.Invoke();
            }
            else
            {
                OnConditionsFalse.Invoke();
            }

            yield return(new WaitForSeconds(deltaTimeCycle));
        }
    }