Vertices Engine  v1.9.2.92
A Cross Platform game engine developed by Virtex Edge Design.
Loading...
Searching...
No Matches
VerticesEngine.Particles.vxParticle2D Class Reference

2D Particle Object for use in the vxParticleSystem2D Manager Class. More...

Inheritance diagram for VerticesEngine.Particles.vxParticle2D:
VerticesEngine.vxEntity2D VerticesEngine.Particles.vxIParticle VerticesEngine.vxEntity VerticesEngine.vxGameObject VerticesEngine.vxISelectable

Public Member Functions

 vxParticle2D (vxGameplayScene2D Scene, Rectangle Source, int index)
 Initializes a new instance of the T:VerticesEngine.Particles.vxParticle2D class.
 
vxIParticle Spawn (vxGameObject emitter)
 
void UpdateParticle ()
 
virtual vxIParticle OnParticleSpawned (vxGameObject emitter)
 Activates the particle in the pool as if it was new.
 
vxIParticle Despawn ()
 
- Public Member Functions inherited from VerticesEngine.vxEntity2D
virtual void ResetGravity ()
 
virtual void PreSave ()
 Preps for save.
 
 vxEntity2D (vxGameplayScene2D Scene, Texture2D sprite)
 Initializes a new instance of the T:VerticesEngine.Entities.vxEntity2D class.
 
virtual Texture2D GetSpriteSheet ()
 Get's this entities Sprite Sheet. the Default is 'vxGraphics.MainSpriteSheet'. Override to use your own static sprite sheets, but you must batch your entities which use the same sprite sheet together.
 
 vxEntity2D (vxGameplayScene2D Scene, Rectangle spriteSheetLocation, Vector2 Position)
 Initializes a new instance of the T:VerticesEngine.Entities.vxEntity2D class.
 
 vxEntity2D (vxGameplayScene2D Scene, Texture2D texture, Vector2 position)
 Initializes a new instance of the T:VerticesEngine.Entities.vxEntity2D class.
 
 vxEntity2D (vxGameplayScene2D Scene, Texture2D texture, Vector2 position, Vector2 origin)
 Initializes a new instance of the T:VerticesEngine.Entities.vxEntity2D class.
 
virtual void DrawDistoriton ()
 
virtual bool OnEntityCollision (Fixture fixtureA, Fixture fixtureB, Contact contact)
 
virtual void OnEntitySeparation (Fixture fixtureA, Fixture fixtureB)
 
void Draw (vxCamera camera, string renderpass)
 Draw this instance.
 
void PlayAnimation (vxAnimationSprite2D animationSpriteSheet)
 Begins or continues playback of an animation. Only one animation can be played by an entity at a time. If you need more than one animation, then create a seperate entity to handle that.
 
void PlayAnimation (vxAnimationSprite2D animationSpriteSheet, Vector2 Offset)
 Begins or continues playback of an animation. Only one animation can be played by an entity at a time. If you need more than one animation, then create a seperate entity to handle that.
 
void StopAnimation ()
 Stops the currently playing Animation.
 
virtual void DrawAnimation ()
 Advances the time position and draws the current frame of the animation.
 
Body GetBodyFromTexture (Texture2D texture, World world, BodyType bodyType)
 Gets the body from texture.
 
Vector2 GetRotatedVector (float rotation)
 Gets the rotated vector.
 
- Public Member Functions inherited from VerticesEngine.vxEntity
bool HasSandboxOption (SandboxOptions option)
 
 vxEntity (vxGameplaySceneBase scene)
 Initializes a new instance of the VerticesEngine.Entities.vxEntity class. The Base Entity Object for the Engine.
 
virtual object Clone ()
 Clones this Entity.
 
virtual void OnNewItemAdded (string itmekey)
 
AddComponent< T > ()
 Add's a component to this entitiy.
 
GetComponent< T > ()
 Get's a component from the collection.
 
virtual void GetPropertyInfo (vxPropertiesControl propertyControl)
 
virtual void OnBeforeEntitySerialize ()
 A method which allows for certain opperations to be preformed just before the entity is saved to a file.
 
virtual void OnAfterEntityDeserialized ()
 A method which allows for certain opperations to be preformed after the entity is loaded from a file.
 
CastAs< T > ()
 
- Public Member Functions inherited from VerticesEngine.vxGameObject
virtual void OnEnabled ()
 Called on Component Enabled.
 
virtual void OnDisabled ()
 Called on Component Disabled.
 
virtual void OnSelected ()
 Called when Selected.
 
virtual void OnUnSelected ()
 Called when Unselected.
 
virtual string GetTitle ()
 Gets the title.
 
