GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • Game
      • GameElement
      • GameEventHandler
      • GenesisWindow
      • IGameBehavior
      • Input
      • Layer
      • Light
      • Scene
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • CapsuleCollider
      • ConvexHullBehavior
      • QubeConvexHull
      • SphereCollider
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • Model
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
    • Genesis.Graphics
      • Animation
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Glyphe
      • IRenderDevice
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • Shader
      • ShaderProgram
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • ClassicGL
      • GLRenderer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • FrameShape
      • GlypheShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • HitResult
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Raycast
    • Genesis.UI
      • Canvas
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget

    Class GameElement

    Represents a base class for game elements in the Genesis framework.

    Inheritance
    object
    GameElement
    BufferedSprite
    CameraElement
    Element3D
    Empty
    Model
    ParticleEmitter
    Qube
    RectElement
    Sprite
    Terrain2D
    Terrain3D
    Light
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Core
    Assembly: Genesis.dll
    Syntax
    public abstract class GameElement

    Constructors

    GameElement()

    Creates a new instance of the GameElement class.

    Declaration
    public GameElement()

    Properties

    Behaviors

    Gets or sets the list of behaviors associated with the game element.

    Declaration
    public List<IGameBehavior> Behaviors { get; set; }
    Property Value
    Type Description
    List<IGameBehavior>

    Children

    Gets or sets the list of child game elements.

    Declaration
    public List<GameElement> Children { get; set; }
    Property Value
    Type Description
    List<GameElement>

    Enabled

    Gets or sets a value indicating whether the game element is enabled.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    bool

    Location

    Gets or sets the 3D coordinates of the game element.

    Declaration
    public Vec3 Location { get; set; }
    Property Value
    Type Description
    Vec3

    Name

    Gets or sets the name of the game element.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string

    Parent

    Gets or sets the parent game element.

    Declaration
    public GameElement Parent { get; set; }
    Property Value
    Type Description
    GameElement

    Propertys

    Gets or sets the properties associated with the game element.

    Declaration
    public Dictionary<string, object> Propertys { get; set; }
    Property Value
    Type Description
    Dictionary<string, object>

    Rotation

    Gets or sets the 3D rotation of the game element.

    Declaration
    public Vec3 Rotation { get; set; }
    Property Value
    Type Description
    Vec3

    Scene

    Gets or sets the scene to which the game element belongs.

    Declaration
    public Scene Scene { get; set; }
    Property Value
    Type Description
    Scene

    Size

    Gets or sets the 3D size of the game element.

    Declaration
    public Vec3 Size { get; set; }
    Property Value
    Type Description
    Vec3

    Tag

    Gets or sets the tag associated with the game element.

    Declaration
    public string Tag { get; set; }
    Property Value
    Type Description
    string

    UUID

    Gets or sets the unique identifier for the game element.

    Declaration
    public string UUID { get; set; }
    Property Value
    Type Description
    string

    Methods

    AddBehavior(IGameBehavior)

    Adds a behavior to the game element.

    Declaration
    public void AddBehavior(IGameBehavior behavior)
    Parameters
    Type Name Description
    IGameBehavior behavior

    The behavior to be added.

    AddBehavior<T>(T)

    Adds a behavior of type T to the game element and returns it.

    Declaration
    public T AddBehavior<T>(T behavior) where T : IGameBehavior
    Parameters
    Type Name Description
    T behavior

    The behavior to be added.

    Returns
    Type Description
    T

    The added behavior of type T.

    Type Parameters
    Name Description
    T

    The type of the behavior.

    AddChild(GameElement)

    Adds a child game element to the current game element.

    Declaration
    public void AddChild(GameElement element)
    Parameters
    Type Name Description
    GameElement element

    The child game element to be added.

    GetBehavior<T>()

    Gets the first game behavior of type T.

    Declaration
    public IGameBehavior GetBehavior<T>()
    Returns
    Type Description
    IGameBehavior

    The first game behavior of type T, or null if not found.

    Type Parameters
    Name Description
    T

    The type of the behavior.

    GetBehaviors<T>()

    Returns all behaviors of type T.

    Declaration
    public List<IGameBehavior> GetBehaviors<T>()
    Returns
    Type Description
    List<IGameBehavior>

    A list of all behaviors of type T.

    Type Parameters
    Name Description
    T

    The type of the behavior.

    GetInstance(GameElement)

    Copies the properties from another game element instance to the current one.

    Declaration
    public virtual void GetInstance(GameElement element)
    Parameters
    Type Name Description
    GameElement element

    The game element from which to copy properties.

    Init(Game, IRenderDevice)

    Called when the game is initialized.

    Declaration
    public virtual void Init(Game game, IRenderDevice renderDevice)
    Parameters
    Type Name Description
    Game game

    The game instance.

    IRenderDevice renderDevice

    The rendering device.

    OnDestroy(Game)

    Called when the game element is disposed.

    Declaration
    public virtual void OnDestroy(Game game)
    Parameters
    Type Name Description
    Game game

    The game instance.

    OnRender(Game, IRenderDevice)

    Called when the game is rendered.

    Declaration
    public virtual void OnRender(Game game, IRenderDevice renderDevice)
    Parameters
    Type Name Description
    Game game

    The game instance.

    IRenderDevice renderDevice

    The rendering device.

    OnUpdate(Game, IRenderDevice)

    Called when the game is updated.

    Declaration
    public virtual void OnUpdate(Game game, IRenderDevice renderDevice)
    Parameters
    Type Name Description
    Game game

    The game instance.

    IRenderDevice renderDevice

    The rendering device.

    In this article
    Back to top Generated by DocFX