<?xml version="1.0" encoding="ISO-8859-1"?>

<PropertyList>

  <path>mags.ac</path>

  <animation>
    <object-name>magsw</object-name>
    <object-name>centre</object-name>
    <object-name>key</object-name>
    <object-name>start</object-name>
    <object-name>magsw</object-name>

    <object-name>click-L</object-name>
    <object-name>click-R</object-name>
    <object-name>click-S</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>magsw</object-name>
    <object-name>centre</object-name>
    <object-name>key</object-name>
    <object-name>start</object-name>
    <object-name>magsw</object-name>
    <object-name>click-L</object-name>
    <object-name>click-R</object-name>
    <object-name>click-S</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>key</object-name>
    <object-name>start</object-name>
    <object-name>magsw</object-name>
    <condition>
      <property>/controls/electric/battery-switch</property>
    </condition>
    <emission>
      <factor-prop>controls/lighting/instruments-norm</factor-prop>
      <red>   0.50 </red>
      <green> 0.40 </green>
      <blue>  0.30 </blue>
    </emission>
  </animation>

  <!-- magneto switch -->
  <animation>
    <type>pick</type>
    <object-name>click-L</object-name>
    <visible>false</visible>
    <action>
      <name>decrease mags</name>
      <button>0</button>
      <binding>
        <command>property-adjust</command>
        <property>controls/engines/engine/magnetos</property>
        <step>-1</step>
        <min>0</min>
        <max>3</max>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>click-R</object-name>
    <visible>false</visible>
    <action>
      <name>increase mags</name>
      <button>0</button>
      <binding>
        <command>property-adjust</command>
        <property>controls/engines/engine/magnetos</property>
        <step>1</step>
        <min>0</min>
        <max>3</max>
      </binding>
    </action>
  </animation>

  <!-- Starter -->
  <animation>
    <type>pick</type>
    <object-name>click-S</object-name>
    <visible>false</visible>
    <action>
      <name>starter</name>
      <button>0</button>
    <binding>
      <command>property-assign</command>
      <property>controls/switches/starter</property>
      <value type="int">1</value>
    </binding>
    <binding>
      <command>nasal</command>
      <script>controls.startEngine()</script>
    </binding>
    <mod-up>
      <binding>
       <command>property-assign</command>
       <property>controls/switches/starter</property>
       <value type="int">0</value>
      </binding>
      <binding>
        <command>nasal</command>
        <script>props.setAll("/controls/engines/engine", "starter", 0)</script>
      </binding>
    </mod-up>
    </action>
  </animation>

  <!--   key animations  -->
  <animation>
    <name>mags-key</name>
    <type>rotate</type>
    <object-name>key</object-name>
    <property>controls/engines/engine/magnetos</property>
    <factor> 30 </factor>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>select</type>
    <object-name>key</object-name>
    <condition>
      <not>
        <property>controls/switches/starter</property>
      </not>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>start</object-name>
    <condition>
      <property>controls/switches/starter</property>
    </condition>
  </animation>

</PropertyList>
