GameControl Class
Generic game control class which creates onClick event. This class extends all buttons used in games.
Example:
class Button : GameControl
{
....
}
Methods
click
() protected
Method is called when the user clicks on the object.
init
() protected
Init Game control instance. This method should be used as a class constructor in extended classes. However, it is important to call parent's init method (by super.init()) to ensure correct object initialization.
pointerDragged
(
protected
x
y
Method is called when pointer moves on the screen.
pointerPressed
(
protected
x
y
Method is called when pointer was pressed.
Events
onClick
The onClick event occurs when the user clicks on the object.