Skip to content

cwqt/lssx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lssx

lssx is an attempt at creating a short yet re-playable experience that simulates the paranoia and anxiety from the Cold War by imposing upon the player an increasingly difficult challenge, to stay alive.

zephyr

A Box2D wrapper for lssx with entity management.

Physics.beginContact = (a, b, coll) ->
  -- a handles collision with b
  lssx.objects[a\getBody()\getUserData().hash]\beginContact(b)
  -- b handles collision with a
  lssx.objects[b\getBody()\getUserData().hash]\beginContact(a)

And then say, in object A:

beginContact: (other) =>
  collObj = lssx.objects[other\getBody()\getUserData().hash]
  switch collObj.__class
    when 'coin'
      collObj\Pickup()
      collObj\Destroy()
    when 'spikes'
      @Die()