var Circle = function() { Maga.Object.apply(this, arguments) var val = parseInt(this.id, 32), size size = parseInt(val.toString().substr(0, 2), 10) this.register({ // Values used to render (draw) object render: { x: 0 , y: 0 } // Input values that determine behavior , input: { tx: 0 , ty: 0 } // Values that change , dynamic: { vx: 0 , vy: 0 , ox: 0 , oy: 0 , width: size , height: size } // Values that don't change , static: { f: 0.95 } }) }
var Ninja = function() { Maga.Object.apply(this, arguments); var nimage, spriteSheet, walk, jump, frameTimer; this.register({ // Values used to render ninja render: { x: 100 , y: 100 , facing: 1 } // Input values , input: { direction: 0 , jumping: 0 } // Values that change , dynamic: { keys: 0 , created: false } , static: { speed: 4 , width: 31 , height: 80 , jumpheight: 16 } }); };