Răsfoiți Sursa

Updated comments in code

Ken Paulson 8 ani în urmă
părinte
comite
37208eb112

+ 3 - 0
Data/AtomicEditor/ProjectTemplates/Project2D/CSharp/Resources/Components/Spinner.cs

@@ -4,9 +4,12 @@ using AtomicEngine;
 public class Spinner : CSComponent
 {
 
+    //inspector fields to make speed variable visible in editor
     [Inspector]
     float speed = 1.0f;    
 
+	//update function is called each frame
+	//timeStep: time since last call to update in seconds
     void Update(float timeStep)
     {
         Node.Roll(speed * timeStep * 75.0f);

+ 2 - 1
Data/AtomicEditor/ProjectTemplates/Project2D/JavaScript/Resources/Components/Spinner.js

@@ -6,7 +6,8 @@ var inspectorFields = {
 
 exports.component = function(self) {
     
-    //update function calls each frame
+    //update function is called each frame.
+	//timeStep: time since last call to update in seconds
     self.update = function(timeStep) {
         //roll a node
         self.node.roll(timeStep * 100);