C# Class UIItemSlot, Pharos

Inheritance: MonoBehaviour
Show file Open project: rstaewen/Pharos Class Usage Examples

Public Properties

Property Type Description
background UIWidget,
combineSound UnityEngine.AudioClip
errorSound UnityEngine.AudioClip
grabSound UnityEngine.AudioClip
icon UISprite,
label UILabel,
placeSound AudioClip

Public Methods

Method Description
OnClick ( ) : void

Allow to move objects around via drag & drop.

OnDrag ( Vector2 delta ) : void

Start dragging the item.

OnDrop ( GameObject go ) : void

Stop dragging the item.

OnTooltip ( bool show ) : void

Show a tooltip for the item.

Update ( ) : void

Keep an eye on the item and update the icon when it changes.

UpdateCursor ( ) : void

Set the cursor to the icon of the item being dragged.

Protected Methods

Method Description
Replace ( InvGameItem, item ) : InvGameItem,

Replace the observed item with the specified value. Should return the item that was replaced.

ReplaceExisting ( InvGameItem, item ) : InvGameItem,

Method Details

OnClick() public method

Allow to move objects around via drag & drop.
public OnClick ( ) : void
return void

OnDrag() public method

Start dragging the item.
public OnDrag ( Vector2 delta ) : void
delta Vector2
return void

OnDrop() public method

Stop dragging the item.
public OnDrop ( GameObject go ) : void
go GameObject
return void

OnTooltip() public method

Show a tooltip for the item.
public OnTooltip ( bool show ) : void
show bool
return void

Replace() protected abstract method

Replace the observed item with the specified value. Should return the item that was replaced.
protected abstract Replace ( InvGameItem, item ) : InvGameItem,
item InvGameItem,
return InvGameItem,

ReplaceExisting() protected abstract method

protected abstract ReplaceExisting ( InvGameItem, item ) : InvGameItem,
item InvGameItem,
return InvGameItem,

Update() public method

Keep an eye on the item and update the icon when it changes.
public Update ( ) : void
return void

UpdateCursor() public method

Set the cursor to the icon of the item being dragged.
public UpdateCursor ( ) : void
return void

Property Details

background public property

public UIWidget, background
return UIWidget,

combineSound public property

public AudioClip,UnityEngine combineSound
return UnityEngine.AudioClip

errorSound public property

public AudioClip,UnityEngine errorSound
return UnityEngine.AudioClip

grabSound public property

public AudioClip,UnityEngine grabSound
return UnityEngine.AudioClip

icon public property

public UISprite, icon
return UISprite,

label public property

public UILabel, label
return UILabel,

placeSound public property

public AudioClip placeSound
return AudioClip