1 ! Copyright (C) 2007 Alex Chapman
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel opengl arrays sequences jamshred.log jamshred.player jamshred.tunnel math.vectors ;
6 TUPLE: jamshred tunnel players running quit ;
8 : <jamshred> ( -- jamshred )
9 <random-tunnel> "Player 1" <player> 2dup swap play-in-tunnel 1array f f
12 : jamshred-player ( jamshred -- player )
13 ! TODO: support more than one player
16 : jamshred-update ( jamshred -- )
18 jamshred-player update-player
21 : toggle-running ( jamshred -- )
25 [ jamshred-player moved ]
26 [ t >>running drop ] bi
29 : mouse-moved ( x-radians y-radians jamshred -- )
30 jamshred-player -rot turn-player ;