summaryrefslogtreecommitdiff
path: root/Resources
diff options
context:
space:
mode:
Diffstat (limited to 'Resources')
-rw-r--r--Resources/DefaultContent/Libraries/GameLab/Engine/Math/Euler.lua11
-rw-r--r--Resources/DefaultContent/Libraries/GameLab/Engine/Math/Math.lua21
-rw-r--r--Resources/DefaultContent/Libraries/GameLab/Engine/Math/Matrix3x3.lua7
-rw-r--r--Resources/DefaultContent/Libraries/GameLab/Engine/Math/Quaternion.lua12
-rw-r--r--Resources/DefaultContent/Libraries/GameLab/Engine/Math/init.lua7
-rw-r--r--Resources/Libraries/GameLab/Editor/GUI/EditorWindow.lua14
-rw-r--r--Resources/Scripts/EditorApplication.lua9
7 files changed, 70 insertions, 11 deletions
diff --git a/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Euler.lua b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Euler.lua
index e69de29..1f2ed78 100644
--- a/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Euler.lua
+++ b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Euler.lua
@@ -0,0 +1,11 @@
+local Euler = GameLab.Class("Euler", "GameLab.Engine.Math")
+
+Euler.Ctor = function (self, x, y, z)
+ self.x = x or 0
+ self.y = y or 0
+ self.z = z or 0
+end
+
+
+
+return Euler \ No newline at end of file
diff --git a/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Math.lua b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Math.lua
new file mode 100644
index 0000000..4ec067e
--- /dev/null
+++ b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Math.lua
@@ -0,0 +1,21 @@
+-- 数学函数
+GameLab.Engine.Math = GameLab.Engine.Math or {}
+local m = GameLab.Engine.Math
+
+m.Abs = function(n)
+
+end
+
+m.Lerp = function (a, b, t)
+
+end
+
+m.Round = function (n)
+
+end
+
+m.Sign = function(n)
+
+end
+
+return m \ No newline at end of file
diff --git a/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Matrix3x3.lua b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Matrix3x3.lua
index e69de29..f7dc352 100644
--- a/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Matrix3x3.lua
+++ b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Matrix3x3.lua
@@ -0,0 +1,7 @@
+local Matrix3x3 = GameLab.Class("Matrix3x3", "GameLab.Engine.Math")
+
+Matrix3x3.Ctor = function(self)
+
+end
+
+return Matrix3x3 \ No newline at end of file
diff --git a/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Quaternion.lua b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Quaternion.lua
index 4c71f52..4d690e3 100644
--- a/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Quaternion.lua
+++ b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/Quaternion.lua
@@ -1,4 +1,14 @@
local Quaternion = {}
-return Quaternion
+Quaternion.Ctor = function(self)
+ self.x = 0
+ self.y = 0
+ self.z = 0
+ self.w = 0
+end
+Quaternion.Euler = function(euler)
+
+end
+
+return Quaternion \ No newline at end of file
diff --git a/Resources/DefaultContent/Libraries/GameLab/Engine/Math/init.lua b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/init.lua
index 0cf945e..662cbc4 100644
--- a/Resources/DefaultContent/Libraries/GameLab/Engine/Math/init.lua
+++ b/Resources/DefaultContent/Libraries/GameLab/Engine/Math/init.lua
@@ -1,10 +1,9 @@
GameLab.Engine.Math = GameLab.Engine.Math or {}
-
-local Debug = GameLab.Debug
-
local m = GameLab.Engine.Math
+
local require = GameLab.require(...)
+require("Math")
m.Vector2 = require("Vector2")
m.Vector3 = require("Vector3")
m.Vector4 = require("Vector4")
@@ -14,6 +13,6 @@ m.Quaternion = require("Quaternion")
package.loaded["GameLab.Math"] = m
-Debug.Log("GameLab.Engine.Math loaded")
+GameLab.Debug.Log("GameLab.Engine.Math loaded")
return m \ No newline at end of file
diff --git a/Resources/Libraries/GameLab/Editor/GUI/EditorWindow.lua b/Resources/Libraries/GameLab/Editor/GUI/EditorWindow.lua
index 99d242d..2ec7f95 100644
--- a/Resources/Libraries/GameLab/Editor/GUI/EditorWindow.lua
+++ b/Resources/Libraries/GameLab/Editor/GUI/EditorWindow.lua
@@ -1,10 +1,18 @@
local EditorWindow = GameLab.Class("EditorWindow", "GameLab.Editor.GUI")
-EditorWindow.Ctor = function(self, ...)
+EditorWindow.Ctor = function(self)
end
-EditorWindow.SetGUIWindow = function(self)
- print("SetGUIwidow")
+EditorWindow.OnGUI = function(self)
+end
+
+EditorWindow.OnUpdate = function(self)
+end
+
+EditorWindow.OnStart = function(self)
+end
+
+EditorWindow.OnStop = function(self)
end
return EditorWindow \ No newline at end of file
diff --git a/Resources/Scripts/EditorApplication.lua b/Resources/Scripts/EditorApplication.lua
index cb4bcb0..f09a197 100644
--- a/Resources/Scripts/EditorApplication.lua
+++ b/Resources/Scripts/EditorApplication.lua
@@ -17,9 +17,12 @@ mainWindow:SetIcon("./Icon/GameLab.ico")
app:SetMainWindow(mainWindow)
local guiWindow = GUI.GUIWindow.New()
-guiWindow:SetContainerWindow(mainWindow)
-guiWindow:SetPosition({0,0, 500, 400})
+--guiWindow:SetContainerWindow(mainWindow)
+--guiWindow:SetPosition({0,0, 500, 400})
+guiWindow.a = 10
+guiWindow = nil
+collectgarbage()
Debug.Log(GameLab.Path.GetRootDirectory())
@@ -37,4 +40,4 @@ while true do
app:PullMessage()
-end
+end \ No newline at end of file