diff options
| -rw-r--r-- | Spear.lkshw | 4 | ||||
| -rw-r--r-- | Spear/Scene/GameObject.hs | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Spear.lkshw b/Spear.lkshw index f062526..2bfefbb 100644 --- a/Spear.lkshw +++ b/Spear.lkshw | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | Version of workspace file format: | 1 | Version of workspace file format: |
| 2 | 1 | 2 | 1 |
| 3 | Time of storage: | 3 | Time of storage: |
| 4 | "Thu Aug 30 20:57:58 CEST 2012" | 4 | "Thu Aug 30 22:00:11 CEST 2012" |
| 5 | Name of the workspace: | 5 | Name of the workspace: |
| 6 | "Spear" | 6 | "Spear" |
| 7 | File paths of contained packages: | 7 | File paths of contained packages: |
| 8 | ["demos/simple-scene/simple-scene.cabal","Spear.cabal"] | 8 | ["demos/simple-scene/simple-scene.cabal","Spear.cabal"] |
| 9 | Maybe file path of an active package: | 9 | Maybe file path of an active package: |
| 10 | Just "Spear.cabal" \ No newline at end of file | 10 | Just "demos/simple-scene/simple-scene.cabal" \ No newline at end of file |
diff --git a/Spear/Scene/GameObject.hs b/Spear/Scene/GameObject.hs index 9886f35..62bb27e 100644 --- a/Spear/Scene/GameObject.hs +++ b/Spear/Scene/GameObject.hs | |||
| @@ -10,6 +10,7 @@ module Spear.Scene.GameObject | |||
| 10 | , currentAnimation | 10 | , currentAnimation |
| 11 | , numCollisioners | 11 | , numCollisioners |
| 12 | , goAABB | 12 | , goAABB |
| 13 | , goAABBs | ||
| 13 | -- * Manipulation | 14 | -- * Manipulation |
| 14 | , goUpdate | 15 | , goUpdate |
| 15 | , setAnimation | 16 | , setAnimation |
| @@ -178,6 +179,11 @@ goAABB' col = case col of | |||
| 178 | (CircleCol circle) -> aabbFromCircle circle | 179 | (CircleCol circle) -> aabbFromCircle circle |
| 179 | 180 | ||
| 180 | 181 | ||
| 182 | -- | Get the game object's bounding boxes. | ||
| 183 | goAABBs :: GameObject -> [AABB] | ||
| 184 | goAABBs = fmap goAABB' . collisioners | ||
| 185 | |||
| 186 | |||
| 181 | -- | Render the game object. | 187 | -- | Render the game object. |
| 182 | goRender :: StaticProgram -> AnimatedProgram -> Cam.Camera -> GameObject -> IO () | 188 | goRender :: StaticProgram -> AnimatedProgram -> Cam.Camera -> GameObject -> IO () |
| 183 | goRender sprog aprog cam go = | 189 | goRender sprog aprog cam go = |
