Exemple #1
0
    public AIPlayer(GameObject playerUIPrefab, GameObject canvas, MonoBehaviourFunctionalities playerMonoBehaviourFunctionalities,
                    PoppupScreenFunctionalities warningScreenref,
                    int id, string name, bool isSpeechAllowed, GameProperties.Instrument likedInstrument) : base(playerUIPrefab, canvas, playerMonoBehaviourFunctionalities, warningScreenref, id, name)
    {
        InitDelays();
        this.likedInstrument = likedInstrument;

        if (!GameProperties.configurableProperties.isSimulation && isSpeechAllowed)
        {
            GameObject erp = new GameObject("EmotionalRoboticPlayer");
            emotionalModule        = erp.AddComponent <EmotionalModule>();
            emotionalModule.Speaks = isSpeechAllowed;
            emotionalModule.ReceiveInvoker(this); //only pass the invoker after it is initialized
        }

        this.type = GameProperties.PlayerType.AIPLAYER_NOT_ASSIGNED;
    }
 public AIPlayerUnbalancedStrategy(GameObject playerUIPrefab, GameObject canvas, MonoBehaviourFunctionalities playerMonoBehaviourFunctionalities, PoppupScreenFunctionalities warningScreenref, int id, string name, bool isSpeechAllowed, GameProperties.Instrument likedInstrument) : base(playerUIPrefab, canvas, playerMonoBehaviourFunctionalities, warningScreenref, id, name, isSpeechAllowed, likedInstrument)
 {
     this.type = GameProperties.PlayerType.UNBALANCED;
 }
 public AIPlayerUnbalancedStrategy(GameObject playerUIPrefab, GameObject canvas, MonoBehaviourFunctionalities playerMonoBehaviourFunctionalities, PoppupScreenFunctionalities warningScreenref, int id, string name, bool isSpeechAllowed) : this(playerUIPrefab, canvas, playerMonoBehaviourFunctionalities, warningScreenref, id, name, isSpeechAllowed, GameProperties.Instrument.NONE)
 {
 }
 public AIPlayerTitForTatStrategy(GameObject playerUIPrefab, GameObject canvas, MonoBehaviourFunctionalities playerMonoBehaviourFunctionalities, PoppupScreenFunctionalities warningScreenref, int id, string name, bool isSpeechAllowed, GameProperties.Instrument likedInstrument) : base(playerUIPrefab, canvas, playerMonoBehaviourFunctionalities, warningScreenref, id, name, isSpeechAllowed, likedInstrument)
 {
     this.type = GameProperties.PlayerType.TITFORTAT;
     didSomeoneDefectedThisRound = false;
 }
    void Start()
    {
        isErrorEncountered     = false;
        playerWarningPoppupRef = new PoppupScreenFunctionalities(true, null, null, poppupPrefab, playerCanvas, GameGlobals.monoBehaviourFunctionalities, Resources.Load <Sprite>("Textures/UI/Icons/Info"), new Color(0.9f, 0.9f, 0.9f), "Audio/snap");
        setupWarningPoppupRef  = new PoppupScreenFunctionalities(true, null, null, poppupPrefab, playerCanvas, GameGlobals.monoBehaviourFunctionalities, Resources.Load <Sprite>("Textures/UI/Icons/Info"), new Color(0.9f, 0.9f, 0.9f), "Audio/snap");
        Object.DontDestroyOnLoad(playerCanvas);


        if (!GameProperties.configurableProperties.isSimulation && !GameProperties.configurableProperties.isAutomaticalBriefing)
        {
            GameParameterization manualGameParam = new GameParameterization();
            manualGameParam.playerParameterizations = new List <PlayerParameterization>();


            this.customizeLabel = GameObject.Find("Canvas/SetupScreen/customizeLabel").gameObject;

            this.UIResetButton           = GameObject.Find("Canvas/SetupScreen/resetButton").gameObject.GetComponent <Button>();
            this.UINameSelectionInputBox = GameObject.Find("Canvas/SetupScreen/nameSelectionInputBox").gameObject.GetComponent <InputField>();
            this.UIStartGameButton       = GameObject.Find("Canvas/SetupScreen/startGameButton").gameObject.GetComponent <Button>();
            this.UIAddPlayerButton       = GameObject.Find("Canvas/SetupScreen/addPlayerGameButton").gameObject.GetComponent <Button>();

            this.UIAIPlayerSelectionButtonsObject = GameObject.Find("Canvas/SetupScreen/addAIPlayerGameButtons").gameObject;
            Button[] UIAIPlayerSelectionButtons = UIAIPlayerSelectionButtonsObject.GetComponentsInChildren <Button>();

            this.configSelectionButtonsObject = GameObject.Find("Canvas/SetupScreen/configButtons").gameObject;
            Button[] UIConfigButtons = configSelectionButtonsObject.GetComponentsInChildren <Button>();

            UIResetButton.onClick.AddListener(delegate {
                GameGlobals.players.Clear();
                foreach (Button button in UIAIPlayerSelectionButtons)
                {
                    button.interactable = true;
                }
            });


            UIStartGameButton.gameObject.SetActive(false);

            UIStartGameButton.onClick.AddListener(delegate { StartGame(); });
            UIAddPlayerButton.onClick.AddListener(delegate {
                manualGameParam.playerParameterizations.Add(new PlayerParameterization("Sam", "HUMAN"));
                CheckForAllPlayersRegistered(manualGameParam);
            });


            manualGameParam.ngType = "RANDOM";
            for (int i = 0; i < UIAIPlayerSelectionButtons.Length; i++)
            {
                GameGlobals.numberOfSpeakingPlayers++;
                Button button = UIAIPlayerSelectionButtons[i];
                button.onClick.AddListener(delegate
                {
                    int index = new List <Button>(UIAIPlayerSelectionButtons).IndexOf(button);
                    switch ((GameProperties.PlayerType)(index + 4))
                    {
                    //case GameProperties.PlayerType.SIMPLE:
                    //    manualGameParam.playerParameterizations.Add(new PlayerParameterization("Sam", "SIMPLE", false));
                    //    break;
                    case GameProperties.PlayerType.COOPERATIVE:
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Cristoph", "COOPERATIVE", false));
                        break;

                    case GameProperties.PlayerType.GREEDY:
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Giovanni", "GREEDY", false));
                        break;

                    case GameProperties.PlayerType.BALANCED:
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Brian", "BALANCED", false));
                        break;

                    case GameProperties.PlayerType.UNBALANCED:
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Ulrich", "UNBALANCED", false));
                        break;

                    case GameProperties.PlayerType.TITFORTAT:
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Tim", "TITFORTAT", false));
                        break;
                    }
                    CheckForAllPlayersRegistered(manualGameParam);
                });
            }

            for (int i = 0; i < UIConfigButtons.Length; i++)
            {
                Button button = UIConfigButtons[i];
                button.onClick.AddListener(delegate
                {
                    if (button.gameObject.name.EndsWith("1"))
                    {
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Player", "HUMAN"));
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Player", "HUMAN"));
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Player", "HUMAN"));
                        manualGameParam.ngType = "RANDOM";
                    }
                    else if (button.gameObject.name.EndsWith("2"))
                    {
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Player", "COOPERATIVE", false));
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Player", "GREEDY", false));
                        manualGameParam.playerParameterizations.Add(new PlayerParameterization("Player", "HUMAN"));
                        manualGameParam.ngType = "RANDOM";
                    }
                    button.interactable = false;
                    CheckForAllPlayersRegistered(manualGameParam);
                });
            }
        }
        else
        {
            //auto fetch config
            List <GameParameterization> gameParameterizations = GameProperties.currSessionParameterization.gameParameterizations;
            GameProperties.currGameParameterization = gameParameterizations[(GameGlobals.currGameId - 1) % gameParameterizations.Count];
            StartGame();
        }
    }
