/* -----------------------------------------------------------------------------
	GSFramework
	Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */


#ifndef	__NTRIGGER__
#define	__NTRIGGER__


		#include "core/item.h"


namespace GS {
	namespace Core {

/*!
	@short	Trigger class.
	@author Emmanuel Julien (ejulien@gsworks.fr)
*/
struct	Trigger : public Item
{
struct	ItemInTrigger
{
		bool			inside;					///< Item is inside trigger.
		Item			*item;

		ItemInTrigger(Item *i) : item(i), inside(true) {}
};

		List <ItemInTrigger *> items_in_trigger;

		void			ReadyItemList();
		void			PurgeItemList();

virtual	void			MarkItem(Item *);
virtual	void			DropItem(Item *);

		bool			IsInside(const Vector4 &);

		void			RenderSetup(ResourceFactories * = 0) {}
		~Trigger();
};
	} // Core
} // GS


#endif // __NTRIGGER__
