onHoverUpdate(tag: Tag, action: (a: GameObj)=>void): KEventController
Register an event that runs every frame when game objs with certain tags are hovered (required to have area() component).
param
tag- The tag to listen for.
param
action- The function to run when the event is triggered.
// Rotate bean 90 degrees per second when hovered onHoverUpdate("bean", (bean) => { bean.angle += dt() * 90 });
returns
The event controller.
since
v3000.0