Browse Source

Adjust flat JS components

Josh Engebretson 10 years ago
parent
commit
a85dd69120

+ 1 - 1
MultiScript/Resources/Components/InstantiatedSpinner.js

@@ -7,7 +7,7 @@ var inspectorFields = {
   speed: 1.0
 }
 
-module.exports = function(self) {
+exports.component = function(self) {
 
   self.start = function() {
 

+ 1 - 1
MultiScript/Resources/Components/Spinner.js

@@ -7,7 +7,7 @@ var inspectorFields = {
   speed: 1.0
 }
 
-module.exports = function(self) {
+exports.component = function(self) {
 
   self.update = function(timeStep) {
 

+ 1 - 1
PhysicsPlatformerNew/Resources/Components/Background.js

@@ -17,4 +17,4 @@ var component = function(self) {
 
 }
 
-module.exports = component;
+exports.component = component;

+ 1 - 1
PhysicsPlatformerNew/Resources/Components/Bat.js

@@ -46,4 +46,4 @@ var component = function (self) {
 
 }
 
-module.exports = component;
+exports.component = component;

+ 1 - 1
PhysicsPlatformerNew/Resources/Components/Coin.js

@@ -87,4 +87,4 @@ var component = function(self) {
 
 }
 
-module.exports = component;
+exports.component = component;

+ 1 - 1
PhysicsPlatformerNew/Resources/Components/Level.js

@@ -68,4 +68,4 @@ var component = function (self) {
 
 }
 
-module.exports = component;
+exports.component = component;

+ 1 - 1
PhysicsPlatformerNew/Resources/Components/MovingPlatform.js

@@ -59,4 +59,4 @@ self.update = function(timeStep) {
 }
 }
 
-module.exports = component;
+exports.component = component;

+ 2 - 2
PhysicsPlatformerNew/Resources/Components/PhysicsTest.js

@@ -19,7 +19,7 @@ var component = function (self) {
     circle.friction = .2;
     // Set restitution
     circle.setRestitution(0.1);
-    
+
 
 
   self.start = function() {
@@ -32,4 +32,4 @@ var component = function (self) {
 
 }
 
-module.exports = component;
+exports.component = component;

+ 3 - 3
PhysicsPlatformerNew/Resources/Components/Player.js

@@ -8,7 +8,7 @@ var inspectorFields = {
 }
 
 
-module.exports = function(self) {
+exports.component = function(self) {
 
   var node = self.node;
   var camera = self.node.scene.getMainCamera();
@@ -169,9 +169,9 @@ module.exports = function(self) {
       if (jump && jumpDelta <= 0 && contactCount) {
 
           jumpDelta = .25;
-          if (self.jumpSound) {          
+          if (self.jumpSound) {
               soundSource.gain = 0.45;
-              soundSource.play(self.jumpSound);          
+              soundSource.play(self.jumpSound);
           }
 
           vel[1] = 0;

+ 2 - 2
PhysicsPlatformerNew/Resources/Components/Star.js

@@ -4,7 +4,7 @@ var inspectorFields = {
   speed: 1.0
 }
 
-module.exports = function(self) {
+exports.component = function(self) {
 
   self.update = function(timeStep) {
 
@@ -12,4 +12,4 @@ module.exports = function(self) {
 
   }
 
-}
+}

+ 1 - 1
PhysicsPlatformerNew/Resources/Components/Vine.js

@@ -64,4 +64,4 @@ self.start = function() {
 
 }
 
-module.exports = component;
+exports.component = component;

+ 1 - 1
TestInspectorFields/Resources/Components/Star.js

@@ -14,7 +14,7 @@ var inspectorFields = {
   sprite2D: ["Sprite2D", "Sprites/star.png"]
 }
 
-module.exports = function(self) {
+exports.component = function(self) {
 
   self.update = function(timeStep) {