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

namespace pcd_g1
{
	class TouchItemStageObject : ItemStageObject
	{
		Action action;
		public TouchItemStageObject (int x, int y, Stage stg, Action act) : base(x, y, stg)
		{
			image = null;
			action = act;
		}

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