compose tetris HUD scene
This commit is contained in:
parent
8b8ae416be
commit
c59c81a4ea
|
@ -1,12 +1,31 @@
|
|||
(scene
|
||||
(object root
|
||||
(object L
|
||||
(object (sprite blocks L (pos 0 0)))
|
||||
(object (sprite blocks L (pos 32 0)))
|
||||
(object (sprite blocks L (pos 64 0)))
|
||||
(object (sprite blocks L (pos 64 -32))))
|
||||
(object J
|
||||
(object (sprite blocks J (pos -96 32)))
|
||||
(object (sprite blocks J (pos -64 32)))
|
||||
(object (sprite blocks J (pos -32 32)))
|
||||
(object (sprite blocks J (pos -32 64))))))
|
||||
|
||||
(object playfield
|
||||
(transform (tx -160) (ty 320))
|
||||
(sprite hud grid)
|
||||
(sprite hud field)
|
||||
(object blocks
|
||||
(sprite blocks L (pos 0 0))
|
||||
(sprite blocks L (pos 32 0))
|
||||
(sprite blocks L (pos 64 0))
|
||||
(sprite blocks L (pos 64 -32))))
|
||||
|
||||
(object hold
|
||||
(transform (tx -272) (ty -272))
|
||||
(sprite hud hold))
|
||||
|
||||
(object next
|
||||
(transform (tx 272) (ty -272))
|
||||
(sprite hud next))
|
||||
|
||||
(object left_labels
|
||||
(transform (tx -172) (ty 320))
|
||||
(sprite hud pps (pos -12 -148))
|
||||
(sprite hud kpp (pos -12 -116))
|
||||
(sprite hud time (pos 0 -25))
|
||||
(sprite hud num (pos 0 -73)))
|
||||
|
||||
(object right_labels
|
||||
(transform (tx 272) (ty 320))
|
||||
(sprite hud lines_rem (pos 0 -20)))))
|
||||
|
|
|
@ -30,7 +30,7 @@ let main () =
|
|||
|
||||
let tf = TG.model (Scene.transform root) in
|
||||
begin
|
||||
let tx = 512.0 +. Float.sin (time *. 3.0) *. 100.0 in
|
||||
let tx = 512.0 +. Float.sin (time *. 3.0) *. 20.0 in
|
||||
let ty = 400.0 in
|
||||
let _ = time in
|
||||
Mat2A.set tf ~tx ~ty ~sx:1.0 ~sy:1.0
|
||||
|
|
Loading…
Reference in New Issue