C# Class SuperCaissiere.Engine.Content.MagicContentManager

Load and buffer content item of the game. Content items are declared on class that required them.
Inheritance: Manager
显示文件 Open project: valryon/super-caissiere

Public Methods

Method Description
AddTexture ( string id, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : void

External texture add (Ogmo for example)

Draw ( GameTime gameTime ) : void
GetModel ( String id ) : Model3DContentItem
GetMusic ( String id ) : SuperCaissiere.Engine.Content.SongContentItem

Retrieve a music from its ID

GetSound ( ) : SoundEffect

Retrieve a sound from one of the given ID, choosen randonly

GetSound ( String id ) : SoundEffect

Retrieve a sound from its ID

GetTexture ( String id ) : Microsoft.Xna.Framework.Graphics.Texture2D

Retrieve a texture from its ID

Initialize ( ) : void
MagicContentManager ( Assembly assemblies, Microsoft.Xna.Framework.Content.ContentManager Content ) : System

Assemblies to look at for the content load

Update ( GameTime gameTime ) : void

Private Methods

Method Description
GetContent ( String id ) : SuperCaissiere.Engine.Content.ContentItem

Get a content from its Asset Name

addContentItem ( SuperCaissiere.Engine.Content.ContentItem ci ) : void
loadAllContent ( ) : void

Load every content that will be required later

loadContent ( SuperCaissiere.Engine.Content.ContentItem item ) : void

Method Details

AddTexture() public method

External texture add (Ogmo for example)
public AddTexture ( string id, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : void
id string
texture Microsoft.Xna.Framework.Graphics.Texture2D
return void

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

GetModel() public method

public GetModel ( String id ) : Model3DContentItem
id String
return Model3DContentItem

GetMusic() public method

Retrieve a music from its ID
public GetMusic ( String id ) : SuperCaissiere.Engine.Content.SongContentItem
id String
return SuperCaissiere.Engine.Content.SongContentItem

GetSound() public method

Retrieve a sound from one of the given ID, choosen randonly
public GetSound ( ) : SoundEffect
return Microsoft.Xna.Framework.Audio.SoundEffect

GetSound() public method

Retrieve a sound from its ID
public GetSound ( String id ) : SoundEffect
id String
return Microsoft.Xna.Framework.Audio.SoundEffect

GetTexture() public method

Retrieve a texture from its ID
public GetTexture ( String id ) : Microsoft.Xna.Framework.Graphics.Texture2D
id String
return Microsoft.Xna.Framework.Graphics.Texture2D

Initialize() public method

public Initialize ( ) : void
return void

MagicContentManager() public method

Assemblies to look at for the content load
public MagicContentManager ( Assembly assemblies, Microsoft.Xna.Framework.Content.ContentManager Content ) : System
assemblies System.Reflection.Assembly
Content Microsoft.Xna.Framework.Content.ContentManager
return System

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void