virtual Texture2D GetIcon (int w, int h)
 Gets the icon for this game object. Override this to provide per-entity cusomtization.
 
 vxGameObject ()
 Creates a new vxGameObject.
 
void Dispose ()
 Dispposes this Object.
 
virtual void OnGraphicsRefresh ()
 Called when there is a reset or refresh of Graphic settings such as resolution or setting.
 

Public Attributes

vxEnumParticleLayer _particleLayer = vxEnumParticleLayer.Front
 
Rectangle Source
 
int index = 0
 The index of this particle in the pool.
 
- Public Attributes inherited from VerticesEngine.vxEntity2D
float Scale = 1f
 The scale.
 
Body _physicsBody
 
SpriteEffects SpriteEffect
 The items sprite effect which dictates which direction it faces (left or right)
 
Vector2 Origin = new Vector2(0)
 Texture Origina.
 
float Alpha = 1
 Entity Alpha value.
 
float Alpha_Req = 1
 Requested Entity Alpha value for smooth change.
 
int AlphaChnageSteps = 4
 The alpha chnage steps.
 
float LayerDepth = 0
 Sets the Texture Layer Depth.
 
Color DisplayColor = Color.White
 The display color of the Entity.
 
Rectangle Bounds = new Rectangle()
 The bounding rectangle.
 
float Highlite = 1
 The highlite value.
 
string UserDefinedData01 = ""
 
string UserDefinedData02 = ""
 
string UserDefinedData03 = ""
 
string UserDefinedData04 = ""
 
string UserDefinedData05 = ""
 
bool IsSaveable = true
 Should the entity be saved? Some are owned or created by other entities, so there is not point in saving them as well.
 
vxAnimationSprite2D AnimationSpriteSheet
 Gets or Sets the animation sprite sheet which is currently playing.
 
int FrameIndex
 Gets the index of the current frame in the animation.
 
Vector2 AnimationOrigin
 Gets a texture origin at the bottom center of each frame.
 
vxGameplayScene2D Scene
 
Rectangle SpriteSourceRectangle
 The main source rectangle.
 
float AnimationScale = 1.0f
 
- Public Attributes inherited from VerticesEngine.vxEntity
SandboxOptions EntitySandboxOptions
 Options for this entity in the sandbox. I.e. is it saveable, is it cullable, etc...
 
bool KeepUpdating = true
 Whether or not too keep Updating the current Entity.
 
bool RenderEvenInDebug = false
 Should it be Rendered in Debug.
 
- Public Attributes inherited from VerticesEngine.vxGameObject
bool OnlySelectInSandbox = false
 

Protected Member Functions

virtual vxIParticle OnParticleDespawned ()
 Called when the particle is despawned.
 
override void OnDisposed ()
 Disposes the entity.
 
- Protected Member Functions inherited from VerticesEngine.vxEntity2D
virtual void OnPositionUpdate (Vector2 oldPos, Vector2 newPos)
 
override vxEntityRenderer CreateRenderer ()
 
- Protected Member Functions inherited from VerticesEngine.vxEntity
void AddSandboxOption (SandboxOptions option)
 
void RemoveSandboxOption (SandboxOptions option)
 
override void OnVisibilityChanged ()
 Called when an Objects Visibility Changes.
 
virtual vxMaterial OnMapMaterialToMesh (vxModelMesh mesh)
 Applies the materials to the a corresponding mesh in the mesh renderer.
 
virtual void OnFirstUpdate ()
 
virtual void MarkForDisposal ()
 
- Protected Member Functions inherited from VerticesEngine.vxGameObject
virtual bool HasId ()
 
virtual void OnSelectionStateChange ()
 Called when the selection state changes.
 
virtual string GetIdPrefix ()
 

Properties

bool IsAlive [get, set]
 Boolean of whether to keep the Particle Alive or not.
 
vxEnumParticleLayer ParticleLayer [get, set]
 Is the particle infront or behind the scene.
 
- Properties inherited from VerticesEngine.vxEntity2D
Texture2D MainSpriteSheet [get, set]
 Gets the main sprite sheet used by this entity.
 
Vector2 Position [get, set]
 Gets or sets the 2D Position of the entity.
 
float Rotation [get, set]
 Gets or sets the float Rotation of the entity.
 
bool IgnoreGravity [get, set]
 
Vector2 Velocity [get, set]
 Gets the velocity.
 
Vector2 PreviousVelocity [get]
 The previous velocity.
 
