using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace pcd_g1
{
	abstract class BlockStageObject : IStageObject
	{
		public int X { get; set; }
		public int Y { get; set; }
		public int Width { get; protected set; }
		public int Height { get; protected set; }
		public bool Visibility { get; private set; }
		public bool CanCrash { get; private set; }
		public CollideRange Range { get; protected set; }

		protected Bitmap image;

		public BlockStageObject(int x, int y)
		{
			X = x; Y = y;
			Width = 32;
			Height = 32;
			Visibility = true;
			CanCrash = true;
			Range = new NormalCollideRange(this);
		}

		public virtual void Update(int keyStatus, out int vx, out int vy)
		{
			vx = 0; vy = 0;
		}

		public virtual void Draw(Graphics g, int width, int height)
		{
			if(image != null)
				g.DrawImage(image, 0, 0, width, height);
		}

		public virtual bool EventProc(EventType type, IStageObject sender, CollideDirection direction)
		{
			return true;
		}

		public virtual void SignalProc(SignalType type, int arg1, int arg2)
		{

		}
	}
}