Exemplo n.º 1
0
    protected override void OnYes()
    {
        base.OnYes();

        if (IncomeManager.Money >= Cost)
        {
            IncomeManager.AddMoney(-Cost);
        }
    }
Exemplo n.º 2
0
    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();
    }
Exemplo n.º 3
0
    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))));
    }
Exemplo n.º 5
0
    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);
    }