Browse Source

- Utilized some of the new string accessors.

MelvMay-GG 12 years ago
parent
commit
cc20c80

+ 2 - 2
modules/AppCore/1/scripts/canvas.cs

@@ -58,11 +58,11 @@ function initializeCanvas(%windowName)
 
     if ($platform $= "windows" || $platform $= "macos")
     {
-        setScreenMode( GetWord( %resolution , 0 ), GetWord( %resolution, 1 ), GetWord( %resolution , 2 ), $pref::Video::fullScreen );
+        setScreenMode( %resolution._0, %resolution._1, %resolution._2, $pref::Video::fullScreen );
     }
     else
     {
-        setScreenMode( GetWord( %resolution , 0 ), GetWord( %resolution, 1 ), GetWord( %resolution, 2 ), false );
+        setScreenMode( %resolution._0, %resolution._1, %resolution._2, false );
     }
 
     $canvasCreated = true;

+ 9 - 9
modules/BuoyancyControllerToy/1/main.cs

@@ -78,11 +78,11 @@ function BuoyancyControllerToy::reset( %this )
     SandboxScene.clear();
     
     // Calculate fluid bounds to help layout only.
-    BuoyancyControllerToy.FluidLeft = getWord( BuoyancyControllerToy.FluidArea, 0 );
-    BuoyancyControllerToy.FluidBottom = getWord( BuoyancyControllerToy.FluidArea, 1 );
-    BuoyancyControllerToy.FluidRight = getWord( BuoyancyControllerToy.FluidArea, 2 );
-    BuoyancyControllerToy.FluidTop = getWord( BuoyancyControllerToy.FluidArea, 3 );    
-
+    BuoyancyControllerToy.FluidLeft = BuoyancyControllerToy.FluidArea._0;
+    BuoyancyControllerToy.FluidBottom = BuoyancyControllerToy.FluidArea._1;
+    BuoyancyControllerToy.FluidRight = BuoyancyControllerToy.FluidArea._2;
+    BuoyancyControllerToy.FluidTop = BuoyancyControllerToy.FluidArea._3;
+    
     // Create a background.
     %this.createBackground();
    
@@ -193,10 +193,10 @@ function BuoyancyControllerToy::createDebris( %this )
 
 function BuoyancyControllerToy::createFluid( %this, %area )
 {
-    %areaLeft = getWord( %area, 0 );
-    %areaBottom = getWord( %area, 1 );
-    %areaRight = getWord( %area, 2 );
-    %areaTop = getWord( %area, 3 );
+    %areaLeft = %area._0;
+    %areaBottom = %area._1;
+    %areaRight = %area._2;
+    %areaTop = %area._3;
 
     %crestHeight = 0.2;
     %crestY = %areaTop - ((%areaTop - %areaBottom) * %crestHeight);

+ 2 - 5
modules/CompositeSpriteToy/1/scripts/customLayout.cs

@@ -74,15 +74,12 @@ function CompositeSpriteToy::createCustomLayout( %this )
 
 function CompositeSprite::onCustomLayout( %this, %args )
 {
-    // Fetch the argument count.
-    %argCount = getWordCount(%args);
-    
     // Finish if there are no arguments passed.
-    if ( %argCount == 0 )
+    if ( %args.Count == 0 )
         return;
 
     // Fetch the first argument.    
-    %inputX = getWord( %args, 0 );
+    %inputX = %args._0;
     
     // Calculate an angle from the first argument.
     %angle = mDegToRad( %inputX * 10 );

+ 2 - 2
modules/RotateToToy/1/main.cs

@@ -135,7 +135,7 @@ function SandboxWindow::onTouchDown(%this, %touchID, %worldPosition)
 {
     // Calculate the angle to the mouse.
     %origin = RotateToToy.TargetObject.getPosition();
-    %angle = -mRadToDeg( mAtan( getWord(%worldPosition,0)-getWord(%origin,0), getWord(%worldPosition,1)-getWord(%origin,1) ) );
+    %angle = -mRadToDeg( mAtan( %worldPosition.x-%origin.x, %worldPosition.y-%origin.y ) );
     
     //Rotate to the touched angle.
     RotateToToy.TargetObject.RotateTo( %angle, RotateToToy.rotateSpeed );
@@ -151,7 +151,7 @@ function SandboxWindow::onTouchMoved(%this, %touchID, %worldPosition)
         
     // Calculate the angle to the mouse.
     %origin = RotateToToy.TargetObject.getPosition();
-    %angle = -mRadToDeg( mAtan( getWord(%worldPosition,0)-getWord(%origin,0), getWord(%worldPosition,1)-getWord(%origin,1) ) );
+    %angle = -mRadToDeg( mAtan( %worldPosition.x-%origin.x, %worldPosition.y-%origin.y ) );
     
     //Rotate to the touched angle.
     RotateToToy.TargetObject.RotateTo( %angle, RotateToToy.rotateSpeed );        

+ 1 - 1
modules/Sandbox/1/scripts/manipulation.cs

@@ -354,7 +354,7 @@ function SandboxWindow::onTouchDown(%this, %touchID, %worldPosition)
             return;
         
         // Fetch the pick count.
-        %pickCount = getWordCount( %picked );
+        %pickCount = %picked.Count;
         
         for( %n = 0; %n < %pickCount; %n++ )
         {