class DisableTargetingEffector extends Effector
{
	private var m_owner : weak< GameObject >;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID ) {}

	protected override function ActionOn( owner : GameObject )
	{
		m_owner = owner;
		SignalEvent( false );
	}

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

	protected function SignalEvent( toggle : Bool )
	{
		var targetingEvent : ToggleTargetingComponentsEvent;
		targetingEvent = new ToggleTargetingComponentsEvent;
		targetingEvent.toggle = toggle;
		m_owner.QueueEvent( targetingEvent );
	}

}

