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

namespace pcd_g1
{
	class HealItemStageObject : ItemStageObject
	{
		private bool captured = false;
		int volume;
		public HealItemStageObject(int x, int y, Stage stg, int healVal = 10)
			: base(x, y, stg)
		{
			image = ImageManager.Search("702");
			volume = healVal;
		}

		public override bool EventProc(EventType type, IStageObject sender, CollideDirection direction)
		{
			switch (type)
			{
				case EventType.BeTouched:
					if (sender is MainCharacterStageObject && !captured)
					{
						captured = true;
						sender.SignalProc(SignalType.SIGHEAL, volume, 0);
						owner.Remove(this);
					}
					break;
			}


			return base.EventProc(type, sender, direction);
		}
	}
}
