Method | 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 |
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 |
return | System |
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 |
return | System |
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 |
return | System |
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 |
return | System |
public onCollide ( IInteractable other ) : void | ||
other | IInteractable | |
return | void |
public setItemType ( System.Item type ) : void | ||
type | System.Item | |
return | void |