Esempio n. 1
0
        public void ActiveNewEvent(int index)
        {
            actualRegionalEvent = groupRegionalEvents[index].GetRandomRegionalEvent();

            //verificated win condition
            if (actualRegionalEvent.GetTypeRegionEvent() == TypeRegionEvent.FinishGame)
            {
                if (controlGameMap.actualCoin >= actualRegionalEvent.winCondition)
                {
                    activeNewEventControlUI();
                    print("Ganaste el juego");
                    textUIEventShow.text = textWin;
                }
                else
                {
                    if (!alreadySeeWinCondiciton)
                    {
                        activeNewEventControlUI();
                        alreadySeeWinCondiciton = true;
                    }
                    else
                    {
                        FinishEventButton();
                    }
                    firstButtonGO.SetActive(false);
                }
            }
            else
            {
                activeNewEventControlUI();
            }
        }
Esempio n. 2
0
        public void RefuseEvent()
        {
            //more events
            if (actualRegionalEvent.workinWithMoreEvents)
            {
                if (!actualRegionalEvent.firstButtonMoreEvent)
                {
                    actualRegionalEvent = actualRegionalEvent.newEventRegionalToGo;
                    activeNewEventControlUI();
                    return;
                }
            }


            /* if (actualRegionalEvent.GetOnlyShowOneBool())
             * {
             *   FinishEventButton();
             * }
             * else
             * {*/
            textUIEventShow.text = actualRegionalEvent.GetDeclineButtonText();
            //}

            //no more events
            DecideTypeEvent(false);
            print("Me rehuso" + actualRegionalEvent.GetPrincipalText());
        }
Esempio n. 3
0
 private void UpdateMenuFinishGameLoop(RegionalEvent regionalEvent)
 {
     MenuGameObject.SetActive(true);
     MenuEventGameObject.SetActive(false);
     playerArgMove.DiePlayer = true;
     textMenu.text           = regionalEvent.GetPrincipalText();
     textMenuButton.text     = regionalEvent.GetFirstButtonText();
     imageMenu.sprite        = regionalEvent.GetSpriteBackGround();
 }
Esempio n. 4
0
        public void ConfirmEvent()
        {
            //more events
            if (actualRegionalEvent.workinWithMoreEvents)
            {
                if (actualRegionalEvent.firstButtonMoreEvent)
                {
                    actualRegionalEvent = actualRegionalEvent.newEventRegionalToGo;
                    activeNewEventControlUI();
                    return;
                }
            }

            if (wonThisGame)
            {
                print("Won");
            }

            //no more events
            DecideTypeEvent(true);
            textUIEventShow.text = actualRegionalEvent.GetConfirmButtonText();
            //print("confirmo: " + actualRegionalEvent.GetPrincipalText());
        }