Exemple #6
0
 public override void InitUI(GameObject playerUIPrefab, GameObject canvas, PoppupScreenFunctionalities warningScreenRef)
 {
     base.InitUI(playerUIPrefab, canvas, warningScreenRef);
     this.DisableAllInputs();
 }
Exemple #7
0
    public UIPlayer(GameObject playerUIPrefab, GameObject playerCanvas, MonoBehaviourFunctionalities playerMonoBehaviourFunctionalities, PoppupScreenFunctionalities warningScreenRef, int id, string name) : base(id, name)
    {
        this.type = GameProperties.PlayerType.HUMAN;

        InitUI(playerUIPrefab, playerCanvas, warningScreenRef);

        //position UI on canvas
        this.GetPlayerUI().transform.Translate(new Vector3(0, -GameGlobals.players.Count * (0.2f * Screen.height), 0));

        //position UI correctly depending on players number (table layout)
        //float refAngle = (180.0f / (numPlayers - 1));
        //((UIPlayer)currPlayer).GetPlayerUI().transform.RotateAround(new Vector3(510, 490, 0), new Vector3(0, 0, 1), (i * refAngle));
        //((UIPlayer)currPlayer).GetPlayerUI().transform.Rotate(new Vector3(0, 0, 1), -(i*refAngle) + 90.0f);

        //temporarily on canvas...
        this.playerMonoBehaviourFunctionalities = playerMonoBehaviourFunctionalities;
        //this.GetSpeechBaloonUI().GetComponentInChildren<Text>().text = Application.streamingAssetsPath +" "+ GameGlobals.FAtiMAScenarioPath;
        //this.GetSpeechBaloonUI().SetActive(true);
    }
