using Otter;
using System;

namespace PenniesAreGold.ui
{
    class UpperUI : Entity
    {
        private float startingPositionX = 0;
        private float startingPositionY = 0;
        private Spritemap<string> _spriteMap;

        public UpperUI(float x, float y)
        {
            X = x; Y = y;
            startingPositionX = x;
            startingPositionY = y;
            _spriteMap = new Spritemap<string>(Assets.BACKDROPUI, 720, 53);
            _spriteMap.Add("main", new int[] { 0 }, new float[] { 5f, 5f });
            _spriteMap.Play("main");
            Graphic = _spriteMap;
            Layer = -10;
        }
        public override void Update()
        {
            base.Update();
            X = (int)Scene.CameraX;// + startingPositionX;
            Y = (int)Scene.CameraY;// + startingPositionY;
            //Console.WriteLine("X {0} Y {1}", X, Y);
            //Console.WriteLine("CameraX {0} CameraY {1}", Scene.CameraX, Scene.CameraY);
        }
    }
}
