void OnHireWrestler() { Wrestler hiredWrestler = wrestlers.Find(x => x.wrestlerName == wrestlerDialog.GetSelectedOption().name); gameManager.GetPlayerCompany().AddWrestlerToRoster(hiredWrestler); gameManager.GetPlayerCompany().money -= hiredWrestler.hiringCost; gameManager.OnCompanyUpdated(); 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. bool hasMoreWrestlersToHire = (GetWrestlersForHire().Count > 0); addAnotherDialog = gameManager.GetGUIManager().InstantiateInfoDialog(); if (hasMoreWrestlersToHire) { if (gameManager.GetPlayerCompany().CanAddWrestlers()) { addAnotherDialog.Initialize("Wrestler hired!", "You hired " + hiredWrestler.wrestlerName + "!\n" + (hasTwoPlusWrestlers ? "Would you like to hire another wrestler?" : "Now, choose another wrestler!"), new UnityAction(HireWrestler), hasTwoPlusWrestlers, new UnityAction(DoneHiring), "Yes", "No"); } else { addAnotherDialog.Initialize("Wrestler hired!", "You hired " + hiredWrestler.wrestlerName + "!\nYour roster is now full.", new UnityAction(DoneHiring)); } } else { addAnotherDialog.Initialize("Wrestler hired!", "You hired " + hiredWrestler.wrestlerName + "!\nThere aren't any more wrestlers available for hire.", new UnityAction(DoneHiring)); } }
public override void OnEnter(GameManager gameManager) { string message = string.Format("Wow, you've made some good progress! Your roster size has increased to {0}, and you can now run TV events to make even more money!", gameManager.GetPlayerCompany().maxRosterSize); InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog(); dialog.Initialize("Moving on up!", message, new UnityAction(OnFinished)); }
public override void OnEnter(GameManager gameManager) { string message = string.Format("Congratulations, it looks like you've got the hang of things. Your roster size has increased to {0}, so hire some more wrestlers and start holding bigger and better events!", gameManager.GetPlayerCompany().maxRosterSize); InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog(); dialog.Initialize("Moving on up!", message, new UnityAction(OnFinished)); }
public override void OnEnter(GameManager gameManager) { string message = "Now that you've got some wrestlers, lets put them to work in our first event.\n\nFirst, click the 'Create Event' button on the main screen."; InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog(); dialog.Initialize("Create your first event!", message, new UnityAction(OnFinished)); }
void OnWelcomeFinished() { string message = string.Format("You currently have the resources to support {0} wrestlers, so choose wisely.", gameManager.GetPlayerCompany().maxRosterSize); InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog(); dialog.Initialize("Roster selection", message, new UnityAction(OnFinished)); }
public override void OnEnter(GameManager gameManager) { this.gameManager = gameManager; string message = string.Format("Congratulations on the creation of {0}! First thing's first, we need to get some talent!", gameManager.GetPlayerCompany().companyName); InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog(); dialog.Initialize("Welcome!", message, new UnityAction(OnWelcomeFinished)); }
void OnTrainingChosen() { selectedTraining = trainingOptions.Find(x => x.trainingName == trainingTypeDialog.GetSelectedOption().name); selectedTraining.ApplyEffects(GameManager.Instance.GetPlayerCompany(), selectedWrestler); GameManager.Instance.OnCompanyUpdated(); trainAnotherDialog = GameManager.Instance.GetGUIManager().InstantiateInfoDialog(); trainAnotherDialog.Initialize("Wrestler trained!", "You trained " + selectedWrestler.wrestlerName + "!\nWould you like to train another wrestler?", new UnityAction(ChooseWrestler), true, new UnityAction(DoneTraining), "Yes", "No"); }
void OnMatchPicked() { WrestlingEvent currentEvent = gameManager.GetCurrentEvent(); currentEvent.matches.Add(match); gameManager.OnWrestlingEventUpdated(); InfoDialog makeAnotherDialog = gameManager.GetGUIManager().InstantiateInfoDialog(); if (wrestlers.Count - usedWrestlers.Count >= 2) { makeAnotherDialog.Initialize("Add another match?", "Would you like to add another match?", new UnityAction(MakeNewMatch), true, new UnityAction(DoneWithMatches), "Yes", "No"); } else { makeAnotherDialog.Initialize("Card finished", "All your wrestlers have a spot on the card, great job!", new UnityAction(DoneWithMatches)); } }
void OnFireWrestler() { Wrestler firedWrestler = wrestlers.Find(x => x.wrestlerName == wrestlerDialog.GetSelectedOption().name); gameManager.GetPlayerCompany().RemoveFromRoster(firedWrestler); gameManager.OnCompanyUpdated(); bool canFireMoreWrestlers = (gameManager.GetPlayerCompany().GetRoster().Count > 2); InfoDialog addAnotherDialog = gameManager.GetGUIManager().InstantiateInfoDialog(); if (canFireMoreWrestlers) { addAnotherDialog.Initialize("Wrestler fired!", "You fired " + firedWrestler.wrestlerName + "!\n" + "Would you like to fire another wrestler?", new UnityAction(FireWrestler), true, new UnityAction(DoneFiring), "Yes", "No"); } else { addAnotherDialog.Initialize("Wrestler fired!", "You fired " + firedWrestler.wrestlerName + "!\n" + cantFireMessage, new UnityAction(DoneFiring)); } }
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)); } }
public override void OnEnter(GameManager gameManager) { this.gameManager = gameManager; List <SelectOptionDialogOption> availableEventTypes = GetAvailableEventTypes(); if (availableEventTypes.Count > 0) { eventTypeDialog = gameManager.GetGUIManager().InstantiateSelectOptionDialog(true); eventTypeDialog.Initialize("Event type", availableEventTypes, new UnityAction(OnTypeSelected), true, new UnityAction(OnCancel)); } else { InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog(); dialog.Initialize("No events available", "You're all out of money!\nTry loaning out some wrestlers to another organization to make some more cash.", new UnityAction(OnNoneAvailableAcknowledge)); } }
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)); } }
public override void OnEnter(GameManager gameManager) { InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog(); dialog.Initialize("Ticket sales", string.Format("Wow! You sold {0} tickets!", gameManager.GetCurrentEvent().TicketsSold), new UnityAction(AcknowledgedTicketSales)); }
public override void OnEnter(GameManager gameManager) { WrestlingEvent wrestlingEvent = gameManager.GetCurrentEvent(); float ticketRevenue = wrestlingEvent.ticketPrice * wrestlingEvent.TicketsSold; float merchSales = 0f; float ppvSales = 0f; float tvAdSales = 0f; float venueCost = wrestlingEvent.EventVenue.GetVenueCost(wrestlingEvent); float eventTypeCost = wrestlingEvent.Type.cost; float talentCost = 0.0f; // Calculate per match / per wrestler costs and revenue. foreach (WrestlingMatch match in wrestlingEvent.matches) { foreach (WrestlingTeam team in match.teams) { foreach (Wrestler wrestler in team.wrestlers) { talentCost += wrestler.perMatchCost; // @TODO Calculate merch sales. wrestler.AddUsedMatchType(match.type); wrestler.AddUsedMatchFinish(match.finish); } } // @TODO Calculate ad revenue. wrestlingEvent.EventVenue.AddSeenMatchType(match.type); wrestlingEvent.EventVenue.AddSeenMatchFinish(match.finish); } // @TODO Calculate PPV revenue. float eventRevenue = ticketRevenue + merchSales + tvAdSales + ppvSales; float eventCosts = venueCost + eventTypeCost + talentCost; wrestlingEvent.revenue = eventRevenue - eventCosts; gameManager.OnWrestlingEventUpdated(); gameManager.GetPlayerCompany().money += wrestlingEvent.revenue; gameManager.GetPlayerCompany().AddEvent(wrestlingEvent); gameManager.OnCompanyUpdated(); InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog(); string reportText = string.Format("{0} tickets @ ${1} = ${2}\n{3} buys = ${4}\n\n{5} costs: -${6}\nVenue: -${7}\nTalent: -${8}\n\nTotal profit: ${9}\n\nOverall rating: {10} / 10", wrestlingEvent.TicketsSold, wrestlingEvent.ticketPrice, ticketRevenue, wrestlingEvent.Type.typeName, (tvAdSales > 0 ? tvAdSales : ppvSales), wrestlingEvent.Type.typeName, eventTypeCost, Mathf.RoundToInt(venueCost), talentCost, Mathf.RoundToInt(wrestlingEvent.revenue), Mathf.RoundToInt(wrestlingEvent.Rating * 10.0f) ); dialog.Initialize(string.Format("Event Report: {0}", wrestlingEvent.eventName), reportText, new UnityAction(OnAcknowledgeReport)); }
public override void OnEnter(GameManager gameManager) { InfoDialog dialog = gameManager.GetGUIManager().InstantiateInfoDialog(); dialog.Initialize(title, message, okAction, (cancelAction != null), cancelAction, "Yes", "No"); }