new Base(x, y)
Base class for all other components.
Parameters:
Name | Type | Description |
---|---|---|
x | number | x position |
y | number | y position |
Methods
addToScene(scene) → {object}
Add an object as actor to scene.
Parameters:
Name | Type | Description |
---|---|---|
scene | Scene | scene on canvas |
Returns:
this
- Type:
- object
createUUID() → {string}
Generates an UUID, used to identify every object in the scene.
https://www.w3resource.com/javascript-exercises/fundamental/javascript-fundamental-exercise-253.php
https://www.w3resource.com/javascript-exercises/fundamental/javascript-fundamental-exercise-253.php
Returns:
- uuid
- Type:
- string