/// <summary> /// Creates a new animation with default location 0,0 and depth 0.5f /// </summary> /// <param name="filename">The file to use as spritesheet</param> public Animation(String filename) { sheetname = filename; sheet = RenderingEngine.instance.addAnimation(this); currentSequence = 0; currentimage = 0; position = new Vector2(0, 0); depth = 0.5f; }
/// <summary> /// Creates a new animation /// </summary> /// <param name="filename">The file to use as spritesheet</param> /// <param name="position">The position for the animation</param> /// <param name="layerDepth">The layer depth of the images</param> public Animation(String filename, Vector2 position, float layerDepth) { sheetname = filename; sheet = RenderingEngine.instance.addAnimation(this); currentSequence = 0; currentimage = 0; this.position = position; depth = layerDepth; }