示例#1
0
    //todo: use events
    private void TradeSuccess()
    {
        if (ShakeDown)
        {
            Buyer.Attitude += CurrentArt.Value;
            CurrentComment  = "I knew you would understand.";
        }
        else
        {
            Buyer.Attitude++;
            CurrentComment = "That's a deal!";
        }

        Player.ArtWorks.Remove(CurrentArt);
        SelectionWheel.DestroySaleObject();

        Player.Food     += CurrentOffer.GetFoodValue();
        Player.Security += CurrentOffer.GetSecurityValue();

        //TODO: remove items from inventory

        Debug.Log($"You just sold {CurrentArt} for {CurrentOffer.AsText()}!");

        CurrentTradeState = TradeState.Success;

        OnUpdate.Invoke();
    }
示例#2
0
    private void TradeFailure()
    {
        Debug.Log($"{CurrentArt} not sold. Last offer: {CurrentOffer.AsText()}");
        SelectionWheel.DestroySaleObject();

        CurrentTradeState = TradeState.Collapse;

        OnUpdate.Invoke();
    }