C# Класс UIItemSlot, Pharos

Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
background UIWidget,
combineSound UnityEngine.AudioClip
errorSound UnityEngine.AudioClip
grabSound UnityEngine.AudioClip
icon UISprite,
label UILabel,
placeSound AudioClip

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Replace ( InvGameItem, item ) : InvGameItem,

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

ReplaceExisting ( InvGameItem, item ) : InvGameItem,

Описание методов

OnClick() публичный Метод

Allow to move objects around via drag & drop.
public OnClick ( ) : void
Результат void

OnDrag() публичный Метод

Start dragging the item.
public OnDrag ( Vector2 delta ) : void
delta Vector2
Результат void

OnDrop() публичный Метод

Stop dragging the item.
public OnDrop ( GameObject go ) : void
go GameObject
Результат void

OnTooltip() публичный Метод

Show a tooltip for the item.
public OnTooltip ( bool show ) : void
show bool
Результат void

Replace() защищенный абстрактный Метод

Replace the observed item with the specified value. Should return the item that was replaced.
protected abstract Replace ( InvGameItem, item ) : InvGameItem,
item InvGameItem,
Результат InvGameItem,

ReplaceExisting() защищенный абстрактный Метод

protected abstract ReplaceExisting ( InvGameItem, item ) : InvGameItem,
item InvGameItem,
Результат InvGameItem,

Update() публичный Метод

Keep an eye on the item and update the icon when it changes.
public Update ( ) : void
Результат void

UpdateCursor() публичный Метод

Set the cursor to the icon of the item being dragged.
public UpdateCursor ( ) : void
Результат void

Описание свойств

background публичное свойство

public UIWidget, background
Результат UIWidget,

combineSound публичное свойство

public AudioClip,UnityEngine combineSound
Результат UnityEngine.AudioClip

errorSound публичное свойство

public AudioClip,UnityEngine errorSound
Результат UnityEngine.AudioClip

grabSound публичное свойство

public AudioClip,UnityEngine grabSound
Результат UnityEngine.AudioClip

icon публичное свойство

public UISprite, icon
Результат UISprite,

label публичное свойство

public UILabel, label
Результат UILabel,

placeSound публичное свойство

public AudioClip placeSound
Результат AudioClip