class AnimatedSign extends InteractiveDevice
{
	private var m_animFeature : AnimFeature_AnimatedDevice;

	protected event OnRequestComponents( ri : EntityRequestComponentsInterface )
	{
		super.OnRequestComponents( ri );
	}

	protected event OnTakeControl( ri : EntityResolveComponentsInterface )
	{
		super.OnTakeControl( ri );
	}

	protected override function TurnOnDevice()
	{
		UpdateAnimState();
		super.TurnOnDevice();
	}

	protected override function TurnOffDevice()
	{
		UpdateAnimState();
		super.TurnOffDevice();
	}

	private function UpdateAnimState()
	{
		if( !( m_animFeature ) )
		{
			m_animFeature = new AnimFeature_AnimatedDevice;
		}
		if( GetDevicePS().IsON() )
		{
			m_animFeature.isOn = true;
			m_animFeature.isOff = false;
		}
		else
		{
			m_animFeature.isOn = false;
			m_animFeature.isOff = true;
		}
		AnimationControllerComponent.ApplyFeature( this, 'AnimatedDevice', m_animFeature );
	}

}

