C# Class UIItemStorage, Pharos

Inheritance: MonoBehaviour
Show file Open project: rstaewen/Pharos

Public Properties

Property Type Description
background UIWidget,
maxColumns int
maxItemCount int
maxRows int
padding int
pickupSound UnityEngine.AudioClip
spacing int
template GameObject

Public Methods

Method Description
GetItem ( int slot ) : InvGameItem,

Convenience function that returns an item at the specified slot.

PlaceItemInNextAvailableSlot ( InvGameItem, item ) : bool

Replace an item in the container with the specified one.

Replace ( int slot, InvGameItem, item ) : InvGameItem,
ReplaceExisting ( int slot, InvGameItem, item ) : InvGameItem,
Start ( ) : void

Initialize the container and create an appropriate number of UI slots.

Method Details

GetItem() public method

Convenience function that returns an item at the specified slot.
public GetItem ( int slot ) : InvGameItem,
slot int
return InvGameItem,

PlaceItemInNextAvailableSlot() public method

Replace an item in the container with the specified one.
public PlaceItemInNextAvailableSlot ( InvGameItem, item ) : bool
item InvGameItem,
return bool

Replace() public method

public Replace ( int slot, InvGameItem, item ) : InvGameItem,
slot int
item InvGameItem,
return InvGameItem,

ReplaceExisting() public method

public ReplaceExisting ( int slot, InvGameItem, item ) : InvGameItem,
slot int
item InvGameItem,
return InvGameItem,

Start() public method

Initialize the container and create an appropriate number of UI slots.
public Start ( ) : void
return void

Property Details

background public property

Background widget to scale after the item slots have been created.
public UIWidget, background
return UIWidget,

maxColumns public property

Maximum number of columns to create.
public int maxColumns
return int

maxItemCount public property

Maximum size of the container. Adding more items than this number will not work.
public int maxItemCount
return int

maxRows public property

Maximum number of rows to create.
public int maxRows
return int

padding public property

Padding around the border.
public int padding
return int

pickupSound public property

public AudioClip,UnityEngine pickupSound
return UnityEngine.AudioClip

spacing public property

Spacing between icons.
public int spacing
return int

template public property

Template used to create inventory icons.
public GameObject template
return GameObject