<PropertyList>

    <path>Gunsight.ac</path>
	
	<!-- Rembrandt -->
	
    <effect>
        <inherits-from>Effects/model-transparent</inherits-from>
        <condition>
            <greater-than>
                <property>sim/multiplay/generic/float[6]</property>
                <value>9</value>
            </greater-than>
            <property>/sim/rendering/rembrandt/enabled</property>
       	 	</condition>
			<object-name>sight</object-name>
			<object-name>gunsight-glass</object-name>
    </effect>
	
	<!-- Shaders -->

	<animation>
		<type>shader</type>
		<shader>chrome</shader>
		<texture>Aircraft/Generic/Effects/glass_shader.png</texture>
		<object-name>sight</object-name>
		<object-name>gunsight-glass</object-name>
	</animation>
	
	<animation>
		<type>noshadow</type>
		<object-name>sight</object-name>
		<object-name>gunsight-glass</object-name>
	</animation>

    <animation>
        <type>material</type>
        <object-name>light</object-name>
        <emission>
            <red>1</red>
            <green>0</green>
            <blue>0</blue>
            <property>controls/armament/gunsight/power-on</property>
        </emission> 
    </animation>
	
	<!-- Animations -->
    
    <animation>
        <type>material</type>
        <object-name>too-slow2</object-name>
        <object-name>on-speed2</object-name>
        <object-name>too-fast2</object-name>
        <emission>
            <red>0.6</red>
            <green>0.3</green>
            <blue>0.3</blue>
        </emission> 
    </animation>
    
    <animation>
        <type>material</type>
        <object-name>sight</object-name>
        <emission>
            <red>1.0</red>
            <green>1.0</green>
            <blue>1.0</blue>
            <factor-prop>controls/armament/gunsight/intensity</factor-prop>
        </emission>
    </animation>

    <animation>
        <type>select</type>
        <object-name>light</object-name>
        <condition>
            <property>controls/armament/gunsight/power-on</property>
        </condition>
    </animation>
    
    <animation> 
        <type>select</type>
        <object-name>indicator</object-name>
        <condition>
            <not>
                <property>controls/armament/gunsight/power-on</property>
            </not>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>sight</object-name>
        <condition>
            <property>controls/armament/gunsight/power-on</property>
        </condition>
    </animation>  

    <animation> 
        <type>translate</type>
        <object-name>sight</object-name>
        <property>accelerations/nlf</property>
        <factor>-0.012</factor>
        <min>0</min>
        <axis> 
            <x>0</x>
            <y>0</y>
            <z>1</z>
        </axis>
    </animation>

    <animation> 
        <type>select</type>
        <object-name>switch-on</object-name>
        <condition>
            <property>controls/armament/gunsight/power-on</property>
        </condition>
    </animation>

    <animation> 
        <type>select</type>
        <object-name>switch-off</object-name>
        <condition>
            <not>
                <property>controls/armament/gunsight/power-on</property>
            </not>
        </condition>
    </animation>

    <animation>
        <type>pick</type>
        <object-name>switch-on</object-name>
        <object-name>switch-off</object-name>
        <visible>true</visible>
        <action>
            <button>0</button>
            <repeatable>false</repeatable>
            <binding>
                <command>property-toggle</command>
                <property>controls/armament/gunsight/power-on</property>
            </binding>
        </action>
    </animation>

    <animation>
        <type>select</type>
        <object-name>too-slow2</object-name>
        <condition>
            <greater-than>
                <property>orientation/alpha-deg</property>
                <property>sim/aoa-indexer/slow-deg</property>
            </greater-than>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>on-speed2</object-name>
        <condition>
            <not>
                <or>
                    <greater-than>
                        <property>orientation/alpha-deg</property>
                        <property>sim/aoa-indexer/too-slow-deg</property>
                    </greater-than>
                    <less-than>
                        <property>orientation/alpha-deg</property>
                        <property>sim/aoa-indexer/too-fast-deg</property>
                    </less-than>
                </or>
            </not>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>too-fast2</object-name>
        <condition>
            <less-than>
                <property>orientation/alpha-deg</property>
                <property>sim/aoa-indexer/fast-deg</property>
            </less-than>
        </condition>
    </animation>
    
<!-- Label text -->

<text>
	<name>LabelText</name>
	<type type="string">literal</type>
		<text type="string">Gunsight</text>
	<draw-text type="bool">true</draw-text>
	<font>Helvetica.txf</font>
		<character-size type="double">0.012</character-size>
		<character-aspect-ratio type="double">1.0</character-aspect-ratio>
	<axis-alignment>yz-plane</axis-alignment>
	<max-height>0.2</max-height>
	<max-width>0.07</max-width>
	<font-resolution>
		<width type="int">32</width>
		<height type="int">32</height>
	</font-resolution>
	<alignment>center-center</alignment>
	<offsets>
		<x-m> 0.15</x-m>
		<y-m> 0.10 </y-m>
		<z-m> 0.0 </z-m>
	</offsets>
</text>

<animation>
	<type>material</type>
		<object-name>LabelText</object-name>
	<emission>
		<red>1.0</red>
		<green>0.8</green>
		<blue>0.0</blue>
	</emission>
</animation>

<animation>
	<type>select</type>
		<object-name>LabelText</object-name>
	<condition>
		<property>/sim/panel-hotspots</property>
	</condition>
</animation>

</PropertyList>
