aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Sunet <jeannekamikaze@gmail.com>2012-08-29 18:15:35 +0200
committerMarc Sunet <jeannekamikaze@gmail.com>2012-08-29 18:15:35 +0200
commit3b6e46ae6bb91a8f6bb9b1917f627f6e7f181d9b (patch)
tree569e67b9947b5360ec6e7ffb423f1a35d45361c9
parent6458d34bcbf2efc0cc2b8dac8a1b70f31148f646 (diff)
Added setAnimationSpeed
-rw-r--r--Spear/Scene/GameObject.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Spear/Scene/GameObject.hs b/Spear/Scene/GameObject.hs
index 2efadf0..37374cc 100644
--- a/Spear/Scene/GameObject.hs
+++ b/Spear/Scene/GameObject.hs
@@ -2,10 +2,12 @@ module Spear.Scene.GameObject
2( 2(
3 GameObject 3 GameObject
4, GameStyle(..) 4, GameStyle(..)
5, AnimationSpeed
5 -- * Construction 6 -- * Construction
6, goNew 7, goNew
7 -- * Manipulation 8 -- * Manipulation
8, goUpdate 9, goUpdate
10, Spear.Scene.GameObject.setAnimationSpeed
9, goAABB 11, goAABB
10 -- * Rendering 12 -- * Rendering
11, goRender 13, goRender
@@ -190,6 +192,13 @@ goCollide gos go = foldl' collide' [] gos
190 collide' gos target = target:gos 192 collide' gos target = target:gos
191 193
192 194
195-- | Set the game object's animation speed.
196setAnimationSpeed :: AnimationSpeed -> GameObject -> GameObject
197setAnimationSpeed s go = case renderer go of
198 Left _ -> go
199 Right amr -> go { renderer = Right $ AM.setAnimationSpeed s amr }
200
201
193-- | Get the game object's bounding box. 202-- | Get the game object's bounding box.
194goAABB :: GameObject -> AABB 203goAABB :: GameObject -> AABB
195goAABB go = 204goAABB go =