Support rotation of simple-sprites

This commit is contained in:
Tony Garnock-Jones 2016-09-02 17:54:41 +01:00
parent 74b768044f
commit 7d52e24a35
1 changed files with 2 additions and 0 deletions

View File

@ -96,9 +96,11 @@
(<= 0 y 1)))
(define (simple-sprite z x y w h i
#:rotation [rotation 0]
#:touchable-id [touchable-id #f]
#:touchable-predicate [touchable-predicate in-unit-square?])
(make-sprite z `((translate ,x ,y)
,@(if (zero? rotation) `() `((rotate ,rotation)))
(scale ,w ,h)
,@(if touchable-id
`((touchable ,touchable-id ,touchable-predicate))