![]() |
3DRadSpace
v1.0.0a
Scripting documentation
|
Public Member Functions | |
Script (string name, bool enabled, string scriptpath, string ClassN) | |
Script object main constructor. More... | |
Script () | |
Empty Script object constructor. More... | |
bool | Compile (bool ShowErrors) |
Compiles code in order to make it usable. More... | |
override void | Load (ContentManager content) |
Initiailze the object by compiling the linked source. More... | |
void | Start () |
Executes [ClassName].Start(), where ClassName is part of the the compiled code. More... | |
void | Run (MouseState mouse, KeyboardState keyboard, GameTime time) |
Executes [ClassName].Run(), where ClassName is part of the compiled source code. More... | |
void | End () |
Executes [ClassName].End(), where ClassName is part of the compiled source. More... | |
override void | Update (MouseState mouse, KeyboardState keyboard, GameTime time) |
Runs the script code. More... | |
override void | Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection) |
Runs the script code dedicated to drawing. More... | |
![]() | |
GameObject () | |
Default constructor. More... | |
void | Enable () |
Enables object. More... | |
void | Disable () |
Disables object. More... | |
void | Toggle () |
Switches object on/off state. More... | |
void | Show () |
Shows the object. More... | |
void | Hide () |
Hides the object. More... | |
virtual void | EditorDraw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection) |
Object draw code for the 3DRadSpace editor More... | |
virtual void | Trigger () |
This is specific to objects like ExitFade, NetServer,etc More... | |
override bool | Equals (object obj) |
Determines whether the specified object is equal to the current object. More... | |
override int | GetHashCode () |
Returns the hash code calculated from a string representing the data inside the object. More... | |
override string | ToString () |
Returns the object's name More... | |
void | RunOnce () |
Runs the object one Update loop. If used on a active object it will be stopped. More... | |
Properties | |
bool | CompilationStatus [get] |
Checks if compilation succeded. More... | |
TimeSpan | CompilationTime [get] |
Time for compilation. More... | |
string | Path [get, set] |
Path to source code to be compiled and run. More... | |
string | ClassName [get, set] |
Script entry class. More... | |
![]() | |
string | Name [get, set] |
Object Name. Used as a string identifier. More... | |
object | Tag [get, set] |
Tag object. More... | |
bool | Enabled [get, set] |
Checks if object is enabled. More... | |
bool | Hidden [get, set] |
Checks if object is being drawn. More... | |
List< ObjectBehiavour > | Behiavours [get, set] |
Relation with other objects More... | |
Quaternion | RotationQuaternion [get] |
Rotation in a Quaterion system. More... | |
string | Resource [get, set] |
Resource file More... | |
Additional Inherited Members | |
![]() | |
static implicit | operator bool (GameObject o) |
Checks if the object exists. Same as GameObject != null. More... | |
static bool | operator== (GameObject a, GameObject b) |
Checks if two GameObjects are equal. More... | |
static bool | operator!= (GameObject a, GameObject b) |
The opposite of the equality operator. More... | |
![]() | |
Vector3 | Position |
Object position More... | |
Vector3 | Rotation |
Rotation in a Euler angles system. More... | |
List< int > | SelectedObjects |
Used for editor. More... | |
![]() | |
onDraw | OnDraw |
Called when object is being drawn on frame. More... | |
onUpdate | OnUpdate |
Called when object is being updated on the update logic loop. More... | |
onObjectDestroy | OnRemoval |
Called when object is being deleted. More... | |
onObjectLoad | OnObjectLoad |
Called when a object resource is being loaded. More... | |
C# Script class.
_3DRadSpaceDll.Script.Script | ( | string | name, |
bool | enabled, | ||
string | scriptpath, | ||
string | ClassN | ||
) |
Script object main constructor.
name | Object name |
enabled | Checks if scripts will be run |
scriptpath | Path to the file that will be compiled. |
ClassN | Class name. |
_3DRadSpaceDll.Script.Script | ( | ) |
Empty Script object constructor.
bool _3DRadSpaceDll.Script.Compile | ( | bool | ShowErrors | ) |
Compiles code in order to make it usable.
|
virtual |
Runs the script code dedicated to drawing.
spriteBatch | Used by the user if the case. |
view | User by the user if the case again. |
projection | User by the user, if the case... |
Reimplemented from _3DRadSpaceDll.GameObject.
void _3DRadSpaceDll.Script.End | ( | ) |
Executes [ClassName].End(), where ClassName is part of the compiled source.
|
virtual |
Initiailze the object by compiling the linked source.
content | Content manager. Not used. |
Reimplemented from _3DRadSpaceDll.GameObject.
void _3DRadSpaceDll.Script.Run | ( | MouseState | mouse, |
KeyboardState | keyboard, | ||
GameTime | time | ||
) |
Executes [ClassName].Run(), where ClassName is part of the compiled source code.
void _3DRadSpaceDll.Script.Start | ( | ) |
Executes [ClassName].Start(), where ClassName is part of the the compiled code.
|
virtual |
Runs the script code.
mouse | Used by the user if the case. |
keyboard | Used by the user if the case. |
time | Used by the user if the case. |
Reimplemented from _3DRadSpaceDll.GameObject.
|
getset |
Script entry class.
|
get |
Checks if compilation succeded.
|
get |
Time for compilation.
|
getset |
Path to source code to be compiled and run.