![]() |
3DRadSpace
v1.0.0a
Scripting documentation
|
2D Screen images class. More...
Public Member Functions | |
Sprite (string name, bool active, string resource, Vector2 pos, Vector2 scale, Vector2 center_rot=default, float rotation=0, Rectangle? section=default, Color mask=default, SpriteEffects effects=default, int layer=1) | |
Sprite object constructor. More... | |
Sprite () | |
Empty Sprite constructor. More... | |
void | Load (ContentManager content, GraphicsDevice gd) |
Loads the texture. Notice this is not overloading the function from the GameObject class. More... | |
override void | Draw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection) |
Draws the sprite. More... | |
override void | EditorDraw (SpriteBatch spriteBatch, Matrix? view, Matrix? projection) |
Drawing the sprite but for the editor. More... | |
override void | Update (MouseState mouse, KeyboardState keyboard, GameTime time) |
Updates the sprite (if it is clicked) More... | |
void | Dispose () |
Frees the loaded texture. 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 | Load (ContentManager content) |
Loads the resource(s). 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... | |
Protected Member Functions | |
void | Dispose (bool disposing) |
Protected Dispose(). More... | |
Properties | |
bool | IsUsedByCam2D [get, set] |
Checks if this object is being used by a Camera2D. More... | |
Texture2D | Texture [get] |
Texture used to draw the sprite. More... | |
Vector2 | Size [get, set] |
Size of the sprite. More... | |
new float | Rotation [get, set] |
Rotation of the sprite in radians. More... | |
new Vector2 | Position [get, set] |
Position of the sprite More... | |
Rectangle? | SpriteSheetSection [get, set] |
Section of a sprite sheet. If not used, set this to null; More... | |
Color | Mask [get, set] |
Color mask. More... | |
Vector2 | Center [get, set] |
Center of rotation. More... | |
SpriteEffects | Effects [get, set] |
Effects applied to the sprite. More... | |
float | Layer [get, set] |
Layer depth of the sprite. 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... | |
Events | |
onClick | OnClick |
Event called if the sprite is clicked 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... | |
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... | |
2D Screen images class.
_3DRadSpaceDll.Sprite.Sprite | ( | string | name, |
bool | active, | ||
string | resource, | ||
Vector2 | pos, | ||
Vector2 | scale, | ||
Vector2 | center_rot = default , |
||
float | rotation = 0 , |
||
Rectangle? | section = default , |
||
Color | mask = default , |
||
SpriteEffects | effects = default , |
||
int | layer = 1 |
||
) |
_3DRadSpaceDll.Sprite.Sprite | ( | ) |
Empty Sprite constructor.
void _3DRadSpaceDll.Sprite.Dispose | ( | ) |
Frees the loaded texture.
|
protected |
Protected Dispose().
disposing |
|
virtual |
Draws the sprite.
spriteBatch | spriteBatch used for drawing. |
view | Use a null value. |
projection | Use a null value. |
Reimplemented from _3DRadSpaceDll.GameObject.
|
virtual |
Drawing the sprite but for the editor.
spriteBatch | |
view | |
projection |
Reimplemented from _3DRadSpaceDll.GameObject.
void _3DRadSpaceDll.Sprite.Load | ( | ContentManager | content, |
GraphicsDevice | gd | ||
) |
Loads the texture. Notice this is not overloading the function from the GameObject class.
content | Content manager. |
gd | Graphics device. Expected to be given by the editor. |
|
virtual |
Updates the sprite (if it is clicked)
mouse | |
keyboard | |
time |
Reimplemented from _3DRadSpaceDll.GameObject.
|
getset |
Center of rotation.
|
getset |
Effects applied to the sprite.
|
getset |
Checks if this object is being used by a Camera2D.
|
getset |
Layer depth of the sprite.
|
getset |
Color mask.
|
getset |
Position of the sprite
|
getset |
Rotation of the sprite in radians.
|
getset |
Size of the sprite.
|
getset |
Section of a sprite sheet. If not used, set this to null;
|
get |
Texture used to draw the sprite.
onClick _3DRadSpaceDll.Sprite.OnClick |
Event called if the sprite is clicked