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 AssetManager

    Manages game assets such as textures and fonts.

    Inheritance
    object
    AssetManager
    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 class AssetManager

    Constructors

    AssetManager()

    Initializes a new instance of the AssetManager class.

    Declaration
    public AssetManager()

    Properties

    Fonts

    List of loaded fonts.

    Declaration
    public List<Font> Fonts { get; set; }
    Property Value
    Type Description
    List<Font>

    Textures

    List of loaded textures.

    Declaration
    public List<Texture> Textures { get; set; }
    Property Value
    Type Description
    List<Texture>

    Methods

    AddFont(Font)

    Adds an font

    Declaration
    public void AddFont(Font font)
    Parameters
    Type Name Description
    Font font

    the font to add

    AddTexture(string, Bitmap)

    Adds a texture to the asset manager.

    Declaration
    public Texture AddTexture(string name, Bitmap bitmap)
    Parameters
    Type Name Description
    string name

    The name of the texture.

    Bitmap bitmap

    The bitmap representing the texture.

    Returns
    Type Description
    Texture

    The added texture.

    DisposeTextures(Game)

    Disposes of the loaded textures and fonts.

    Declaration
    public void DisposeTextures(Game game)
    Parameters
    Type Name Description
    Game game

    The game object associated with the assets.

    GetFont(string)

    Gets a font by name.

    Declaration
    public Font GetFont(string name)
    Parameters
    Type Name Description
    string name

    The name of the font.

    Returns
    Type Description
    Font

    The font with the specified name, or null if not found.

    GetRessourcesDirectory()

    Gets the resource directory path.

    Declaration
    public static string GetRessourcesDirectory()
    Returns
    Type Description
    string

    The path to the resource directory.

    GetTexture(string)

    Gets a texture by name.

    Declaration
    public Texture GetTexture(string name)
    Parameters
    Type Name Description
    string name

    The name of the texture.

    Returns
    Type Description
    Texture

    The texture with the specified name, or null if not found.

    ImportAssetLibary(string)

    Imports assets from an asset library.

    Declaration
    public void ImportAssetLibary(string file)
    Parameters
    Type Name Description
    string file

    The file path of the asset library to import.

    Init(IRenderDevice)

    Initializes the assets in the rendering device.

    Declaration
    public void Init(IRenderDevice renderDevice)
    Parameters
    Type Name Description
    IRenderDevice renderDevice

    The rendering device to load the assets into.

    LoadFonts()

    Loads fonts from the resource folder.

    Declaration
    public void LoadFonts()

    LoadSystemFont(string)

    Loads a system font

    Declaration
    public void LoadSystemFont(string font)
    Parameters
    Type Name Description
    string font

    LoadTextures()

    Loads textures from the resource folder.

    Declaration
    public void LoadTextures()

    PackAssets(string)

    Packs the assets into an asset library.

    Declaration
    public void PackAssets(string file)
    Parameters
    Type Name Description
    string file

    The file path to save the asset library.

    In this article
    Back to top Generated by DocFX