Example #1
0
    void FireWrestler()
    {
        bool hasMoreWrestlersToFire = (GetWrestlers().Count > 2);

        if (hasMoreWrestlersToFire)
        {
            wrestlerDialog = gameManager.GetGUIManager().InstantiatePagedSelectOptionDialog();
            wrestlerDialog.Initialize("Fire a wrestler", GetWrestlers(), new UnityAction(OnFireWrestler), true, new UnityAction(DoneFiring));
        }
        else
        {
            InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog();
            dialog.Initialize("Fire a wrestler", cantFireMessage, new UnityAction(DoneFiring));
        }
    }
    void HireWrestler()
    {
        bool hasMoreWrestlersToHire = (GetWrestlersForHire().Count > 0);

        if (!gameManager.GetPlayerCompany().CanAddWrestlers())
        {
            InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog();
            dialog.Initialize("Hire a wrestler", "You don't have any more space in your roster.", new UnityAction(DoneHiring));
        }
        else if (hasMoreWrestlersToHire)
        {
            bool hasTwoPlusWrestlers = (gameManager.GetPlayerCompany().GetRoster().Count > 1);              // If the player doesn't have enough wrestlers, we won't let the player leave the hiring screen.
            wrestlerDialog = gameManager.GetGUIManager().InstantiatePagedSelectOptionDialog();
            wrestlerDialog.Initialize("Hire a wrestler", GetWrestlersForHire(), new UnityAction(OnHireWrestler), hasTwoPlusWrestlers, new UnityAction(DoneHiring));
        }
        else
        {
            InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog();
            dialog.Initialize("Hire a wrestler", "There aren't any more wrestlers available for hire. Please check back later!", new UnityAction(DoneHiring));
        }
    }
 void ChooseWrestler()
 {
     wrestlerDialog = GameManager.Instance.GetGUIManager().InstantiatePagedSelectOptionDialog();
     wrestlerDialog.Initialize("Train a wrestler", GetWrestlersToTrain(), new UnityAction(OnChooseWrestler), true, new UnityAction(DoneTraining));
 }