using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Slayter
{
    public class SpecialObjectsMap:MapObject,IDrawable,IMoveable
    {
        int[] place;
        public int[] Coordinates { get { return place; } }
        DelegateClass2 func;
        public SpecialObjectsMap(Texture2D t,Map map,int[] coordinates,DelegateClass2 func)
            : base(t,new Rectangle(coordinates[1]*40,coordinates[0]*40,40,40),map)
        {
            this.func = func;
            place = coordinates;
        }
        public bool isMovedOn(Hero hero,int[] coor)
        {
            return place[1]==coor[0] && place[0]==coor[1];
        }

        public void Act(GameScreen mapParent)
        {
            func(mapParent,this);
        }
    }
}
