From 1d01e9d275ab2c8fb93139a5761d65c367a3f123 Mon Sep 17 00:00:00 2001 From: routersys Date: Sun, 5 Jul 2026 08:53:46 +0900 Subject: [PATCH] =?UTF-8?q?obj=E5=AF=B8=E6=B3=95=E3=81=AE=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E3=82=92=E3=83=9C=E3=83=83=E3=82=AF=E3=82=B9=E5=8C=96?= =?UTF-8?q?=E3=81=97=E3=81=AA=E3=81=84Set=E3=81=B8=E7=BD=AE=E6=8F=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaScript.Runtime/Engine/LuaScriptEngine.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/LuaScript.Runtime/Engine/LuaScriptEngine.cs b/LuaScript.Runtime/Engine/LuaScriptEngine.cs index 508c7f2..25e22c2 100644 --- a/LuaScript.Runtime/Engine/LuaScriptEngine.cs +++ b/LuaScript.Runtime/Engine/LuaScriptEngine.cs @@ -1208,14 +1208,14 @@ namespace LuaScript int w = _activeContext!.ImageWidth; int h = _activeContext.ImageHeight; var obj = _objScope.Table; - obj["w"] = w; - obj["h"] = h; - obj["hw"] = w / 2d; - obj["hh"] = h / 2d; - obj["cx"] = w / 2d; - obj["cy"] = h / 2d; - obj["cz"] = 0d; - obj["diagonal"] = Math.Sqrt((double)w * w + (double)h * h); + obj.Set("w", DynValue.NewNumber(w)); + obj.Set("h", DynValue.NewNumber(h)); + obj.Set("hw", DynValue.NewNumber(w / 2d)); + obj.Set("hh", DynValue.NewNumber(h / 2d)); + obj.Set("cx", DynValue.NewNumber(w / 2d)); + obj.Set("cy", DynValue.NewNumber(h / 2d)); + obj.Set("cz", DynValue.NewNumber(0d)); + obj.Set("diagonal", DynValue.NewNumber(Math.Sqrt((double)w * w + (double)h * h))); } private static DynValue BuildObjectTable(Script script, SceneObjectInfo info)