Body PhysicCollider [get, set]
 The Farseer Physics Body (Note, it's not used in all instances of this class, so do a !=null check)
 
World PhysicsSimulation [get]
 The world.
 
Texture2D Texture [get, set]
 Gets or sets the texture of the Entity.
 
bool UsesSpriteSheet [get, set]
 Gets a value indicating whether this T:VerticesEngine.Entities.vxEntity2D uses sprite sheet.
 
- Properties inherited from VerticesEngine.vxEntity
vxGameplaySceneBase CurrentScene [get]
 Gets the current scene of the game.
 
List< vxComponentComponents [get]
 List of Components attached to this Entity.
 
vxTransform Transform [get, set]
 The transform for this entity.
 
BoundingSphere BoundingShape [get]
 The Bounding Sphere which is used to do frustrum culling.
 
bool IsEntityCullable [get, set]
 Should this entity be checked for culling. Items like the Sky box shouldn't ever be.
 
vxEntityRenderer EntityRenderer [get]
 
- Properties inherited from VerticesEngine.vxGameObject
bool IsVisible [get, set]
 Is this Game Object currently visible? Note that an Object can be Enabled, but not visible.
 
bool IsEnabled [get, set]
 Is this Game Object Enabled currently.
 
string Id [get, set]
 A unqiue string id which allows references to items to be serialised between sessions.
 
Texture2D DefaultTexture [get]
 Gets the default texture.
 
vxEnumSandboxStatus SandboxState [get]
 State of the Entity which is triggered by the simulation.
 
vxSelectionState SelectionState [get, set]
 Gets or sets the selection state.
 
vxSelectionState PreviousSelectionState [get]
 Get's the previous selection state.
 
bool IsDisposed [get]
 
- Properties inherited from VerticesEngine.Particles.vxIParticle

Additional Inherited Members

- Static Public Attributes inherited from VerticesEngine.vxGameObject
static List< string > NameRegister = new List<string>()
 The name register.
 
- Protected Attributes inherited from VerticesEngine.vxEntity2D
Vector2 _position = Vector2.Zero
 
bool ShouldIgnoreGravity = false
 
- Protected Attributes inherited from VerticesEngine.vxEntity
BoundingSphere m_boundingSphere = new BoundingSphere()
 
- Events inherited from VerticesEngine.vxEntity2D
EventHandler< EventArgs > OnAnimationBegin
 Occurs when on animation begin.
 
EventHandler< EventArgs > OnAnimationEnd
 Occurs when on animation end.
 
- Events inherited from VerticesEngine.vxGameObject
EventHandler< EventArgs > Selected
 Event Fired when the Items Selection stat Changes too Hovered.
 
EventHandler< EventArgs > UnSelected
 Event Fired when the Items Selection stat Changes too unselected (or unhovered)
 

Detailed Description

2D Particle Object for use in the vxParticleSystem2D Manager Class.

Constructor & Destructor Documentation

◆ vxParticle2D()

VerticesEngine.Particles.vxParticle2D.vxParticle2D ( vxGameplayScene2D Scene,
Rectangle Source,
int index )

Initializes a new instance of the T:VerticesEngine.Particles.vxParticle2D class.

Parameters
EngineEngine.
textureTexture.
StartPositionStart position.

Member Function Documentation

◆ Despawn()

vxIParticle VerticesEngine.Particles.vxParticle2D.Despawn ( )

◆ OnDisposed()

override void VerticesEngine.Particles.vxParticle2D.OnDisposed ( )
protectedvirtual

Disposes the entity.

Reimplemented from VerticesEngine.vxEntity2D.

◆ OnParticleDespawned()

virtual vxIParticle VerticesEngine.Particles.vxParticle2D.OnParticleDespawned ( )
protectedvirtual

Called when the particle is despawned.

Returns

◆ OnParticleSpawned()

virtual vxIParticle VerticesEngine.Particles.vxParticle2D.OnParticleSpawned ( vxGameObject emitter)
virtual

Activates the particle in the pool as if it was new.

Parameters
emitterThe Emiting Entity.

◆ Spawn()

vxIParticle VerticesEngine.Particles.vxParticle2D.Spawn ( vxGameObject emitter)

◆ UpdateParticle()

void VerticesEngine.Particles.vxParticle2D.UpdateParticle ( )

Property Documentation

◆ IsAlive

bool VerticesEngine.Particles.vxParticle2D.IsAlive
getset

Boolean of whether to keep the Particle Alive or not.

Implements VerticesEngine.Particles.vxIParticle.

◆ ParticleLayer

vxEnumParticleLayer VerticesEngine.Particles.vxParticle2D.ParticleLayer
getset

Is the particle infront or behind the scene.

Implements VerticesEngine.Particles.vxIParticle.


The documentation for this class was generated from the following file: