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

namespace pcd_g1
{
	class SlopeTypeCBlockStageObject : BlockStageObject
	{
		//45度傾斜。基本は左下がり、right==trueで、左下がり。
		public SlopeTypeCBlockStageObject(int x, int y, string imgName, bool right)
			: base(x, y)
		{
			image = ImageManager.Search(imgName);
			Range = new SlopeTypeACollideRange(this);
			if (!right)
			{
				((SlopeTypeACollideRange)Range).P1 = new Point(0, this.Height);
				((SlopeTypeACollideRange)Range).P2 = new Point(this.Width, 0);
			}
			else
			{
				((SlopeTypeACollideRange)Range).P1 = new Point(0, 0);
				((SlopeTypeACollideRange)Range).P2 = new Point(this.Width, this.Height);
			}
		}

		public override bool EventProc(EventType type, IStageObject sender, CollideDirection direction)
		{
			return base.EventProc(type, sender, direction);
		}
	}
}
