protected override void OnYes() { base.OnYes(); if (IncomeManager.Money >= Cost) { IncomeManager.AddMoney(-Cost); } }
public void CloseAndPay() { // 770 CFA to 1 pound IncomeManager.AddMoney(amountToPay); ChildManager.ApplyEventToAllChildren(new DataPacket(0, 100, 0, 100)); GameObject.Find("MoneyText").GetComponent <Text>().color = new Color(34.0f / 255, 139.0f / 255, 34.0f / 255, 1.0f); Close(); }
protected override void OnYes() { base.OnYes(); IncomeManager.AddMoney(-Cost); if (UnityEngine.Random.Range(0.0f, 1.0f) >= 0.2) { TrafficChild(childThatWillBeTaken); } }
protected override void OnAliveChildTimeComplete(Child child) { base.OnAliveChildTimeComplete(child); Debug.Assert(ChildCanLeaveAtEndOfYearRecords.Count > 0); if (!ChildCanLeaveAtEndOfYearRecords.Peek()) { GameObject.Find(EventDialogScript.EventDialogName).GetComponent <EventDialogScript>().QueueEvent(new PlagueOfBlackPodEventScript(child)); return; } // Only pay child if they leave at end of year IncomeManager.AddMoney((int)(Salary * (1 + (child.Education * 0.01f)))); }
protected override void OnYes() { base.OnYes(); IncomeManager.AddMoney(-CostToPerform); Child child = ChildManager.SelectedChild; if (!ConfirmEventQueued(child)) { // We shouldn't lock this child in return; } child.LockIn(BuildingType); LockedInChildren.Add(child); Timers.Add(0); Tickers.Add(0); AddChildIndicator(child); GameObject.Find("InteractableBuildings").transform.FindChild("Home").GetComponent <ChildVillagerCreatorScript>().CreateChildVillager(BuildingLocation); }
protected override void OnShow() { base.OnShow(); IncomeManager.AddMoney(IncomeManager.CurrentIncome + IncomeManager.IncomeFromChildren); }