Ejemplo n.º 1
0
 /// <summary>
 /// Register a <see cref="Scene"/> to be managed by Morro.
 /// </summary>
 /// <param name="scene">The scene you want to be registered.</param>
 public static void RegisterScene(Scene scene)
 {
     scenes.Register(scene.Name, scene);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Load a <see cref="Texture2D"/> into memory.
 /// </summary>
 /// <param name="name">The name that the image being loaded will be referenced as.</param>
 /// <param name="path">The relative path to the image contained in the Content folder.</param>
 public static void LoadImage(string name, string path)
 {
     textures.Register(name, Engine.Instance.Content.Load <Texture2D>(path));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Load a <see cref="SoundEffect"/> into memory.
 /// </summary>
 /// <param name="name">The name that the .wav file being loaded will be referenced as.</param>
 /// <param name="path">The relative path to the .wav file contained in the Content folder.</param>
 public static void LoadSoundEffect(string name, string path)
 {
     soundEffects.Register(name, Engine.Instance.Content.Load <SoundEffect>(path));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Save an <see cref="InputProfile"/> for future reference.
 /// </summary>
 /// <param name="profile"> The input profile that should be saved.</param>
 public static void SaveProfile(InputProfile profile)
 {
     profiles.Register(profile.Name, profile);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Load a <see cref="BMFont"/> into memory.
 /// </summary>
 /// <param name="name">The name that the BMFont being loaded will be referenced as.</param>
 /// <param name="path">The relative path to the BMFont contained in the Content folder.</param>
 public static void LoadFont(string name, string path)
 {
     fonts.Register(name, Engine.Instance.Content.Load <BMFont>(path));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Register <see cref="GeometryData"/> to be managed by Morro.
 /// </summary>
 /// <param name="name">The name that the shape data being registered will be referenced as.</param>
 /// <param name="shapeData">The shape data you want to be registered.</param>
 public static void RegisterShapeData(string name, GeometryData shapeData)
 {
     shapes.Register(name, shapeData);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Register new <see cref="SpriteData"/> to be managed by Morro.
 /// </summary>
 /// <param name="name">The name the new sprite data should have.</param>
 /// <param name="x">The pixel coordinate's x-value, relative the spritesheet's top-left, that the sprite should start at.</param>
 /// <param name="y">The pixel coordinate's y-value, relative the spritesheet's top-left, that the sprite should start at.</param>
 /// <param name="width">The width of the sprite.</param>
 /// <param name="height">The height of the sprite.</param>
 /// <param name="spriteSheet">The name of the image registered via <see cref="AssetManager.LoadImage(string, string)"/> that the sprite data is referencing.</param>
 public static void RegisterSpriteData(string name, int x, int y, int width, int height, string spriteSheet)
 {
     spriteDataLookup.Register(name, new SpriteData(x, y, width, height, spriteSheet));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Register a <see cref="DebugEntry"/> to be managed by Morro.
 /// </summary>
 /// <param name="debugEntry">The debug entry you want to register.</param>
 public static void RegisterDebugEntry(DebugEntry debugEntry)
 {
     debugEntries.Register(debugEntry.Name, debugEntry);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Register a <see cref="Camera"/> to be managed by Morro.
 /// </summary>
 /// <param name="camera">The camera you want to be registered.</param>
 public static void RegisterCamera(Camera camera)
 {
     cameras.Register(camera.Name, camera);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Load a <see cref="Effect"/> into memory.
 /// </summary>
 /// <param name="name">The name that the effect being loaded will be referenced as.</param>
 /// <param name="path">The relative path to the effect contained in the Content folder.</param>
 public static void LoadEffect(string name, string path)
 {
     effects.Register(name, contentManager.Load <Effect>(path));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Load a <see cref="Texture2D"/> into memory.
 /// </summary>
 /// <param name="name">The name that the image being loaded will be referenced as.</param>
 /// <param name="path">The relative path to the image contained in the Content folder.</param>
 public static void LoadImage(string name, string path)
 {
     textures.Register(name, contentManager.Load <Texture2D>(path));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Load a <see cref="Model"/> into memory.
 /// </summary>
 /// <param name="name">The name that the model being loaded will be referenced as.</param>
 /// <param name="path">The relative path to the model contained in the Content folder.</param>
 public static void LoadModel(string name, string path)
 {
     models.Register(name, contentManager.Load <Model>(path));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Load a <see cref="SpriteAtlas"/> into memory.
 /// </summary>
 /// <param name="name">The name that the sprite atlas being loaded will be referenced as.</param>
 /// <param name="path">The relative path to the sprite atlas contained in the Content folder.</param>
 public static void LoadSpriteAtlas(string name, string path)
 {
     atlases.Register(name, contentManager.Load <SpriteAtlas>(path).LoadSpriteSheet(path));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Load a <see cref="BMFont"/> into memory.
 /// </summary>
 /// <param name="name">The name that the BMFont being loaded will be referenced as.</param>
 /// <param name="path">The relative path to the BMFont contained in the Content folder.</param>
 public static void LoadFont(string name, string path)
 {
     fonts.Register(name, contentManager.Load <BMFont>(path).LoadPages(path));
 }