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

Camera class for 2D projects. Used to draw 2D scenes. More...

Inheritance diagram for _3DRadSpaceDll.Camera2D:
_3DRadSpaceDll.GameObject

Public Member Functions

 Camera2D (string name, bool enabled, Vector2 Pos, Vector2 Size)
 Camera2D constructor. More...
 
 Camera2D ()
 Empty Camera2D Constructor. More...
 
void Add (object obj)
 Adds an object to be drawn by the camera. More...
 
override void Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Draws the entire scene. More...
 
- 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 EditorDraw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection)
 Object draw code for the 3DRadSpace editor More...
 
virtual void Update (MouseState mouse, KeyboardState keyboard, GameTime time)
 Object update logic 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

Rectangle DrawingBounds [get, set]
 Camera drawing bounds. 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...
 

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...
 
- 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...
 
- 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...
 

Detailed Description

Camera class for 2D projects. Used to draw 2D scenes.

Constructor & Destructor Documentation

◆ Camera2D() [1/2]

_3DRadSpaceDll.Camera2D.Camera2D ( string  name,
bool  enabled,
Vector2  Pos,
Vector2  Size 
)

Camera2D constructor.

Parameters
nameObject name
enabledIs the camera drawing the scene?
PosPosition
SizeSize

◆ Camera2D() [2/2]

_3DRadSpaceDll.Camera2D.Camera2D ( )

Empty Camera2D Constructor.

Member Function Documentation

◆ Add()

void _3DRadSpaceDll.Camera2D.Add ( object  obj)

Adds an object to be drawn by the camera.

Parameters
objObject to be added.

◆ Draw()

override void _3DRadSpaceDll.Camera2D.Draw ( SpriteBatch  spriteBatch,
Matrix?  view,
Matrix?  projection 
)
virtual

Draws the entire scene.

Parameters
spriteBatchGame's sprite batch.
viewNot used, use the null value.
projectionNot used, use the null value.

Reimplemented from _3DRadSpaceDll.GameObject.

Property Documentation

◆ DrawingBounds

Rectangle _3DRadSpaceDll.Camera2D.DrawingBounds
getset

Camera drawing bounds.