Familiar territory. Sprite_Clickable keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.
Quick Reference
Setup & Creation 1
| initialize() | Sets up a new instance. |
Checks (True / False) 3
| isPressed() | Whether it is pressed. |
| isClickEnabled() | Whether it is click enabled. |
| isBeingTouched() | Whether it is being touched. |
Events, Commands & Input 5
| processTouch() | Handles the touch. |
| onMouseEnter() | Called when mouse enter happens. |
| onMouseExit() | Called when mouse exit happens. |
| onPress() | Called when press happens. |
| onClick() | Called when click happens. |
Updating & Drawing 1
| update() | Update. |
Other 1
| hitTest() | Hit test. |
Setup & Creation
initialize
method sourceSprite_Clickable.prototype.initialize()
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
Checks (True / False)
isPressed
method sourceSprite_Clickable.prototype.isPressed()
Whether it is pressed. (Same as the RPG Maker MZ method of this name.)
isClickEnabled
method sourceSprite_Clickable.prototype.isClickEnabled()
Whether it is click enabled. (Same as the RPG Maker MZ method of this name.)
isBeingTouched
method sourceSprite_Clickable.prototype.isBeingTouched()
Whether it is being touched. (Same as the RPG Maker MZ method of this name.)
Events, Commands & Input
processTouch
method sourceSprite_Clickable.prototype.processTouch()
Handles the touch. (Same as the RPG Maker MZ method of this name.)
onMouseEnter
method sourceSprite_Clickable.prototype.onMouseEnter()
Called when mouse enter happens. (Same as the RPG Maker MZ method of this name.)
onMouseExit
method sourceSprite_Clickable.prototype.onMouseExit()
Called when mouse exit happens. (Same as the RPG Maker MZ method of this name.)
onPress
method sourceSprite_Clickable.prototype.onPress()
Called when press happens. (Same as the RPG Maker MZ method of this name.)
onClick
method sourceSprite_Clickable.prototype.onClick()
Called when click happens. (Same as the RPG Maker MZ method of this name.)
Updating & Drawing
update
method sourceSprite_Clickable.prototype.update()
Update. (Same as the RPG Maker MZ method of this name.)
Other
hitTest
method sourceSprite_Clickable.prototype.hitTest(x, y)
Hit test. (Same as the RPG Maker MZ method of this name.)