using System;
using Otter;

namespace KellysMarvelousAdventure.entities
{
    class ClickyBackground : Entity
    {
        private Spritemap<string> _spriteMap;

        public ClickyBackground(float x, float y)
        {
            X = x; Y = y;
            _spriteMap = new Spritemap<string>(Assets.CLICKYBACKGROUND, 200, 480);
            _spriteMap.Add("main", new int[] { 0, 1 ,2 }, new float[] { 3, 3 });
            _spriteMap.Play("main");
            Graphic = _spriteMap;
            Layer = -1;
        }
        public override void Update()
        {
            base.Update();
            X = Scene.CameraX + 520;
            Y = Scene.CameraY + 0;
            if (_spriteMap.CurrentAnim == "main" && _spriteMap.CurrentFrameIndex == 2)
                RemoveSelf();
        }
    }
}
