mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
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.
This commit is contained in:
13
OpenSim.Framework/IScriptAPI.cs
Normal file
13
OpenSim.Framework/IScriptAPI.cs
Normal file
@@ -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();
|
||||
}
|
||||
}
|
||||
14
OpenSim.Framework/IScriptEngine.cs
Normal file
14
OpenSim.Framework/IScriptEngine.cs
Normal file
@@ -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();
|
||||
}
|
||||
}
|
||||
18
OpenSim.Framework/OSVector3.cs
Normal file
18
OpenSim.Framework/OSVector3.cs
Normal file
@@ -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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user