3DRadSpace  v1.0.0a
Scripting documentation
_3DRadSpaceDll.Game Class Reference

Contains methods and fields for managing game objects. More...

Static Public Member Functions

static void DrawModel (Model model, Matrix world, Matrix view, Matrix projection, bool FogEnabled=false, Vector3 FogColor=default, float FogStart=0, float FogEnd=0)
 Draws a 3D Model. More...
 
static object FindObject (int i)
 Finds an objects after it's id. More...
 
static object FindObject (string Name)
 Finds an objects after it's name. If objects have the same name, the object with the lowest numerical ID will be returned. More...
 
static void SetObject (int i, GameObject obj)
 Sets an object in the list. More...
 

Static Public Attributes

static Vector2 ScreenSize
 Gets or sets the screen-size used for the objects like Camera2D, ExitFade... More...
 
static bool RequestExit
 If true, the game will close next frame. More...
 

Properties

static List< GameObjectGameObjects [get, set]
 Contains the objects. Note this is a System.Collections.Generic.List (a linked list) More...
 

Detailed Description

Contains methods and fields for managing game objects.

Member Function Documentation

◆ DrawModel()

static void _3DRadSpaceDll.Game.DrawModel ( Model  model,
Matrix  world,
Matrix  view,
Matrix  projection,
bool  FogEnabled = false,
Vector3  FogColor = default,
float  FogStart = 0,
float  FogEnd = 0 
)
static

Draws a 3D Model.

Parameters
model3D Model
worldScale*Rotaion*Position Matrix
viewView matrix
projectionProjection Matrix
FogEnabledAllows Fog effects on the model
FogColorFog colour if allowed
FogStartFog Start Distance
FogEndFog End Distance

◆ FindObject() [1/2]

static object _3DRadSpaceDll.Game.FindObject ( int  i)
static

Finds an objects after it's id.

Time complexity is O(n) since GameObjects is a linked list.

Parameters
iNumeric indentifier.
Returns
Returns the found object.

◆ FindObject() [2/2]

static object _3DRadSpaceDll.Game.FindObject ( string  Name)
static

Finds an objects after it's name. If objects have the same name, the object with the lowest numerical ID will be returned.

Time complexity in the worst case is about O(n^2)

Parameters
NameObject's name
Returns
Returns the object, else null.

◆ SetObject()

static void _3DRadSpaceDll.Game.SetObject ( int  i,
GameObject  obj 
)
static

Sets an object in the list.

Parameters
iObject unique numeric (ID)entifier / array index

Time complexity is O(n), since the objects are stored in a linked list.

Parameters
objValue

Member Data Documentation

◆ RequestExit

bool _3DRadSpaceDll.Game.RequestExit
static

If true, the game will close next frame.

◆ ScreenSize

Vector2 _3DRadSpaceDll.Game.ScreenSize
static

Gets or sets the screen-size used for the objects like Camera2D, ExitFade...

Property Documentation

◆ GameObjects

List<GameObject> _3DRadSpaceDll.Game.GameObjects
staticgetset

Contains the objects. Note this is a System.Collections.Generic.List (a linked list)