Special kind of inventory display, with a dedicated key associated to it, to allow for shortcuts for use and equip.
More...
|
| string | HotbarKey |
| | the key associated to the hotbar, that will trigger the action when pressed
|
| string | HotbarAltKey |
| | the alt key associated to the hotbar
|
| HotbarPossibleAction | ActionOnKey |
| | the action associated to the key or alt key press
|
| string | TargetInventoryName = "MainInventory" |
| | the name of the inventory to display
|
| string | PlayerID = "Player1" |
| int | NumberOfRows = 3 |
| | the number of rows to display
|
| int | NumberOfColumns = 2 |
| | the number of columns to display
|
| InventoryDisplay | TargetChoiceInventory |
| ItemClasses | ItemClass |
| bool | DrawEmptySlots =true |
| | if this is true, we'll draw slots even if they don't contain an object. Otherwise we don't draw them
|
| bool | AllowMovingObjectsToThisInventory = false |
| | if this is true, the Player will be allowed to move objects from another inventory to this one, using the Move button
|
| int | PaddingTop = 20 |
| | The internal margin between the top of the inventory panel and the first slots.
|
| int | PaddingRight = 20 |
| | The internal margin between the right of the inventory panel and the last slots.
|
| int | PaddingBottom = 20 |
| | The internal margin between the bottom of the inventory panel and the last slots.
|
| int | PaddingLeft = 20 |
| | The internal margin between the left of the inventory panel and the first slots.
|
| InventorySlot | SlotPrefab |
| | the game object to use as a Slot. If left empty, one will be automatically created at runtime
|
| Vector2 | SlotSize = new Vector2(50,50) |
| | the horizontal and vertical size of the slots
|
| Vector2 | IconSize = new Vector2(30,30) |
| | the size of the icon in each slot
|
| Vector2 | SlotMargin = new Vector2(5,5) |
| | the horizontal and vertical margin to apply between slots rows and columns
|
| Sprite | EmptySlotImage |
| | The image to set as the background of each slot when the slot is empty.
|
| Sprite | FilledSlotImage |
| | The image to set as the background of each slot when the slot is not empty.
|
| Sprite | HighlightedSlotImage |
| | The image to set as the background of each slot when the slot is highlighted.
|
| Sprite | PressedSlotImage |
| | The image to set as the background of each slot when the slot is pressed.
|
| Sprite | DisabledSlotImage |
| | The image to set as the background of each slot when the slot is disabled.
|
| Sprite | MovedSlotImage |
| | The image to set as the background of each slot when the item in the slot is being moved around.
|
| Image.Type | SlotImageType |
| | The type of the image (sliced, normal, tiled...)
|
| bool | EnableNavigation = true |
| | if true, the engine will automatically create bindings to navigate through the different slots using keyboard or gamepad.
|
| bool | GetFocusOnStart = false |
| | if this is true, this inventory display will get the focus on start
|
| bool | DisplayTitle =true |
| | if true, will display the panel's title
|
| string | Title |
| | the title for the inventory that will be displayed
|
| Font | TitleFont |
| | the font used to display the quantity
|
| int | TitleFontSize =20 |
| | the font size to use
|
| Color | TitleColor = Color.black |
| | the color to display the quantity in
|
| Vector3 | TitleOffset =Vector3.zero |
| | the padding (distance to the slot's edge)
|
| TextAnchor | TitleAlignment = TextAnchor.LowerRight |
| | where the quantity should be displayed
|
| Font | QtyFont |
| | the font used to display the quantity
|
| int | QtyFontSize =12 |
| | the font size to use
|
| Color | QtyColor = Color.black |
| | the color to display the quantity in
|
| float | QtyPadding =10f |
| | the padding (distance to the slot's edge)
|
| TextAnchor | QtyAlignment = TextAnchor.LowerRight |
| | where the quantity should be displayed
|
| InventoryDisplay | PreviousInventory |
| InventoryDisplay | NextInventory |
|
| override void | OnEnable () |
| | On Enable, we start listening for MMInventoryEvents.
|
| override void | OnDisable () |
| | On Disable, we stop listening for MMInventoryEvents.
|
| virtual void | Awake () |
| | On Awake, initializes the various lists used to keep track of the content of the inventory.
|
| virtual void | RedrawInventoryDisplay () |
| | Redraws the inventory display's contents when needed (usually after a change in the target inventory)
|
| virtual void | InitializeSprites () |
| | Initializes the sprites.
|
| virtual void | DrawInventoryTitle () |
| | Adds and sets up the inventory title child object.
|
| virtual void | AddGridLayoutGroup () |
| | Adds a grid layout group if there ain't one already.
|
| virtual void | ResizeInventoryDisplay () |
| | Resizes the inventory panel, taking into account the number of rows/columns, the padding and margin.
|
| virtual void | DrawInventoryContent () |
| | Draws the content of the inventory (slots and icons)
|
| virtual void | ContentHasChanged () |
| | If the content has changed, we draw our inventory panel again.
|
| virtual void | FillLastUpdateContent () |
| | Fills the last content of the update.
|
| virtual void | UpdateInventoryContent () |
| | Draws the content of the inventory (slots and icons)
|
| virtual void | UpdateSlot (int i) |
| | Updates the slot's content and appearance.
|
| virtual void | InitializeSlotPrefab () |
| | Creates the slot prefab to use in all slot creations.
|
| virtual void | DrawSlot (int i) |
| | Draws the slot and its content (icon, quantity...).
|
| virtual void | SetupSlotNavigation () |
| | Setups the slot navigation using Unity's GUI built-in system, so that the user can move using the left/right/up/down arrows.
|
Special kind of inventory display, with a dedicated key associated to it, to allow for shortcuts for use and equip.