Browse Source

Updating Roboman3D

Josh Engebretson 10 years ago
parent
commit
e90729c0bf
47 changed files with 473 additions and 157 deletions
  1. 1 0
      CharacterAnimation3D/.gitignore
  2. 5 0
      CharacterAnimation3D/Resources.asset
  3. 5 0
      CharacterAnimation3D/Resources/Components.asset
  4. 21 41
      CharacterAnimation3D/Resources/Components/Roboman.js
  5. 7 0
      CharacterAnimation3D/Resources/Components/Roboman.js.asset
  6. 28 48
      CharacterAnimation3D/Resources/Components/UI.js
  7. 7 0
      CharacterAnimation3D/Resources/Components/UI.js.asset
  8. 0 6
      CharacterAnimation3D/Resources/Materials/BlueGrid.xml
  9. 0 5
      CharacterAnimation3D/Resources/Materials/Robot_01_Diffuse.xml
  10. 5 0
      CharacterAnimation3D/Resources/Models.asset
  11. BIN
      CharacterAnimation3D/Resources/Models/Ground.fbx
  12. 9 0
      CharacterAnimation3D/Resources/Models/Ground.fbx.asset
  13. 5 0
      CharacterAnimation3D/Resources/Models/Materials.asset
  14. 7 0
      CharacterAnimation3D/Resources/Models/Materials/DefaultMaterial.material
  15. 5 0
      CharacterAnimation3D/Resources/Models/Materials/DefaultMaterial.material.asset
  16. 15 0
      CharacterAnimation3D/Resources/Models/Materials/Robot_01_mat.material
  17. 5 0
      CharacterAnimation3D/Resources/Models/Materials/Robot_01_mat.material.asset
  18. BIN
      CharacterAnimation3D/Resources/Models/Plane.mdl
  19. BIN
      CharacterAnimation3D/Resources/Models/RoboMan.mdl
  20. BIN
      CharacterAnimation3D/Resources/Models/RoboMan_Attack_Idle.ani
  21. BIN
      CharacterAnimation3D/Resources/Models/RoboMan_Attack_JumpFall.ani
  22. BIN
      CharacterAnimation3D/Resources/Models/RoboMan_Attack_Run.ani
  23. BIN
      CharacterAnimation3D/Resources/Models/RoboMan_Crouch_Idle.ani
  24. BIN
      CharacterAnimation3D/Resources/Models/RoboMan_Crouch_Walk.ani
  25. BIN
      CharacterAnimation3D/Resources/Models/RoboMan_Normal_Idle.ani
  26. BIN
      CharacterAnimation3D/Resources/Models/RoboMan_Normal_JumpFall.ani
  27. BIN
      CharacterAnimation3D/Resources/Models/RoboMan_Normal_Run.ani
  28. BIN
      CharacterAnimation3D/Resources/Models/RoboMan_Normal_Walk.ani
  29. BIN
      CharacterAnimation3D/Resources/Models/Robo_01.fbx
  30. 30 0
      CharacterAnimation3D/Resources/Models/Robo_01.fbx.asset
  31. 5 0
      CharacterAnimation3D/Resources/Scenes.asset
  32. 253 0
      CharacterAnimation3D/Resources/Scenes/Scene.scene
  33. 5 0
      CharacterAnimation3D/Resources/Scenes/Scene.scene.asset
  34. 5 0
      CharacterAnimation3D/Resources/Scripts.asset
  35. 4 57
      CharacterAnimation3D/Resources/Scripts/main.js
  36. 7 0
      CharacterAnimation3D/Resources/Scripts/main.js.asset
  37. 5 0
      CharacterAnimation3D/Resources/Skin.asset
  38. 14 0
      CharacterAnimation3D/Resources/Skin/skin.ui.txt
  39. BIN
      CharacterAnimation3D/Resources/Skin/spaceship.png
  40. 5 0
      CharacterAnimation3D/Resources/Skin/spaceship.png.asset
  41. BIN
      CharacterAnimation3D/Resources/Skin/window.png
  42. 5 0
      CharacterAnimation3D/Resources/Skin/window.png.asset
  43. 5 0
      CharacterAnimation3D/Resources/Textures.asset
  44. BIN
      CharacterAnimation3D/Resources/Textures/AtomicRobot_01_Diffuse.png
  45. 5 0
      CharacterAnimation3D/Resources/Textures/AtomicRobot_01_Diffuse.png.asset
  46. BIN
      CharacterAnimation3D/Resources/Textures/BlueGrid.png
  47. BIN
      CharacterAnimation3D/Resources/Textures/Robot_01_Diffuse.png

+ 1 - 0
CharacterAnimation3D/.gitignore

@@ -0,0 +1 @@
+Cache/*

+ 5 - 0
CharacterAnimation3D/Resources.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "6d3de511a0c3bdf31691cf19fa939359",
+	"FolderImporter": {}
+}

+ 5 - 0
CharacterAnimation3D/Resources/Components.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "a726518c8ec1f8b3519d5769de23cc83",
+	"FolderImporter": {}
+}

+ 21 - 41
CharacterAnimation3D/Resources/Components/Roboman.js

@@ -1,54 +1,34 @@
+'atomic component';
 
-var game = Atomic.game;
-var node = self.node;
+exports.component = function(self) {
 
-RoboMan = self;
+    var node = self.node;
 
-self.animCtrl = node.createComponent("AnimationController");
+    var animationController = node.getComponent("AnimationController");
 
-var idle = true;
+    animationController.playExclusive("Idle", 0, true);
 
-self.playAnimation = function(animation) {
+    self.subscribeToEvent("PlayRun", function() {
+        animationController.playExclusive("Run", 0, true);
+    });
 
-    self.animCtrl.playExclusive("Models/" + animation, 0, true, 0.1);
-}
+    self.subscribeToEvent("PlayIdle", function() {
+        animationController.playExclusive("Idle", 0, true);
+    });
 
-function start() {
+    self.subscribeToEvent("PlayAttack", function() {
+        animationController.playExclusive("Attack", 0, true);
+    });
 
-    var cache = game.cache;
+    self.subscribeToEvent("PlayWalk", function() {
+        animationController.playExclusive("Walk", 0, true);
+    });
 
-    var model = node.createComponent("AnimatedModel");
-    model.setModel(cache.getResource("Model", "Models/RoboMan.mdl"));
-    model.setMaterial(cache.getResource("Material", "Materials/Robot_01_Diffuse.xml"));
 
-    model.castShadows = true;
-    
-    self.animCtrl.playExclusive("Models/RoboMan_Normal_Walk.ani", 0, true, 0.0);
-
-    game.cameraNode.position = [0, 6.0, -12];
-    game.cameraNode.pitch(0);
+    self.update = function(timeStep) {
         
-    // Grid Plane
-    planeNode = game.scene.createChild("Plane");
-    planeNode.scale = [100.0, 1.0, 100.0];
-    
-    var planeObject = planeNode.createComponent("StaticModel");    
-    var planeModel = game.cache.getResource("Model", "Models/Plane.mdl");
-    var gridMaterial = game.cache.getResource("Material", "Materials/BlueGrid.xml");
-
-    planeObject.model = planeModel;
-    planeObject.material = gridMaterial;
-    
-    
-    node.yaw(120);
-    
-}
-
-// we need an update or it doesn't run the start, fix in JSVM
-function update(timeStep) {
-
-    node.yaw(timeStep * 50);
-    planeNode.yaw(timeStep * 50);
-    
+        node.yaw(timeStep * 10);
+
+    }
 
 }

+ 7 - 0
CharacterAnimation3D/Resources/Components/Roboman.js.asset

@@ -0,0 +1,7 @@
+{
+	"version": 1,
+	"guid": "d134932896d9ad4de4cc1d1a80d98b93",
+	"JavascriptImporter": {
+		"IsComponentFile": true
+	}
+}

+ 28 - 48
CharacterAnimation3D/Resources/Components/UI.js

@@ -1,67 +1,47 @@
-// Atomic Component
+'atomic component';
 
-var game = Atomic.game;
-var node = self.node;
+var fd = new Atomic.UIFontDescription();
+fd.id = "Vera";
+fd.size = 22;
 
-var ui = game.ui;
-var root = ui.getRoot();
+function createButton(self, text, event, layout) {
 
-var font = game.cache.getResource("Font", "Fonts/Anonymous Pro.ttf");
+    var button = new Atomic.UIButton();
+    button.text = text;
+    button.fontDescription = fd;
 
-var uiStyle = game.cache.getResource("XMLFile", "UI/DefaultStyle.xml");
-root.defaultStyle = uiStyle;
+    button.gravity = Atomic.UI_GRAVITY_RIGHT;
 
-var container = new Atomic.UIElement();
-container.horizontalAlignment = Atomic.HA_RIGHT;
-container.verticalAlignment = Atomic.VA_CENTER;
-container.layoutMode = Atomic.LM_VERTICAL;
+    button.onClick = function() {
 
-root.addChild(container);
+        self.sendEvent(event);
 
-var buttons = {};
+    }
 
-function addButton(name, text, callback) {
+    layout.addChild(button);
 
-    var button = new Atomic.Button();
-    
-    button.setName(name);
-    button.setMinWidth(120);
-    button.setMinHeight(24);
-
-    var buttonText = new Atomic.Text();
-    buttonText.text = text;
-    buttonText.setFont(font, 12);
-    buttonText.color = [0, 1, 0, 1];
-
-    buttonText.horizontalAlignment = Atomic.HA_CENTER;
-    buttonText.verticalAlignment = Atomic.VA_CENTER;
-    button.addChild(buttonText); 
-    container.addChild(button);
-    button.setStyleAuto();   
-    
-    buttons[name] = callback;       
-   
 }
 
-addButton("PlayIdle", "Idle", function() { TheRoboman.playAnimation("RoboMan_Normal_Idle.ani"); }); 
-addButton("PlayRun", "Run", function() { TheRoboman.playAnimation("RoboMan_Normal_Run.ani"); }); 
-addButton("PlayWalk", "Walk", function() { TheRoboman.playAnimation("RoboMan_Normal_Walk.ani"); }); 
-addButton("PlayAttack", "Attack", function() { TheRoboman.playAnimation("RoboMan_Attack_Idle.ani"); });
+exports.component = function(self) {
 
-self.onMouseClick = function(element) {
+    // TODO: fixme
+    Atomic.UI.__init();
 
-    var name = element.name;
-    
-    buttons[name]();
-    
-}
+    // root view
+    self.uiView = new Atomic.UIView();
 
-function start() {
+    var layout = new Atomic.UILayout();
+    layout.rect = self.uiView.rect;
 
-    self.listenToEvent(null, "UIMouseClick", self.onMouseClick );
-}
+    layout.axis = Atomic.UI_AXIS_Y;
+
+    layout.layoutPosition = Atomic.UI_LAYOUT_POSITION_GRAVITY;
 
-function update(timeStep) {
+    self.uiView.addChild(layout);
 
+    createButton(self, "Play Idle", "PlayIdle", layout);
+    createButton(self, "Play Walk", "PlayWalk", layout);
+    createButton(self, "Play Run", "PlayRun", layout);
+    createButton(self, "Play Attack", "PlayAttack", layout);
 
 }

+ 7 - 0
CharacterAnimation3D/Resources/Components/UI.js.asset

@@ -0,0 +1,7 @@
+{
+	"version": 1,
+	"guid": "45a40d1f850fb2de0203db7b7cd52829",
+	"JavascriptImporter": {
+		"IsComponentFile": true
+	}
+}

+ 0 - 6
CharacterAnimation3D/Resources/Materials/BlueGrid.xml

@@ -1,6 +0,0 @@
-<material>
-    <technique name="Techniques/Diff.xml" quality="0" />
-    <texture unit="diffuse" name="Textures/BlueGrid.png" />
-    <parameter name="UOffset" value="32 0 0 0" />
-    <parameter name="VOffset" value="0 32 0 0" />
-</material>

+ 0 - 5
CharacterAnimation3D/Resources/Materials/Robot_01_Diffuse.xml

@@ -1,5 +0,0 @@
-<material>
-    <technique name="Techniques/Diff.xml" />
-    <texture unit="diffuse" name="Textures/Robot_01_Diffuse.png" />
-    <parameter name="MatSpecColor" value="0.1 0.1 0.1 16" />
-</material>

+ 5 - 0
CharacterAnimation3D/Resources/Models.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "7cc3b7719207752f6634394a7f9cadcb",
+	"FolderImporter": {}
+}

BIN
CharacterAnimation3D/Resources/Models/Ground.fbx


+ 9 - 0
CharacterAnimation3D/Resources/Models/Ground.fbx.asset

@@ -0,0 +1,9 @@
+{
+	"version": 1,
+	"guid": "4e229a2d0357613c607cce2e41be63ab",
+	"ModelImporter": {
+		"scale": 1,
+		"importAnimations": false,
+		"animInfo": []
+	}
+}

+ 5 - 0
CharacterAnimation3D/Resources/Models/Materials.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "2beb34d9f005b55bafac60c0fb8aeca0",
+	"FolderImporter": {}
+}

+ 7 - 0
CharacterAnimation3D/Resources/Models/Materials/DefaultMaterial.material

@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<material>
+	<technique name="Techniques/NoTexture.xml" />
+	<parameter name="MatDiffColor" value="0.8 0.8 0.8 1" />
+	<parameter name="MatSpecColor" value="1 1 1 1" />
+	<parameter name="MatEmissiveColor" value="0 0 0 1" />
+</material>

+ 5 - 0
CharacterAnimation3D/Resources/Models/Materials/DefaultMaterial.material.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "c5e719947ac95ad610bfca9f57d179fe",
+	"MaterialImporter": {}
+}

+ 15 - 0
CharacterAnimation3D/Resources/Models/Materials/Robot_01_mat.material

@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<material>
+	<technique name="Techniques/Diff.xml" quality="0" loddistance="0" />
+	<texture unit="diffuse" name="Textures/AtomicRobot_01_Diffuse.png" />
+	<parameter name="UOffset" value="1 0 0 0" />
+	<parameter name="VOffset" value="0 1 0 0" />
+	<parameter name="MatDiffColor" value="0.8 0.8 0.8 1" />
+	<parameter name="MatEmissiveColor" value="0 0 0 1" />
+	<parameter name="MatEnvMapColor" value="1 1 1" />
+	<parameter name="MatSpecColor" value="0.5 0.5 0.5 16" />
+	<cull value="ccw" />
+	<shadowcull value="ccw" />
+	<fill value="solid" />
+	<depthbias constant="0" slopescaled="0" />
+</material>

+ 5 - 0
CharacterAnimation3D/Resources/Models/Materials/Robot_01_mat.material.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "91af1a83d8bf74b05da6dc1a302fbdea",
+	"MaterialImporter": {}
+}

BIN
CharacterAnimation3D/Resources/Models/Plane.mdl


BIN
CharacterAnimation3D/Resources/Models/RoboMan.mdl


BIN
CharacterAnimation3D/Resources/Models/RoboMan_Attack_Idle.ani


BIN
CharacterAnimation3D/Resources/Models/RoboMan_Attack_JumpFall.ani


BIN
CharacterAnimation3D/Resources/Models/RoboMan_Attack_Run.ani


BIN
CharacterAnimation3D/Resources/Models/RoboMan_Crouch_Idle.ani


BIN
CharacterAnimation3D/Resources/Models/RoboMan_Crouch_Walk.ani


BIN
CharacterAnimation3D/Resources/Models/RoboMan_Normal_Idle.ani


BIN
CharacterAnimation3D/Resources/Models/RoboMan_Normal_JumpFall.ani


BIN
CharacterAnimation3D/Resources/Models/RoboMan_Normal_Run.ani


BIN
CharacterAnimation3D/Resources/Models/RoboMan_Normal_Walk.ani


BIN
CharacterAnimation3D/Resources/Models/Robo_01.fbx


+ 30 - 0
CharacterAnimation3D/Resources/Models/Robo_01.fbx.asset

@@ -0,0 +1,30 @@
+{
+	"version": 1,
+	"guid": "938f9a4e9d43655389c5cac6d39e7852",
+	"ModelImporter": {
+		"scale": 0.5,
+		"importAnimations": true,
+		"animInfo": [
+			{
+				"name": "Idle",
+				"startTime": 1,
+				"endTime": 49
+			},
+			{
+				"name": "Run",
+				"startTime": 108,
+				"endTime": 124
+			},
+			{
+				"name": "Walk",
+				"startTime": 81,
+				"endTime": 107
+			},
+			{
+				"name": "Attack",
+				"startTime": 210,
+				"endTime": 215
+			}
+		]
+	}
+}

+ 5 - 0
CharacterAnimation3D/Resources/Scenes.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "772dfb873f1180835fd00500131fd859",
+	"FolderImporter": {}
+}

+ 253 - 0
CharacterAnimation3D/Resources/Scenes/Scene.scene

@@ -0,0 +1,253 @@
+<?xml version="1.0"?>
+<scene id="1">
+	<attribute name="Name" value="" />
+	<attribute name="Time Scale" value="1" />
+	<attribute name="Smoothing Constant" value="50" />
+	<attribute name="Snap Threshold" value="5" />
+	<attribute name="Elapsed Time" value="0" />
+	<attribute name="Next Replicated Node ID" value="365" />
+	<attribute name="Next Replicated Component ID" value="1979" />
+	<attribute name="Next Local Node ID" value="16778496" />
+	<attribute name="Next Local Component ID" value="16777216" />
+	<attribute name="Variables" />
+	<attribute name="Variable Names" value="" />
+	<component type="PhysicsWorld" id="1" />
+	<component type="Octree" id="2" />
+	<component type="DebugRenderer" id="3" />
+	<node id="2">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Zone" />
+		<attribute name="Position" value="0 0 0" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="1 1 1" />
+		<attribute name="Variables" />
+		<component type="Zone" id="4">
+			<attribute name="Bounding Box Min" value="-10000 -10000 -10000" />
+			<attribute name="Bounding Box Max" value="10000 10000 10000" />
+			<attribute name="Ambient Color" value="0.4 0.4 0.4 1" />
+		</component>
+	</node>
+	<node id="3">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="GlobalLight" />
+		<attribute name="Position" value="0 0 0" />
+		<attribute name="Rotation" value="0.888074 0.325058 -0.325058 0" />
+		<attribute name="Scale" value="1 1 1" />
+		<attribute name="Variables" />
+		<component type="Light" id="5">
+			<attribute name="Light Type" value="Directional" />
+			<attribute name="Cast Shadows" value="true" />
+			<attribute name="CSM Splits" value="50 100 200 0" />
+			<attribute name="View Size Quantize" value="1" />
+			<attribute name="View Size Minimum" value="5" />
+			<attribute name="Depth Constant Bias" value="0.00015" />
+			<attribute name="Depth Slope Bias" value="0.001" />
+		</component>
+	</node>
+	<node id="361">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Camera" />
+		<attribute name="Position" value="0 0 -5" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="1 1 1" />
+		<attribute name="Variables" />
+		<component type="Camera" id="1973" />
+	</node>
+	<node id="364">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Robo_01" />
+		<attribute name="Position" value="0 -1.24 0" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="1 1 1" />
+		<attribute name="Variables" />
+		<component type="AnimatedModel" id="1975">
+			<attribute name="Model" value="Model;Cache/938f9a4e9d43655389c5cac6d39e7852.mdl" />
+			<attribute name="Material" value="Material;Models/Materials/Robot_01_mat.material" />
+			<attribute name="Cast Shadows" value="true" />
+			<attribute name="Bone Animation Enabled">
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+				<variant type="Bool" value="true" />
+			</attribute>
+			<attribute name="Animation States">
+				<variant type="Int" value="0" />
+			</attribute>
+		</component>
+		<component type="AnimationController" id="1976">
+			<attribute name="Node Animation States">
+				<variant type="Int" value="0" />
+			</attribute>
+			<attribute name="Animation Resources" value="Animation;938f9a4e9d43655389c5cac6d39e7852_Idle.ani;938f9a4e9d43655389c5cac6d39e7852_Run.ani;938f9a4e9d43655389c5cac6d39e7852_Walk.ani;938f9a4e9d43655389c5cac6d39e7852_Attack.ani" />
+		</component>
+		<component type="JSComponent" id="1977">
+			<attribute name="ComponentFile" value="JSComponentFile;Components/UI.js" />
+		</component>
+		<component type="JSComponent" id="1978">
+			<attribute name="ComponentFile" value="JSComponentFile;Components/Roboman.js" />
+		</component>
+	</node>
+</scene>

+ 5 - 0
CharacterAnimation3D/Resources/Scenes/Scene.scene.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "7c88e457065d6d73e14a39028ef51ea5",
+	"SceneImporter": {}
+}

+ 5 - 0
CharacterAnimation3D/Resources/Scripts.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "2eac807ca23d0dca24fd9569e809265b",
+	"FolderImporter": {}
+}

+ 4 - 57
CharacterAnimation3D/Resources/Scripts/main.js

@@ -1,64 +1,11 @@
-
 // This script is the main entry point of the game
 
-require("AtomicGame");
-
-Atomic.game.init(start, update);
-
-
-// called at the start of play
-function start() {
-
-	var game = Atomic.game;
-
-	// create a 2D scene
-	game.createScene3D();
-
-	var scene = game.scene;
-
-	// zone
-	var zoneNode = scene.createChild("Zone")
-    var zone = zoneNode.createComponent("Zone");
-    zone.boundingBox = [-1000, -1000, -1000, 1000, 1000 , 1000];
-    zone.ambientColor = [0.35, 0.35, 0.35];
-    zone.fogColor = [0.1, 0.1, 0.1, 1.0];
-    zone.fogStart = 10;
-    zone.fogEnd = 100;
+var scene = Atomic.player.loadScene("Scenes/Scene.scene");
 
-    game.cameraNode.position = [0, 2.5, -6];
-    game.cameraNode.pitch(20);
-
-    var lightNode = scene.createChild("Directional Light");
-    lightNode.direction = [0.6, -1.0, 0.8];
-    var light = lightNode.createComponent("Light")
-    light.lightType = Atomic.LIGHT_DIRECTIONAL;
-    
-    light.castShadows = true;
-    // If we're running on android tweak the shadows
-    if (Atomic.platform == "Android") {
-
-        light.setShadowCascade(20.0, 50.0, 200.0, 0.0, 0.9);
-        light.shadowIntensity = 0.33;
-        
-    } else {
-        light.setShadowCascade(10.0, 50.0, 200.0, 0.0, 0.8);
-    }
-
-    light.setShadowBias(0.00025, 0.5);
-    light.specularIntensity = 8;
-    
-
-	// create the game component
-	var node = game.scene.createChild("Roboman");
-	TheRoboman = node.createJSComponent("Roboman");
-	
-	var ui = game.scene.createChild("UI");
-	ui.createJSComponent("UI");
-
-}
-
-// called per frame
+// called per frame, optional
 function update(timeStep) {
 
 
 }
+
+exports.update = update;

+ 7 - 0
CharacterAnimation3D/Resources/Scripts/main.js.asset

@@ -0,0 +1,7 @@
+{
+	"version": 1,
+	"guid": "dafc918aff00d89636caa26c37f7e6ca",
+	"JavascriptImporter": {
+		"IsComponentFile": false
+	}
+}

+ 5 - 0
CharacterAnimation3D/Resources/Skin.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "6bd83f9fd213e1f8761b81d7e81788b1",
+	"FolderImporter": {}
+}

+ 14 - 0
CharacterAnimation3D/Resources/Skin/skin.ui.txt

@@ -0,0 +1,14 @@
+elements
+	Spaceship
+		bitmap spaceship.png
+		pref-width 32
+		pref-height 32
+	SpaceGameContainer
+		type StretchBox
+		bitmap window.png
+		cut 16
+		expand 12
+		padding 8
+	SpaceText
+		text-color #00FF00
+

BIN
CharacterAnimation3D/Resources/Skin/spaceship.png


+ 5 - 0
CharacterAnimation3D/Resources/Skin/spaceship.png.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "fa084793c8f7c85ea355b64a531c7622",
+	"TextureImporter": {}
+}

BIN
CharacterAnimation3D/Resources/Skin/window.png


+ 5 - 0
CharacterAnimation3D/Resources/Skin/window.png.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "e2b0aed0e278aaa85124b142801c510a",
+	"TextureImporter": {}
+}

+ 5 - 0
CharacterAnimation3D/Resources/Textures.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "22934bb7e219c54a4b25e2baffdd045a",
+	"FolderImporter": {}
+}

BIN
CharacterAnimation3D/Resources/Textures/AtomicRobot_01_Diffuse.png


+ 5 - 0
CharacterAnimation3D/Resources/Textures/AtomicRobot_01_Diffuse.png.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "3fde0c3b5a8aa2f3081e2977cc1eb98b",
+	"TextureImporter": {}
+}

BIN
CharacterAnimation3D/Resources/Textures/BlueGrid.png


BIN
CharacterAnimation3D/Resources/Textures/Robot_01_Diffuse.png