Tanoda
DragAndDropCell Class Reference

Every item's cell must contain this script More...

Inheritance diagram for DragAndDropCell:

Classes

class  DropEventDescriptor
 

Public Types

enum  CellType { Swap , DropOnly , DragOnly }
 
enum  TriggerType { DropRequest , DropEventEnd , ItemAdded , ItemWillBeDestroyed }
 

Public Member Functions

void OnDrop (PointerEventData data)
 Item is dropped in this cell More...
 
void UpdateBackgroundState ()
 Change cell's sprite color on item put/remove. More...
 
void UpdateMyItem ()
 Updates my item More...
 
DragAndDropItem GetItem ()
 Get item from this cell More...
 
void AddItem (DragAndDropItem newItem)
 Manualy add item into this cell More...
 
void RemoveItem ()
 Manualy delete item from this cell More...
 
void SwapItems (DragAndDropCell firstCell, DragAndDropCell secondCell)
 Swap items between two cells More...
 

Static Public Member Functions

static implicit operator DragAndDropCell (DragAndDropRawCell v)
 

Public Attributes

CellType cellType = CellType.Swap
 
Color empty = new Color()
 
Color full = new Color()
 
bool unlimitedSource = false
 
bool ignoreColor = false
 

Detailed Description

Every item's cell must contain this script

Definition at line 11 of file DragAndDropCell.cs.

Member Enumeration Documentation

◆ CellType

Enumerator
Swap 
DropOnly 
DragOnly 

Definition at line 13 of file DragAndDropCell.cs.

◆ TriggerType

Enumerator
DropRequest 
DropEventEnd 
ItemAdded 
ItemWillBeDestroyed 

Definition at line 20 of file DragAndDropCell.cs.

Member Function Documentation

◆ AddItem()

void DragAndDropCell.AddItem ( DragAndDropItem  newItem)

Manualy add item into this cell

Parameters
newItemNew item

Definition at line 343 of file DragAndDropCell.cs.

◆ GetItem()

DragAndDropItem DragAndDropCell.GetItem ( )

Get item from this cell

Returns
Item

Definition at line 334 of file DragAndDropCell.cs.

◆ OnDrop()

void DragAndDropCell.OnDrop ( PointerEventData  data)

Item is dropped in this cell

Parameters
data

Definition at line 112 of file DragAndDropCell.cs.

◆ operator DragAndDropCell()

static implicit DragAndDropCell.operator DragAndDropCell ( DragAndDropRawCell  v)
static

Definition at line 398 of file DragAndDropCell.cs.

◆ RemoveItem()

void DragAndDropCell.RemoveItem ( )

Manualy delete item from this cell

Definition at line 361 of file DragAndDropCell.cs.

◆ SwapItems()

void DragAndDropCell.SwapItems ( DragAndDropCell  firstCell,
DragAndDropCell  secondCell 
)

Swap items between two cells

Parameters
firstCellCell
secondCellCell

Definition at line 371 of file DragAndDropCell.cs.

◆ UpdateBackgroundState()

void DragAndDropCell.UpdateBackgroundState ( )

Change cell's sprite color on item put/remove.

Parameters
conditiontrue - filled, false - empty

Definition at line 310 of file DragAndDropCell.cs.

◆ UpdateMyItem()

void DragAndDropCell.UpdateMyItem ( )

Updates my item

Definition at line 325 of file DragAndDropCell.cs.

Member Data Documentation

◆ cellType

CellType DragAndDropCell.cellType = CellType.Swap

Definition at line 38 of file DragAndDropCell.cs.

◆ empty

Color DragAndDropCell.empty = new Color()

Definition at line 40 of file DragAndDropCell.cs.

◆ full

Color DragAndDropCell.full = new Color()

Definition at line 42 of file DragAndDropCell.cs.

◆ ignoreColor

bool DragAndDropCell.ignoreColor = false

Definition at line 46 of file DragAndDropCell.cs.

◆ unlimitedSource

bool DragAndDropCell.unlimitedSource = false

Definition at line 44 of file DragAndDropCell.cs.


The documentation for this class was generated from the following file: