Basics
Guides
API Reference
Basics
Guides
API Reference
[12:7] extends: FxObj
Wraps FXGL's TradeItem, a generic value type representing an item that can be bought or sold in a Shop. Carries a name, description, buy / sell price, and underlying item key.
TradeItem (Item = null, string Name = "", string Description = "", int SellPrice = 0, int BuyPrice = 0, int Quantity = 1)
Creates a new TradeItem for the given underlying item.
Item is the underlying item key (string, enum, etc).Name is the display name.Description is the item description.SellPrice is the value when sold.BuyPrice is the cost to buy.Quantity is the trade-item quantity (defaults to 1).adopt (object Ajo)
Wraps an existing TradeItem AussomJavaObject.
Ajo is an AussomJavaObject around a TradeItem.A new wrapper.getName ()
Returns the trade item name.
A string.getBuyPrice ()
Returns the buy price.
An int.getSellPrice ()
Returns the sell price.
An int.getQuantity ()
Returns the quantity.
An int.getItem ()
Returns the underlying item key.
The item key (string, enum, etc).getDescription ()
Returns the item description.
A string.setItem (Item)
Updates the underlying item key.
Item is the new item key.this objectsetName (string Name)
Updates the display name.
Name is the new name.this objectsetDescription (string Description)
Updates the description.
Description is the new description.this objectsetSellPrice (int SellPrice)
Updates the sell price.
SellPrice is the new sell price.this objectsetBuyPrice (int BuyPrice)
Updates the buy price.
BuyPrice is the new buy price.this objectsetQuantity (int Quantity)
Updates the quantity (e.g. when partially sold).
Quantity is the new quantity.this objectcopy ()
Returns a fresh copy of this TradeItem.
A new TradeItem wrapper.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.