Browse Source

Change SetRotationSpeed's parameter to Vector3.

Aster Jian 12 years ago
parent
commit
3e4765e4f4

+ 4 - 4
Bin/Data/LuaScripts/Rotator.lua

@@ -5,10 +5,10 @@ function Rotator:Start()
     self.rotationSpeed = {0.0, 0.0, 0.0}
     self.rotationSpeed = {0.0, 0.0, 0.0}
 end
 end
 
 
-function Rotator:SetRotationSpeed(x, y, z)
-    self.rotationSpeed[1] = x;
-    self.rotationSpeed[2] = y;
-    self.rotationSpeed[3] = z;
+function Rotator:SetRotationSpeed(speed)
+    self.rotationSpeed[1] = speed.x;
+    self.rotationSpeed[2] = speed.y;
+    self.rotationSpeed[3] = speed.z;
 end
 end
 
 
 function Rotator:Update(timeStep)
 function Rotator:Update(timeStep)

+ 8 - 0
Source/Engine/UI/Text.h

@@ -31,6 +31,14 @@ static const int DEFAULT_FONT_SIZE = 12;
 
 
 class Font;
 class Font;
 
 
+/// Text effect.
+enum TextEffect
+{
+    TE_NONE = 0
+    TE_SHADOW, 
+    TE_STROKE,
+};
+
 /// %Text %UI element.
 /// %Text %UI element.
 class URHO3D_API Text : public UIElement
 class URHO3D_API Text : public UIElement
 {
 {

+ 1 - 3
Source/Samples/22_LuaIntegration/LuaIntegration.cpp

@@ -112,9 +112,7 @@ void LuaIntegration::CreateScene()
         instance->CreateObject("LuaScripts/Rotator.lua", "Rotator");
         instance->CreateObject("LuaScripts/Rotator.lua", "Rotator");
         // Call the script object's "SetRotationSpeed" function. Function arguments need to be passed in a VariantVector
         // Call the script object's "SetRotationSpeed" function. Function arguments need to be passed in a VariantVector
         VariantVector parameters;
         VariantVector parameters;
-        parameters.Push(10.0f);
-        parameters.Push(20.0f);
-        parameters.Push(30.0f);
+        parameters.Push(Vector3(10.0f, 20.0f, 30.0f));
         instance->ExecuteFunction("SetRotationSpeed", parameters);
         instance->ExecuteFunction("SetRotationSpeed", parameters);
     }
     }