From 5ad6d5a939fb7bf0fdfdc6925d4afed306e08641 Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 11 Apr 2007 12:13:21 +0000 Subject: First basic test script now works in the jvm scripting engine. For it to work you need to have a java sdk installed and the javac.exe somewhere in the environment Path variable. Then To test, copy the text from bin/script1.text into a note card and then add that note to a prim. --- OpenSim.Framework/IScriptAPI.cs | 13 +++++++++++++ OpenSim.Framework/IScriptEngine.cs | 14 ++++++++++++++ OpenSim.Framework/OSVector3.cs | 18 ++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 OpenSim.Framework/IScriptAPI.cs create mode 100644 OpenSim.Framework/IScriptEngine.cs create mode 100644 OpenSim.Framework/OSVector3.cs (limited to 'OpenSim.Framework') diff --git a/OpenSim.Framework/IScriptAPI.cs b/OpenSim.Framework/IScriptAPI.cs new file mode 100644 index 0000000..2f58198 --- /dev/null +++ b/OpenSim.Framework/IScriptAPI.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Framework.Interfaces +{ + public interface IScriptAPI + { + OSVector3 GetEntityPosition(uint localID); + void SetEntityPosition(uint localID, float x, float y, float z); + uint GetRandomAvatarID(); + } +} diff --git a/OpenSim.Framework/IScriptEngine.cs b/OpenSim.Framework/IScriptEngine.cs new file mode 100644 index 0000000..ed8974c --- /dev/null +++ b/OpenSim.Framework/IScriptEngine.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Framework.Interfaces +{ + public interface IScriptEngine + { + bool Init(IScriptAPI api); + string GetName(); + void LoadScript(string script, string scriptName, uint entityID); + void OnFrame(); + } +} diff --git a/OpenSim.Framework/OSVector3.cs b/OpenSim.Framework/OSVector3.cs new file mode 100644 index 0000000..b5d1223 --- /dev/null +++ b/OpenSim.Framework/OSVector3.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Framework +{ + public class OSVector3 + { + public float X; + public float Y; + public float Z; + + public OSVector3() + { + + } + } +} -- cgit v1.1