/// <summary> /// Initializes a new instance of the <see cref="XnaMap"/> class. /// </summary> /// <param name="path">The path.</param> /// <param name="backgrounddata">The background's spritebatch data.</param> /// <param name="foregrounddata">The foreground's spritebatch data.</param> /// <param name="backdropdata">The backdrop's spritebatch data.</param> /// <param name="foredropdata">The foredrop's spritebatch data.</param> public XnaMap(string path, SpriteBatchData backgrounddata, SpriteBatchData foregrounddata, SpriteBatchData backdropdata, SpriteBatchData foredropdata) : base(path) { if (backgrounddata == null) { BackgroundData = new SpriteBatchData(); } else { BackgroundData = backdropdata; } if (foregrounddata == null) { ForegroundData = new SpriteBatchData(); } else { ForegroundData = foregrounddata; } if (backdropdata == null) { BackdropData = new SpriteBatchData(); } else { BackdropData = backdropdata; } if (foredropdata == null) { ForedropData = new SpriteBatchData(); } else { ForedropData = foredropdata; } ConvertEntities(); }
/// <summary> /// Initializes a new instance of the <see cref="XnaMap" /> class. /// </summary> /// <param name="path">The path.</param> /// <param name="usehitboxcache">Whether or not to use the hitbox cache.</param> /// <param name="backgrounddata">The background's spritebatch data.</param> /// <param name="foregrounddata">The foreground's spritebatch data.</param> /// <param name="backdropdata">The backdrop's spritebatch data.</param> /// <param name="foredropdata">The foredrop's spritebatch data.</param> public XnaMap(string path, bool usehitboxcache, SpriteBatchData backgrounddata, SpriteBatchData foregrounddata, SpriteBatchData backdropdata, SpriteBatchData foredropdata) : this(path, backgrounddata, foregrounddata, backdropdata, foredropdata) { UseHitboxCache = usehitboxcache; if (usehitboxcache) { CreateHitboxCache(); } }
/// <summary> /// Initializes a new instance of the <see cref="XnaEntity"/> class. /// </summary> /// <param name="animationcache">The animationcache.</param> /// <param name="hitbox">The hitbox.</param> /// <param name="spritebatchdata">The spritebatchdata.</param> public XnaEntity(AnimationCache animationcache, Rectangle hitbox, SpriteBatchData spritebatchdata) : base(animationcache, hitbox) { SpriteBatchData = spritebatchdata; }