Mouse
Mouse service
Example:
let tile = { x: 10, y: 10, width: 32, height: 32 };
if (mouse.isOver(tile)) {
tile.backgroundColor = 'red';
}
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
|
|
public |
Check if mouse click and is over object |
|
public |
isClickOut(object: Object): boolean Check if mouse click and is out of object |
|
public |
Check if mouse is out of object |
|
public |
Check if mouse is over object |
Protected Methods | ||
protected |
hasCollision(object: Object): boolean Check if mouse coordinates has collisions with object |