cc-event v2.0.2
An event utility for class-component [experimental]
Usage
npm
npm install --save jquery class-component cc-event
common script
globaljQuery = ;;;
var $ = ; var Scene = $cc; $cc;
settings
Under the above settings, when you click the settings button it goes to settings.html
. When you click other part of .scene
, it alerts "hello".
Use with es6 class and decorator
var $ = ;var event = $ccevent; ccActor /** * Says hello. */ @event'click touchstart' { ; } /** * Goes to the settings screen. */ @event'click' '.setting-btn' { e; locationhref = 'settings.html'; } $cc;
settings
License
MIT