namespace BP
{
	const int8 EVENTLISTENER_NONE = 0;
	const int8 EVENTLISTENER_LOCALIZE_MESSAGE = 1;
	const int8 EVENTLISTENER_MESSAGE = 2;
	const int8 EVENTLISTENER_PLAY_SOUND = 3;
	const int8 EVENTLISTENER_PLAY_MUSIC = 4;
	const int8 EVENTLISTENER_GAME_INIT = 5;

	class EventListener : ScriptObject
	{
		kActor@ self;
		//------------------------------------------------------------------------------------------------------------------------
		EventListener(kActor@ actor)
		{
			@self = actor;
		}
		//------------------------------------------------------------------------------------------------------------------------
		void OnTrigger(kActor@ pInstigator, const int msg)
		{
			switch(self.TriggerMessageID())
			{
				case EVENTLISTENER_LOCALIZE_MESSAGE:
				{
					Hud.AddMessage(self.TriggerData());
					break;
				}
				case EVENTLISTENER_PLAY_SOUND:
				{
					self.PlaySound(self.TriggerData());
					break;
				}
				case EVENTLISTENER_PLAY_MUSIC:
				{
					Game.PlayMusic(self.TriggerData());
					break;
				}
				case EVENTLISTENER_GAME_INIT:
				{
					BP::Game::Initialize();
					break;
				}
			}
		}
		//------------------------------------------------------------------------------------------------------------------------
	};
}
