class hudMilitechWarningGameController extends inkHUDGameController
{
	private var m_root : weak< inkCompoundWidget >;
	private var anim : inkAnimProxy;
	private var m_factListenerId : Uint32;

	protected event OnInitialize()
	{
		var ownerObject : GameObject;
		ownerObject = ( ( GameObject )( GetOwnerEntity() ) );
		m_factListenerId = GameInstance.GetQuestsSystem( ownerObject.GetGame() ).RegisterListener( 'militech_warning', this, 'OnFact' );
		m_root = ( ( inkCompoundWidget )( GetRootWidget() ) );
		m_root.SetVisible( false );
	}

	protected event OnUninitialize()
	{
		var ownerObject : GameObject;
		ownerObject = ( ( GameObject )( GetOwnerEntity() ) );
		GameInstance.GetQuestsSystem( ownerObject.GetGame() ).UnregisterListener( 'militech_warning', m_factListenerId );
	}

	public function OnFact( val : Int32 )
	{
		if( val > 0 )
		{
			m_root.SetVisible( true );
			anim = PlayLibraryAnimation( 'miltech_trespassing_warning' );
		}
		else
		{
			m_root.SetVisible( false );
		}
	}

}

