new Item(p_x, p_y)
Parameters:
| Name | Type | Description |
|---|---|---|
p_x |
int | The x position of the item. |
p_y |
int | The y position of the item. |
Members
-
image :String
-
The image (a mini canvas) of the item.
Type:
- String
-
size :String
-
The pixel size of an item. This value is equal for all items!
Type:
- String
-
x :Number
-
The x-position of the item.
Type:
- Number
-
y :Number
-
The y-position of the item.
Type:
- Number
Methods
-
<static> init(p_init)
-
Initializes the class
Itemand all its subclasses.Parameters:
Name Type Description p_initObject Should contain the attributes size(the size of every item; size == width == height) andsubclasses(an object; for every subclasses ofItemthere should be one attribute; the name of the attribute must be equal to the name of the subclass and the value should contain proper initialization values for the subclass).