using System;

namespace Icarus.Logic.Physics
{
	/// <summary>
	/// Summary description for CollisionBoxZoom.
	/// </summary>
	public class CollisionBoxZoom : CollisionBox
	{

        /// <summary>
        /// Whether or not to zoom
        /// </summary>
        private bool bZoom;


		public CollisionBoxZoom()
		{
			this.bZoom = false;
		}

        /// <summary>
        /// gets or sets whether or not to zoom
        /// </summary>
        public bool Zoom
        {
            get { return this.bZoom; }
            set { this.bZoom = value; }
        }

        /// <summary>
        /// Turns on zooming when merc collides with this box
        /// </summary>
        /// <param name="rect"></param>
        /// <param name="po"></param>
        /// <returns></returns>
        public override int handleRectCollision(PhysicsRectangle rect, PhysicsObject po)
        {
            if(po is PhysicsMerc)
            {
                this.bZoom = true;
            }
            return (int)PhysicsSettings.enumActions.DoNothing;
        }


	}
}