Exemple #8
0
    public virtual void InitUI(GameObject playerUIPrefab, GameObject canvas, PoppupScreenFunctionalities warningScreenRef)
    {
        this.canvas           = canvas;
        this.warningScreenRef = warningScreenRef;

        this.playerUI             = Object.Instantiate(playerUIPrefab, canvas.transform);
        this.playerMarkerUI       = playerUI.transform.Find("marker").gameObject;
        this.playerDisablerUI     = playerUI.transform.Find("disabler").gameObject;
        this.playerSelfDisablerUI = playerUI.transform.Find("selfDisabler").gameObject;
        playerSelfDisablerUI.SetActive(false); //provide interaction by default

        GameObject UISpeechBalloonLeft  = playerUI.transform.Find("speechBalloonLeft").gameObject;
        GameObject UISpeechBalloonRight = playerUI.transform.Find("speechBalloonRight").gameObject;

        this.UISpeechBalloon = (this.id % 2 == 0)? UISpeechBalloonLeft : UISpeechBalloonRight;
        UISpeechBalloonLeft.SetActive(false);
        UISpeechBalloonRight.SetActive(false);

        this.UIplayerActionButton = playerUI.transform.Find("playerActionSection/playerActionButton").gameObject.GetComponent <Button>();

        this.UInameText   = playerUI.transform.Find("nameText").gameObject.GetComponent <Text>();
        this.UImoneyValue = playerUI.transform.Find("playerStateSection/moneyValue").gameObject.GetComponent <Text>();

        this.UISkillLevelsTexts  = playerUI.transform.Find("playerStateSection/skillTable/skillLevels").GetComponentsInChildren <Text>();
        this.UISkillIconsButtons = new List <Button>(playerUI.transform.Find("playerStateSection/skillTable/skillIcons").GetComponentsInChildren <Button>());
        foreach (GameProperties.Instrument instrument in skillSet.Keys)
        {
            UISkillIconsButtons[(int)instrument].GetComponent <Outline>().enabled = false;
            UISkillLevelsTexts[(int)instrument].transform.gameObject.SetActive(false);
            UISkillIconsButtons[(int)instrument].transform.gameObject.SetActive(false);
        }
        this.UIChooseDiceRollInstrumentScreen = playerUI.transform.Find("playerActionSection/chooseDiceRollInstrumentPhaseUI").gameObject;


        this.UILevelUpScreen = playerUI.transform.Find("playerActionSection/levelUpPhaseUI").gameObject;


        //--------------------this is disabled in this version-----------------------------
        this.UIbuyTokenButton = UILevelUpScreen.transform.Find("buyTokenSelection/buyTokenButton").GetComponent <Button>();
        UIbuyTokenButton.onClick.AddListener(delegate()
        {
            GameGlobals.audioManager.PlayClip("Audio/snap");
            BuyTokens(1);
            UpdateCommonUIElements();
        });
        this.UIdiscardChangesButton = UILevelUpScreen.transform.Find("buyTokenSelection/discardChangesButton").GetComponent <Button>();
        UIdiscardChangesButton.onClick.AddListener(delegate()
        {
            GameGlobals.audioManager.PlayClip("Audio/snap");
            RollBackChangesToPhaseStart();
            UpdateCommonUIElements();
        });
        this.UIbuyTokenButton.enabled       = false;
        this.UIdiscardChangesButton.enabled = false;
        //--------------------------------------------------------------------------------


        this.UIspendTokenInInstrumentButton = UILevelUpScreen.transform.Find("spendTokenSelection/spendTokenInPreferredInstrumentButton").GetComponent <Button>();
        UIspendTokenInInstrumentButton.onClick.AddListener(delegate()
        {
            GameGlobals.audioManager.PlayClip("Audio/snap");
            if (numTokens == 0 && money >= GameProperties.configurableProperties.tokenValue)
            {
                BuyTokens(1);
            }
            SpendToken(preferredInstrument);
            UpdateCommonUIElements();
            //auto pass phase
            if (numTokens == 0)
            {
                SendLevelUpResponse();
            }
        });
        this.UIspendTokenInMarketingButton = UILevelUpScreen.transform.Find("spendTokenSelection/spendTokenInMarketingButton").GetComponent <Button>();
        UIspendTokenInMarketingButton.transform.GetChild(0).GetComponent <Image>().sprite = UISkillIconsButtons[(int)GameProperties.Instrument.MARKETING].transform.GetComponent <Image>().sprite;
        UIspendTokenInMarketingButton.onClick.AddListener(delegate()
        {
            GameGlobals.audioManager.PlayClip("Audio/snap");
            if (numTokens == 0 && money >= GameProperties.configurableProperties.tokenValue)
            {
                BuyTokens(1);
            }
            SpendToken(GameProperties.Instrument.MARKETING);
            UpdateCommonUIElements();
            //auto pass phase
            if (numTokens == 0)
            {
                SendLevelUpResponse();
            }
        });



        this.UIPlayForInstrumentScreen = playerUI.transform.Find("playerActionSection/playForInstrumentUI").gameObject;

        this.UInotRollDicesButton = UIPlayForInstrumentScreen.transform.Find("notRollDicesButton").GetComponent <Button>();
        UInotRollDicesButton.onClick.AddListener(delegate()
        {
            GameGlobals.audioManager.PlayClip("Audio/snap");
            ChangeDiceRollInstrument(GameProperties.Instrument.NONE);
            UpdateCommonUIElements();
            SendPlayForInstrumentResponse();
        });
        this.UIrollForPreferredInstrumentButton = UIPlayForInstrumentScreen.transform.Find("rollForPreferredInstrumentButton").GetComponent <Button>();
        UIrollForPreferredInstrumentButton.onClick.AddListener(delegate()
        {
            GameGlobals.audioManager.PlayClip("Audio/snap");
            ChangeDiceRollInstrument(this.preferredInstrument);
            UpdateCommonUIElements();
            SendPlayForInstrumentResponse();
        });

        this.UILastDecisionsScreen        = playerUI.transform.Find("playerActionSection/lastDecisionsUI").gameObject;
        this.UILastDecisionsMegaHitScreen = UILastDecisionsScreen.transform.Find("earnMoneyQuestion/megaHitQuestion").gameObject;
        this.UILastDecisionsFailScreen    = UILastDecisionsScreen.transform.Find("earnMoneyQuestion/failQuestion").gameObject;

        this.UIReceiveMegaHitButton            = UILastDecisionsMegaHitScreen.transform.Find("receiveButton").gameObject.GetComponent <Button>();
        this.UIStickWithMarketingMegaHitButton = UILastDecisionsMegaHitScreen.transform.Find("stickWithMarketing").gameObject.GetComponent <Button>();

        this.UIReceiveFailButton = UILastDecisionsFailScreen.transform.Find("receiveButton").gameObject.GetComponent <Button>();


        UInameText.text = this.name;
        UpdateCommonUIElements();
    }
    private void LoadEndScreenUIElements()
    {
        PoppupScreenFunctionalities infoPoppupNeutralRef = new PoppupScreenFunctionalities(false, null, null, poppupPrefab, mainScene, this.GetComponent <MonoBehaviourFunctionalities>(), Resources.Load <Sprite>("Textures/UI/Icons/Info"), new Color(0.9f, 0.9f, 0.9f));

        GameGlobals.players.Sort(SortPlayersByMoney);
        int numPlayers = GameGlobals.players.Count;

        for (int i = 0; i < numPlayers; i++)
        {
            Player     currPlayer    = GameGlobals.players[i];
            GameObject newTableEntry = Object.Instantiate(UIIndividualTableEntryPrefab, UIIndividualTable.transform);
            newTableEntry.GetComponentsInChildren <Text>()[0].text = currPlayer.GetName();
            newTableEntry.GetComponentsInChildren <Text>()[1].text = currPlayer.GetMoney().ToString();
        }

        //Text UIEndGameButtonText = UIEndGameButton.GetComponentInChildren<Text>();
        Text UIRestartGameButtonText = UIRestartGameButton.GetComponentInChildren <Text>();

        if (GameProperties.configurableProperties.isAutomaticalBriefing)
        {
            if (GameGlobals.currGameId >= GameProperties.configurableProperties.numSessionGames)
            {
                //infoPoppupNeutralRef.DisplayPoppup("You reached the end of the experiment. You should now fill in the first questionnaire and you need to memorize the following code and also your score.");
                infoPoppupNeutralRef.DisplayPoppup("You reached the end of the second game. Please write down your score, as well as the following gamecode, and fill the second questionnaire to finish the experiment.");
                //UIEndGameButton.gameObject.SetActive(true);
                //UIEndGameButton.interactable = true;
                //UIEndGameButtonText.text = "Final Notes";
                UIWarningText.text = "You reached the end of the second game.Please write down your score, as well as the following gamecode, and fill the second questionnaire to finish the experiment.";

                UIEndGameButton.gameObject.SetActive(false);
                UIEndGameButton.interactable = false;
                UIRestartGameButton.gameObject.SetActive(false);
                UIRestartGameButton.interactable = false;

                UIFinishedGameOverlay.SetActive(true);
            }
            else
            {
                //infoPoppupNeutralRef.DisplayPoppup("You reached the end of one of the games to play in this session. We assume that you are prepared for the experiment game. Good luck!");
                infoPoppupNeutralRef.DisplayPoppup("You reached the end of the first game. Please write down your score (the total amount of money you made) and fill the first questionnaire. Please, do not move to next game until the questionnaire mentions you to do so.");
                UIRestartGameButton.gameObject.SetActive(true);
                UIRestartGameButton.interactable = true;
                UIRestartGameButtonText.text     = "Next game";
                UIWarningText.text = "Please write down your score (the total amount of money you made) and fill the first questionnaire. Please, do not move to next game until the questionnaire mentions you to do so.";

                UIEndGameButton.gameObject.SetActive(false);
                UIEndGameButton.interactable = false;

                UIFinishedGameOverlay.SetActive(false);
            }
        }
        else
        {
            UIRestartGameButton.gameObject.SetActive(true);
            UIRestartGameButton.interactable = true;
            UIRestartGameButtonText.text     = "Restart Game";
            UIEndGameButton.gameObject.SetActive(false);
            UIEndGameButton.interactable = false;
        }



        if (GameGlobals.albums != null)
        {
            //disable rendering of some albums and selecting others
            int numAlbumsPlayed = GameGlobals.albums.Count;
            for (int i = 0; i < numAlbumsPlayed; i++)
            {
                Album      currAlbum   = GameGlobals.albums[i];
                GameObject currAlbumUI = currAlbum.GetAlbumUI();
                if ((numAlbumsPlayed - i) > 5) //maximum of 5 last albums rendered albums
                {
                    currAlbumUI.SetActive(false);
                    continue;
                }
                currAlbumUI.SetActive(true);

                Animator animator = currAlbumUI.GetComponentInChildren <Animator>();
                animator.Rebind();
                animator.Play(0);
                animator.speed = (i * 0.1f < animator.speed) ? animator.speed - i * 0.1f : animator.speed;

                currAlbumUI.transform.SetParent(UIAlbumCollectionDisplay.transform);
                currAlbumUI.transform.localPosition = new Vector3(0, 0, 0);
                currAlbumUI.transform.localScale    = new Vector3(1, 1, 1);

                currAlbumUI.transform.Translate(new Vector3(i * Screen.width * 0.03f, 0, 0));
            }
            //write gameId in finish experiment text
            UIFinishedGameOverlay.transform.Find("text/gameId").GetComponent <Text>().text = GameGlobals.currSessionId;
            UIFinishedGameOverlay.transform.Find("text/WebGLInputField/Text").GetComponent <Text>().text = GameGlobals.currSessionId;
            Button UICopyGameIdButton = UIFinishedGameOverlay.transform.Find("text/copyGameIdButton").GetComponent <Button>();
            Button UINextGameButton   = UIFinishedGameOverlay.transform.Find("text/nextGameButton").GetComponent <Button>();

            UINextGameButton.onClick.AddListener(delegate() {
                RestartGame();
            });
        }

        UIRestartGameButton.onClick.AddListener(delegate() {
            RestartGame();
        });
    }
