C# Class SunsetHigh.Pickup

Pickup extends from Sprite, adding information for an Item attribute
Inheritance: Sprite
Afficher le fichier Open project: ErraticUnicorn/MOSH Class Usage Examples

Méthodes publiques

Méthode Description
Pickup ( ) : System

Initializes a type-less Pickup at the origin which matches the dimensions of its sprite (when loaded)

Pickup ( int x, int y ) : System

Initializes a type-less Pickup at the given position which matches the dimensions of its sprite (when loaded)

Pickup ( int x, int y, System.Item type ) : System

Initializes a Pickup with a given Item type at the given position which matches the dimensions of its sprite (when loaded)

Pickup ( int x, int y, int width, int height ) : System

Initializes a type-less Pickup with the given position and dimensions

Pickup ( int x, int y, int width, int height, System.Item type ) : System

Initializes a Pickup with the given position, dimensions, and Item type

banish ( ) : void

Once the Pickup has been claimed, this method removes it from the screen

getItemType ( ) : System.Item
onCollide ( IInteractable other ) : void

We assume whenever the Hero collides with a pickup he picks it up.

setItemType ( System.Item type ) : void

Method Details

Pickup() public méthode

Initializes a type-less Pickup at the origin which matches the dimensions of its sprite (when loaded)
public Pickup ( ) : System
Résultat System

Pickup() public méthode

Initializes a type-less Pickup at the given position which matches the dimensions of its sprite (when loaded)
public Pickup ( int x, int y ) : System
x int X coordinate of the top-left corner
y int Y coordinate of the top-left corner
Résultat System

Pickup() public méthode

Initializes a Pickup with a given Item type at the given position which matches the dimensions of its sprite (when loaded)
public Pickup ( int x, int y, System.Item type ) : System
x int X coordinate of the top-left corner
y int Y coordinate of the top-left corner
type System.Item Item type of this Pickup
Résultat System

Pickup() public méthode

Initializes a type-less Pickup with the given position and dimensions
public Pickup ( int x, int y, int width, int height ) : System
x int X coordinate of the top-left corner
y int Y coordinate of the top-left corner
width int Width in pixels
height int Height in pixels
Résultat System

Pickup() public méthode

Initializes a Pickup with the given position, dimensions, and Item type
public Pickup ( int x, int y, int width, int height, System.Item type ) : System
x int X coordinate of the top-left corner
y int Y coordinate of the top-left corner
width int Width in pixels
height int Height in pixels
type System.Item Item type of this Pickup
Résultat System

banish() public méthode

Once the Pickup has been claimed, this method removes it from the screen
public banish ( ) : void
Résultat void

getItemType() public méthode

public getItemType ( ) : System.Item
Résultat System.Item

onCollide() public méthode

We assume whenever the Hero collides with a pickup he picks it up.
public onCollide ( IInteractable other ) : void
other IInteractable
Résultat void

setItemType() public méthode

public setItemType ( System.Item type ) : void
type System.Item
Résultat void