From 894d156b25103b0ada31e498a610e0b7c90890f3 Mon Sep 17 00:00:00 2001 From: Marc Sunet Date: Wed, 29 Aug 2012 17:02:17 +0200 Subject: Changed game object field name to type --- Spear.lkshw | 2 +- Spear/Scene/Loader.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Spear.lkshw b/Spear.lkshw index 71b74e9..743f9cc 100644 --- a/Spear.lkshw +++ b/Spear.lkshw @@ -1,7 +1,7 @@ Version of workspace file format: 1 Time of storage: - "Wed Aug 29 15:15:15 CEST 2012" + "Wed Aug 29 16:58:18 CEST 2012" Name of the workspace: "Spear" File paths of contained packages: diff --git a/Spear/Scene/Loader.hs b/Spear/Scene/Loader.hs index 7066a5c..6197d12 100644 --- a/Spear/Scene/Loader.hs +++ b/Spear/Scene/Loader.hs @@ -348,7 +348,7 @@ newObject newGO sceneRes (SceneLeaf nid props) = [newObject' newGO sceneRes nid newObject' :: Monad m => CreateGameObject m a -> SceneResources -> String -> [Property] -> m a newObject' newGO sceneRes nid props = do -- Optional properties. - let name = (asString $ value "name" props) `unspecified` "unknown" + let goType = (asString $ value "type" props) `unspecified` "unknown" position = (asVec3 $ value "position" props) `unspecified` vec3 0 0 0 rotation = (asVec3 $ value "rotation" props) `unspecified` vec3 0 0 0 right' = (asVec3 $ value "right" props) `unspecified` vec3 1 0 0 @@ -359,7 +359,7 @@ newObject' newGO sceneRes nid props = do -- Compute the object's vectors if a forward vector has been specified. let (right, up, forward) = vectors forward' - newGO name sceneRes props (M4.transform right up forward position) + newGO goType sceneRes props (M4.transform right up forward position) vectors :: Maybe Vector3 -> (Vector3, Vector3, Vector3) -- cgit v1.2.3