cat flips in move direction
This commit is contained in:
parent
865e931a43
commit
58ae21724b
1 changed files with 17 additions and 5 deletions
|
@ -45,28 +45,40 @@ data Pituicat = Pituicat
|
|||
|
||||
instance Drawable Pituicat where
|
||||
|
||||
toVertices (Pituicat (V2 x y) _ _ _ _ _ _ _ _ _) =
|
||||
toVertices (Pituicat (V2 x y) _ (V2 mx _) _ _ _ _ _ _ _) =
|
||||
( V.fromList [0, 1, 2, 2, 3, 0]
|
||||
, V.fromList
|
||||
[ newVertex
|
||||
(V3 (realToFrac x - 25) (realToFrac y - 25) 0)
|
||||
(V4 1 1 1 1)
|
||||
(V2 0 (1 - 50 / 1024))
|
||||
(if mx >= 0
|
||||
then V2 0 (1 - 50 / 1024)
|
||||
else V2 (50 / 1024) (1 - 50 / 1024)
|
||||
)
|
||||
1
|
||||
, newVertex
|
||||
(V3 (realToFrac x + 25) (realToFrac y - 25) 0)
|
||||
(V4 1 1 1 1)
|
||||
(V2 (50 / 1024) (1 - 50 / 1024))
|
||||
( if mx >= 0
|
||||
then V2 (50 / 1024) (1 - 50 / 1024)
|
||||
else V2 0 (1 - 50 / 1024)
|
||||
)
|
||||
1
|
||||
, newVertex
|
||||
(V3 (realToFrac x + 25) (realToFrac y + 25) 0)
|
||||
(V4 1 1 1 1)
|
||||
(V2 (50 / 1024) 1)
|
||||
(if mx >= 0
|
||||
then V2 (50 / 1024) 1
|
||||
else V2 0 1
|
||||
)
|
||||
1
|
||||
, newVertex
|
||||
(V3 (realToFrac x - 25) (realToFrac y + 25) 0)
|
||||
(V4 1 1 1 1)
|
||||
(V2 0 1)
|
||||
(if mx >= 0
|
||||
then V2 0 1
|
||||
else V2 (50 / 1024) 1
|
||||
)
|
||||
1
|
||||
]
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue