Josh Engebretson 10 years ago
parent
commit
0cd21e34ba

+ 7 - 8
Roboman3DNew/Resources/Components/Water.js

@@ -1,21 +1,20 @@
-
 // Water component
 // Water component
-
 "use strict";
 "use strict";
 "atomic component";
 "atomic component";
 
 
-// fields
-"myBoolField boolean";
-"myStringField string";
-"myNumberField number";
-"myVector3Field Vector3";
+exports.fields = {
+  myBooleanField: true,
+  myStringField: "Default",
+  myNumberField: 42,
+  myVector3Field: [ Atomic.VAR_VECTOR3, [1,2,3] ]
+}
 
 
 exports.component = function(self) {
 exports.component = function(self) {
 
 
   var game = Atomic.game;
   var game = Atomic.game;
   var node = self.node;
   var node = self.node;
 
 
-  print (self.myBoolField);
+  print (self.myBooleanField);
   print (self.myStringField);
   print (self.myStringField);
   print (self.myNumberField);
   print (self.myNumberField);
   print (self.myVector3Field);
   print (self.myVector3Field);

+ 1 - 1
Roboman3DNew/Resources/Components/Water.js.asset

@@ -1,7 +1,7 @@
 {
 {
 	"version": 1,
 	"version": 1,
 	"guid": "d4da3db4accae76aac9c01e7e6174af6",
 	"guid": "d4da3db4accae76aac9c01e7e6174af6",
-	"timestamp": 1436651418,
+	"timestamp": 1436666256,
 	"JavascriptImporter": {
 	"JavascriptImporter": {
 		"IsComponentFile": true
 		"IsComponentFile": true
 	}
 	}

+ 3 - 4
Roboman3DNew/Resources/Scenes/Test.scene

@@ -5,8 +5,8 @@
 	<attribute name="Smoothing Constant" value="50" />
 	<attribute name="Smoothing Constant" value="50" />
 	<attribute name="Snap Threshold" value="5" />
 	<attribute name="Snap Threshold" value="5" />
 	<attribute name="Elapsed Time" value="0" />
 	<attribute name="Elapsed Time" value="0" />
-	<attribute name="Next Replicated Node ID" value="394" />
-	<attribute name="Next Replicated Component ID" value="1996" />
+	<attribute name="Next Replicated Node ID" value="405" />
+	<attribute name="Next Replicated Component ID" value="2003" />
 	<attribute name="Next Local Node ID" value="16778496" />
 	<attribute name="Next Local Node ID" value="16778496" />
 	<attribute name="Next Local Component ID" value="16777216" />
 	<attribute name="Next Local Component ID" value="16777216" />
 	<attribute name="Variables" />
 	<attribute name="Variables" />
@@ -73,8 +73,7 @@
 		</component>
 		</component>
 		<component type="JSComponent" id="1989">
 		<component type="JSComponent" id="1989">
 			<attribute name="FieldValues">
 			<attribute name="FieldValues">
-				<variant hash="-409412515" type="String" value="This is a test" />
-				<variant hash="1868354565" type="Float" value="101" />
+				<variant hash="1868354565" type="Float" value="42" />
 			</attribute>
 			</attribute>
 			<attribute name="ComponentFile" value="JSComponentFile;Components/Water.js" />
 			<attribute name="ComponentFile" value="JSComponentFile;Components/Water.js" />
 		</component>
 		</component>

+ 1 - 1
Roboman3DNew/Resources/Scenes/Test.scene.asset

@@ -1,6 +1,6 @@
 {
 {
 	"version": 1,
 	"version": 1,
 	"guid": "627532ce83065783581852967b660c15",
 	"guid": "627532ce83065783581852967b660c15",
-	"timestamp": 1436654961,
+	"timestamp": 1436667161,
 	"SceneImporter": {}
 	"SceneImporter": {}
 }
 }