Class CP_Item
Defined in: Item.js.
Constructor Attributes | Constructor Name and Description |
---|---|
CP_Item(w, h, x, y)
Abstract game item
|
Method Attributes | Method Name and Description |
---|---|
clear(ctx)
Clear the item
|
|
ox(value)
Get/Set the origo x coordinate
|
|
oy(value)
Get/Set the origo y coordinate
|
|
paint(ctx)
Abstract draw function
|
|
run()
Abstract animation thread
|
|
set(w, h, x, y)
Set dimensions and coordinates
|
Class Detail
CP_Item(w, h, x, y)
Abstract game item
- Parameters:
- {Number} w
- {Number} h
- {Number} x
- {Number} y
Method Detail
clear(ctx)
Clear the item
- Parameters:
- ctx
{Number}
ox(value)
Get/Set the origo x coordinate
- Parameters:
- {Number} value
- Returns:
- {Number}
{Number}
oy(value)
Get/Set the origo y coordinate
- Parameters:
- {Number} value
- Returns:
- {Number}
paint(ctx)
Abstract draw function
- Parameters:
- ctx
run()
Abstract animation thread
set(w, h, x, y)
Set dimensions and coordinates
- Parameters:
- {Number} w
- {Number} h
- {Number} x
- {Number} y