Skip to content

Instantly share code, notes, and snippets.

View NoelFB's full-sized avatar

Noel Berry NoelFB

View GitHub Profile
// render light circles
for (i = 0; i < lights.length; i ++)
{
l = lights[i];
var isSet:Object = new Object();
for (j = 0; j < l.distance * 2; j++)
{
isSet[j] = new Object();
@NoelFB
NoelFB / gist:900007
Created April 2, 2011 23:28
Movement Code
// move
lastPosition = position;
position += velocity * Monocle::deltaTime;
CollisionData col;
if(Collide("Solid", &col))
{
// move to last position
// 64 is the radius of the player collider
position.y = col.hitPoint.y + (col.normal.y * 64);