Commit 220ad9ed authored by Taddeüs Kroes's avatar Taddeüs Kroes

Fix bug

parent 190cfd25
...@@ -74,12 +74,13 @@ transitions = ...@@ -74,12 +74,13 @@ transitions =
cruising_excited: warp cruising_excited: warp
excited_cruising: unwarp excited_cruising: unwarp
curstate = document.body.className
set_state = (newstate) -> set_state = (newstate) ->
oldstate = document.body.className if newstate != curstate
if oldstate != newstate console.log 'set state from', curstate, 'to', newstate
console.log 'set state from', oldstate, 'to', newstate transitions[curstate + '_' + newstate]?()
transitions[oldstate + '_' + newstate]?() curstate = newstate
#document.body.className = newstate
if debug if debug
document.addEventListener 'keypress', (e) -> document.addEventListener 'keypress', (e) ->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment