Skip to content

Instantly share code, notes, and snippets.

@markusrt
Created September 25, 2012 20:09
Show Gist options
  • Select an option

  • Save markusrt/3784133 to your computer and use it in GitHub Desktop.

Select an option

Save markusrt/3784133 to your computer and use it in GitHub Desktop.

Revisions

  1. markusrt created this gist Sep 25, 2012.
    9 changes: 9 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    var collisionAbove = ((controller.collisionFlags & CollisionFlags.Above) != 0);

    if(collisionAbove)
    {
    if(movement.verticalSpeed>0)
    {
    movement.verticalSpeed = -1 * movement.verticalSpeed/-2.0;
    }
    }