Automatically migrated from Gitolite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

33 lines
690 B

$(->
manager = new ResourceManager("easing/assets")
engine = new Engine(manager)
window.debug_engine = engine
# Configure game assets
manager.addImages([
"images/cursor.png"
])
manager.prepare()
manager.preload(null, ->
engine.addCanvas($("#gamecanvas"));
scene = engine.createScene("main")
engine.createSprite("cursor", "images/cursor.png")
cursor = engine.createObject("cursor")
cursor.sprite = engine.getSprite("cursor")
cursor.onClickGlobal = (event) ->
@x = @engine.ease.quadInOut(@x, event.x - 41, 35)
@y = @engine.ease.quadInOut(@y, event.y - 41, 35)
cursor.onStep = ->
return true
scene.createInstance(cursor, 0, 0)
engine.start()
)
)