Exemple #10
0
    public void InitGame()
    {
        interruptionRequests = 0;
        InterruptGame(); //interrupt game update while loading...

        choosePreferedInstrumentResponseReceived = false;
        playForInstrumentResponseReceived        = false;
        levelUpResponseReceived      = false;
        lastDecisionResponseReceived = false;
        currPlayerIndex = 0;


        //get player poppups (can be from any player) and set methods
        if (GameGlobals.players.Count > 0)
        {
            UIPlayer firstUIPlayer = null;
            int      pIndex        = 0;
            while (firstUIPlayer == null && pIndex < GameGlobals.players.Count)
            {
                firstUIPlayer = (UIPlayer)GameGlobals.players[pIndex++];
                if (firstUIPlayer != null)
                {
                    firstUIPlayer.GetWarningScreenRef().AddOnShow(InterruptGame);
                    firstUIPlayer.GetWarningScreenRef().AddOnHide(ContinueGame);
                }
            }
        }
        infoPoppupLossRef    = new PoppupScreenFunctionalities(false, InterruptGame, ContinueGame, poppupPrefab, canvas, GameGlobals.monoBehaviourFunctionalities, Resources.Load <Sprite>("Textures/UI/Icons/InfoLoss"), new Color(0.9f, 0.8f, 0.8f), "Audio/albumLoss");
        infoPoppupWinRef     = new PoppupScreenFunctionalities(false, InterruptGame, ContinueGame, poppupPrefab, canvas, GameGlobals.monoBehaviourFunctionalities, Resources.Load <Sprite>("Textures/UI/Icons/InfoWin"), new Color(0.9f, 0.9f, 0.8f), "Audio/albumVictory");
        infoPoppupNeutralRef = new PoppupScreenFunctionalities(false, InterruptGame, ContinueGame, poppupPrefab, canvas, GameGlobals.monoBehaviourFunctionalities, Resources.Load <Sprite>("Textures/UI/Icons/Info"), new Color(0.9f, 0.9f, 0.9f), "Audio/snap");

        //these poppups load the end scene
        endPoppupLossRef = new PoppupScreenFunctionalities(false, InterruptGame, ContinueGame, poppupPrefab, canvas, GameGlobals.monoBehaviourFunctionalities, Resources.Load <Sprite>("Textures/UI/Icons/InfoLoss"), new Color(0.9f, 0.8f, 0.8f), delegate() { /*end game*/ if (this.gameMainSceneFinished)
                                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                                 GameSceneManager.LoadEndScene();
                                                                                                                                                                                                                                                                             }
                                                                                                                                                                                                                                                                             return(0); });
        endPoppupWinRef = new PoppupScreenFunctionalities(false, InterruptGame, ContinueGame, poppupPrefab, canvas, GameGlobals.monoBehaviourFunctionalities, Resources.Load <Sprite>("Textures/UI/Icons/InfoWin"), new Color(0.9f, 0.9f, 0.8f), delegate() { /*end game*/ if (this.gameMainSceneFinished)
                                                                                                                                                                                                                                                                           {
                                                                                                                                                                                                                                                                               GameSceneManager.LoadEndScene();
                                                                                                                                                                                                                                                                           }
                                                                                                                                                                                                                                                                           return(0); });

        ChangeActivePlayerUI(((UIPlayer)(GameGlobals.players[0])), 2.0f);


        gameMainSceneFinished       = false;
        preferredInstrumentsChoosen = false;

        //diceRollDelay = UIRollDiceForInstrumentOverlay.GetComponent<Animator>().GetCurrentAnimatorStateInfo(0).length;
        diceRollDelay = 4.0f;

        canCheckAlbumResult         = false;
        checkedAlbumResult          = false;
        canSelectToCheckAlbumResult = true;
        int numPlayers = GameGlobals.players.Count;

        Player currPlayer = null;

        for (int i = 0; i < numPlayers; i++)
        {
            currPlayer = GameGlobals.players[i];
            currPlayer.ReceiveGameManager(this);
            currPlayer.ReceiveTokens(1);
        }

        GameGlobals.currGameRoundId = 0; //first round
        numMegaHits = 0;

        marketLimit             = Mathf.FloorToInt(GameProperties.configurableProperties.numberOfAlbumsPerGame * 4.0f / 5.0f) - 1;
        currNumberOfMarketDices = GameProperties.configurableProperties.initNumberMarketDices;

        rollDiceForInstrumentOverlayAnimator = UIRollDiceForInstrumentOverlay.GetComponent <Animator>();

        ContinueGame();
    }