I hereby claim:
- I am caubry on github.
- I am lilydrop (https://keybase.io/lilydrop) on keybase.
- I have a public key ASBGJR5OhBO6BM2EUYxSIqXwDa22wigpUdnaxjNECK5RHgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| requestId: 0, | |
| move: function() { | |
| var _this = this; | |
| if (this.requestId === 0) { | |
| (function animationLoop() { | |
| _this.render(); | |
| _this.requestId = requestAnimationFrame(animationLoop, _this.move); | |
| })(); |
| requestId: 0, | |
| settimeoutID: 0, | |
| move: function(keyCode) { | |
| var _this = this; | |
| // Frame per seconds | |
| var fps = 15; | |
| if (this.requestId === 0) { | |
| (function animationLoop() { |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| jshint: { | |
| files: ['js/*'], | |
| options: { | |
| // options here to override JSHint defaults | |
| globals: { | |
| jQuery: true, | |
| console: true, |
| var gCachedAssets = {}; | |
| function loadAssets(assetList, callbackFcn) { | |
| var loadBatch = { | |
| count: 0, | |
| total: assetList.length, | |
| cb: callbackFcn | |
| }; | |
| for(var i = 0; i < assetList.length; i++) { |
| Vec2 = Box2D.Common.Math.b2Vec2; | |
| BodyDef = Box2D.Dynamics.b2BodyDef; | |
| Body = Box2D.Dynamics.b2Body; | |
| FixtureDef = Box2D.Dynamics.b2FixtureDef; | |
| Fixture = Box2D.Dynamics.b2Fixture; | |
| World = Box2D.Dynamics.b2World; | |
| MassData = Box2D.Collision.Shapes.b2MassData; | |
| PolygonShape = Box2D.Collision.Shapes.b2PolygonShape; | |
| CircleShape = Box2D.Collision.Shapes.b2CircleShape; | |
| DebugDraw = Box2D.Dynamics.b2DebugDraw; |
| Vec2 = Box2D.Common.Math.b2Vec2; | |
| BodyDef = Box2D.Dynamics.b2BodyDef; | |
| Body = Box2D.Dynamics.b2Body; | |
| FixtureDef = Box2D.Dynamics.b2FixtureDef; | |
| Fixture = Box2D.Dynamics.b2Fixture; | |
| World = Box2D.Dynamics.b2World; | |
| MassData = Box2D.Collision.Shapes.b2MassData; | |
| PolygonShape = Box2D.Collision.Shapes.b2PolygonShape; | |
| CircleShape = Box2D.Collision.Shapes.b2CircleShape; | |
| DebugDraw = Box2D.Dynamics.b2DebugDraw; |
| intersectRect: function (r1, r2) { | |
| return !(r2.left > r1.right || | |
| r2.right < r1.left || | |
| r2.top > r1.bottom || | |
| r2.bottom < r1.top); | |
| } |
| GameEngineClass = Class.extend({ | |
| move_dir: new Vec2(0,0), | |
| dirVec: new Vec2(0,0), | |
| gPlayer0: { | |
| pos: { | |
| x: 100, | |
| y: 100 | |
| }, |