wiki.sine.space | sinespace

Difference between revisions of "Scripting/SScript"

From wiki.sine.space
Jump to: navigation, search
Line 8: Line 8:
 
{{ScriptFunction|SHost|Host|{ get; }|Access information about the current scripting runtime host}}
 
{{ScriptFunction|SHost|Host|{ get; }|Access information about the current scripting runtime host}}
 
{{ScriptFunction|SPhysics|Physics|{ get; }|Call physics-related commands, and variables, such as raycasting}}
 
{{ScriptFunction|SPhysics|Physics|{ get; }|Call physics-related commands, and variables, such as raycasting}}
* [[Scripting/SMath]] Math
+
{{ScriptFunction|SMath|Math|{ get; }|Math related functions (Sin, Cos, Tan, etc)}}
* [[Scripting/SString]] String
+
{{ScriptFunction|SString|String|{ get; }|Miscellaneous additional string functions (e.g. MD5Sum)}}
* [[Scripting/SInput]] Input
+
{{ScriptFunction|SInput|Input|{ get; }|Input device related functions (mouse position, keyboard state)}}
* [[Scripting/SCameraManager]] Camera
+
{{ScriptFunction|SCameraManager|CameraManager|{ get; }|Take and control the users camera}}
* [[Scripting/SWebService]] WebServices
+
{{ScriptFunction|SWebService|WebServices|{ get; }|Call remote web services to designated hosts (will not work with arbitrary domains, see page for details)}}
* [[Scripting/SNetwork]] Network
+
{{ScriptFunction|SNetwork|Network|{ get; }|Send data to other clients through the region server}}
* [[Scripting/SResource]][] Resources
+
{{ScriptFunction|SResource|Resources[]|{ get; }|Access resources embedded in the Scripting Runtime component, such as sounds, textures & so forth}}
* float Time ''The current viewer time - this will usually correlate with the number of seconds the player has been in the current scene, increments each frame, typically used for animation/tweening''
+
{{ScriptFunction|float|Time|{ get; }|The current viewer time - this will usually correlate with the number of seconds the player has been in the current scene, increments each frame, typically used for animation/tweening}}
* DateTime ServerTime ''The current server time - usually UTC, as according to the login server.''
+
{{ScriptFunction|DateTime|ServerTime|{ get; }|The current server time - usually UTC, as according to the login server.}}
* float DeltaTime ''The current time between this frame, and the previous frame, as used in Update, LateUpdate events, if moving a object, you can multiply it by DeltaTime to get a consistent speed''
+
{{ScriptFunction|float|DeltaTime|{ get; }|The current time between this frame, and the previous frame, as used in Update, LateUpdate events, if moving a object, you can multiply it by DeltaTime to get a consistent speed}}
* void Log(string text) ''Logs the message to the script debug console''
+
{{ScriptFunction|void|Log|(string text)|Logs the message to the script debug console}}

Revision as of 05:41, 17 January 2017

The 'Space' global accessible in every script (for C# scripts, this inherits from the SpaceScript base class)

It has the following members:

Inventory

SInventory Inventory { get; }

Allows access to the users inventory

No example provided yet


Persistence

SPersistence Persistence { get; }

Stores information between user sessions, and for other users

No example provided yet


Scene

SScene Scene { get; }

Allows access to the current scene graph (objects and avatars in the scene, and other information)

No example provided yet


Host

SHost Host { get; }

Access information about the current scripting runtime host

No example provided yet


Physics

SPhysics Physics { get; }

Call physics-related commands, and variables, such as raycasting

No example provided yet


Math

SMath Math { get; }

Math related functions (Sin, Cos, Tan, etc)

No example provided yet


String

SString String { get; }

Miscellaneous additional string functions (e.g. MD5Sum)

No example provided yet


Input

SInput Input { get; }

Input device related functions (mouse position, keyboard state)

No example provided yet


CameraManager

SCameraManager CameraManager { get; }

Take and control the users camera

No example provided yet


WebServices

SWebService WebServices { get; }

Call remote web services to designated hosts (will not work with arbitrary domains, see page for details)

No example provided yet


Network

SNetwork Network { get; }

Send data to other clients through the region server

No example provided yet


Resources[]

SResource Resources[] { get; }

Access resources embedded in the Scripting Runtime component, such as sounds, textures & so forth

No example provided yet


Time

float Time { get; }

The current viewer time - this will usually correlate with the number of seconds the player has been in the current scene, increments each frame, typically used for animation/tweening

No example provided yet


ServerTime

DateTime ServerTime { get; }

The current server time - usually UTC, as according to the login server.

No example provided yet


DeltaTime

float DeltaTime { get; }

The current time between this frame, and the previous frame, as used in Update, LateUpdate events, if moving a object, you can multiply it by DeltaTime to get a consistent speed

No example provided yet


Log

void Log (string text)

Logs the message to the script debug console

No example provided yet