class TogglePlayerFlashlightEffector extends Effector
{

	protected override function ActionOn( owner : GameObject )
	{
		ProcessEffector( owner.GetGame(), false );
	}

	protected override function ActionOff( owner : GameObject )
	{
		ProcessEffector( owner.GetGame(), true );
	}

	protected override function Uninitialize( game : GameInstance )
	{
		ProcessEffector( game, true );
	}

	private function ProcessEffector( game : GameInstance, enable : Bool )
	{
		var player : PlayerPuppet;
		var evt : TogglePlayerFlashlightEvent;
		evt = new TogglePlayerFlashlightEvent;
		evt.enable = enable;
		player = GetPlayer( game );
		player.QueueEvent( evt );
	}

}

class TogglePlayerFlashlightEvent extends Event
{
	var enable : Bool;
}

class ToggleNewPlayerFlashlightEvent extends Event
{
}

