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

namespace LD20_Game
{
    class CollisionTrigger
    {
        public delegate void TriggerAction();
        TriggerAction action;
        BoundingBox bounds;
        public BoundingBox Bounds { get { return bounds; } }

        public CollisionTrigger(BoundingBox b, TriggerAction act)
        {
            bounds = b;
            action = act;
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(TextureManager.Textures["onepixel"], new Rectangle((int)bounds.Min.X, (int)bounds.Min.Y,  
                                                                                    (int)(bounds.Max.X - bounds.Min.X),
                                                                                    (int)(bounds.Max.Y - bounds.Min.Y)), Color.Green);  // deal with it 8)
        }

        public void Activate()
        {
                action.Invoke();
        }
    }
}
