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

Executes an event everytime a 'period' passes for a number of times. More...

Inheritance diagram for _3DRadSpaceDll.Timer:

Public Member Functions

 Timer ()
 Empty Timer constructor. More...
 Timer (string name, bool enabled, uint period, uint repetitions)
 Main Timer constructor. More...
override void Update (MouseState mouse, KeyboardState keyboard, GameTime time)
- Public Member Functions inherited from _3DRadSpaceDll.GameObject
 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 Load (ContentManager content)
 Loads the resource(s). More...
virtual void Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Unloads the resource. 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...

Public Attributes

uint Period
 Defined the time in milliseconds between the timer event executions. More...
uint Repetitions
 Defines how many times the event will get called. More...
new List< OpcodeEvent.OpCodeCallBehiavours
 The event defined in the editor. More...
- Public Attributes inherited from _3DRadSpaceDll.GameObject
Vector3 Position
 Object position More...
Vector3 Rotation
 Rotation in a Euler angles system. More...
List< int > SelectedObjects
 Used for editor. More...

Static Public Attributes

const uint Infinity = uint.MaxValue
 Represents ∞ More...


uint TotalTime [get]
 Counts the time passed. More...
- Properties inherited from _3DRadSpaceDll.GameObject
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< ObjectBehiavourBehiavours [get, set]
 Relation with other objects More...
Quaternion RotationQuaternion [get]
 Rotation in a Quaterion system. More...
string Resource [get, set]
 Resource file More...


TimerEvent OnTimerRepetition
 Raised everytime a repetition is complete. More...
- Events inherited from _3DRadSpaceDll.GameObject
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...

Additional Inherited Members

- Static Public Member Functions inherited from _3DRadSpaceDll.GameObject
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...

Detailed Description

Executes an event everytime a 'period' passes for a number of times.

Constructor & Destructor Documentation

◆ Timer() [1/2]

_3DRadSpaceDll.Timer.Timer ( )

Empty Timer constructor.

◆ Timer() [2/2]

_3DRadSpaceDll.Timer.Timer ( string  name,
bool  enabled,
uint  period,
uint  repetitions 

Main Timer constructor.

nameName of the object.
enabledIf the timer will execute.
periodTimer period.
repetitionsHow much time the event will execute. Use
See also
to represent ∞ .

Member Function Documentation

◆ Update()

override void _3DRadSpaceDll.Timer.Update ( MouseState  mouse,
KeyboardState  keyboard,
GameTime  time 


Reimplemented from _3DRadSpaceDll.GameObject.

Member Data Documentation

◆ Behiavours

new List<OpcodeEvent.OpCodeCall> _3DRadSpaceDll.Timer.Behiavours

The event defined in the editor.

◆ Infinity

const uint _3DRadSpaceDll.Timer.Infinity = uint.MaxValue

Represents ∞

◆ Period

uint _3DRadSpaceDll.Timer.Period

Defined the time in milliseconds between the timer event executions.

◆ Repetitions

uint _3DRadSpaceDll.Timer.Repetitions

Defines how many times the event will get called.


See also
uint.MaxValue, Infinity

or to represent ∞ (infinity)

Property Documentation

◆ TotalTime

uint _3DRadSpaceDll.Timer.TotalTime

Counts the time passed.

Maximum value is

See also
Period, Repetitions


NOTE: Unsigned integer overflows will occur if the Period is a value representing ∞ (

See also


Event Documentation

◆ OnTimerRepetition

TimerEvent _3DRadSpaceDll.Timer.OnTimerRepetition

Raised everytime a repetition is complete.