C# Class MenuButton, PuzzleGameProject

Inheritance: MonoBehaviour
Afficher le fichier Open project: Cedric-Paris/PuzzleGameProject Class Usage Examples

Méthodes publiques

Свойство Type Description
ElementCount int
OffSprite Sprite
OnSprite Sprite

Méthodes publiques

Méthode Description
DownElementCount ( ) : void

Sets the element count to elementCount - 1.

OnTriggerEnter2D ( Collider2D other ) : void

Called when this Object's Collider encounters another.

Start ( ) : void

Initializes the MenuButton.

UpElementCount ( ) : void

Sets the element count to elementCount + 1.

Méthodes protégées

Méthode Description
GetTextName ( ) : string

Informs which Text is associated with this MenuButton.

GetUIElementToSpawn ( ) : UIDraggableElement,

Informs which UIDraggableElement this MenuButton has to spawn.

IsRightMovementAction ( DraggableElement, draggableElement ) : bool

Informs whether the given Element is the DraggableElement bound the this MenuButton.

Private Methods

Méthode Description
SetElementCountToText ( ) : void

Sets the element count to the associated Text.

SetOffSprite ( ) : void

Sets the appearance of the MenuButton to OFF.

SetOnSprite ( ) : void

Sets the appearance of the MenuButton to ON.

SpawnUIDraggableElement ( ) : void

Spawns the UIDraggableElement associated with this MenuButton on top of this MenuButton.

Method Details

DownElementCount() public méthode

Sets the element count to elementCount - 1.
public DownElementCount ( ) : void
Résultat void

GetTextName() protected abstract méthode

Informs which Text is associated with this MenuButton.
protected abstract GetTextName ( ) : string
Résultat string

GetUIElementToSpawn() protected abstract méthode

Informs which UIDraggableElement this MenuButton has to spawn.
protected abstract GetUIElementToSpawn ( ) : UIDraggableElement,
Résultat UIDraggableElement,

IsRightMovementAction() protected abstract méthode

Informs whether the given Element is the DraggableElement bound the this MenuButton.
protected abstract IsRightMovementAction ( DraggableElement, draggableElement ) : bool
draggableElement DraggableElement, The Element to test.
Résultat bool

OnTriggerEnter2D() public méthode

Called when this Object's Collider encounters another.
public OnTriggerEnter2D ( Collider2D other ) : void
other UnityEngine.Collider2D The that collided with the MenuButton.
Résultat void

Start() public méthode

Initializes the MenuButton.
public Start ( ) : void
Résultat void

UpElementCount() public méthode

Sets the element count to elementCount + 1.
public UpElementCount ( ) : void
Résultat void

Property Details

ElementCount public_oe property

The actual element count.
public int ElementCount
Résultat int

OffSprite public_oe property

The Sprite to show when the element count is equal to 0.
public Sprite OffSprite
Résultat Sprite

OnSprite public_oe property

The Sprite to show when the element count is greater than 0.
public Sprite OnSprite
Résultat Sprite