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

<PropertyList>

  <path>pc-7.ac</path>

  <!-- MP sound call -->
  <sound>
    <path>Aircraft/Piaggio-Pegna-Pc-7/Sounds/mp-sound.xml</path>
  </sound>

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/Piaggio-Pegna-Pc-7/Models/Liveries", 10);
    </load>
    <unload>
      livery_update.stop();
    </unload>
  </nasal>

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>radiateurailes</object-name>
    <object-name>ailes2</object-name>
    <object-name>direction</object-name>
    <object-name>profondeur</object-name>
    <object-name>foil</object-name>
    <object-name>foilrear</object-name>
    <object-name>canopy</object-name>
    <object-name>bol</object-name>
    <object-name>bolrear</object-name>
    <object-name>gouvernail</object-name>
    <object-name>radiateur</object-name>
    <object-name>bosses</object-name>
    <object-name>helicerear1</object-name>
    <object-name>helicerear2</object-name>

    <object-name>trous</object-name>
    <object-name>echappes</object-name>
    <object-name>helice</object-name>

    <!-- Objets transparents -->
    <object-name>vitres</object-name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
    <!-- HDR Mode -->
    <object-name>HDRvitres</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>radiateurailes</object-name>
    <object-name>ailes2</object-name>
    <object-name>direction</object-name>
    <object-name>profondeur</object-name>
    <object-name>foil</object-name>
    <object-name>foilrear</object-name>
    <object-name>canopy</object-name>
    <object-name>bol</object-name>
    <object-name>bolrear</object-name>
    <object-name>gouvernail</object-name>
    <object-name>radiateur</object-name>
    <object-name>bosses</object-name>
    <object-name>helicerear1</object-name>
    <object-name>helicerear2</object-name>
    <object-name>trous</object-name>
    <object-name>echappes</object-name>
    <object-name>helice</object-name>
    <object-name>vitres</object-name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
    <object-name>HDRvitres</object-name>

    <property-base>sim/model/livery</property-base>
    <texture-prop>texture</texture-prop>
    <texture>texture.png</texture>
    <specular>
      <red-prop>specular/red</red-prop>
      <green-prop>specular/green</green-prop>
      <blue-prop>specular/blue</blue-prop>
    </specular>
  </animation>

  <effect>
    <inherits-from>Aircraft/SF-1_Archon/Models/Effects/Bump/bumpspec</inherits-from>
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>ailes2</object-name>
    <object-name>direction</object-name>
    <object-name>profondeur</object-name>
    <object-name>foil</object-name>
    <object-name>foilrear</object-name>
    <object-name>canopy</object-name>
    <object-name>bol</object-name>
    <object-name>bolrear</object-name>
    <object-name>gouvernail</object-name>
    <object-name>bosses</object-name>
    <object-name>helicerear1</object-name>
    <object-name>helicerear2</object-name>
  </effect>

  <!-- working for Compositor -->
  <effect>
    <inherits-from>Effects/Glass/glassrain</inherits-from>
    <object-name>vitres</object-name>
  </effect>

  <effect>
    <inherits-from>Effects/Glass/glass</inherits-from>
    <object-name>HDRvitres</object-name>
  </effect>

  <!-- Sélection des vitres en fonction de HDR ou pas -->
  <animation>
    <type>select</type>
    <condition>
      <!-- <property>sim/rendering/hdr/hdr-enabled</property> -->
      <property>sim/multiplay/generic/bool[2]</property>
    </condition>
    <object-name>HDRvitres</object-name>
  </animation>

  <animation>
    <type>select</type>
    <condition>
      <!-- <not><property>sim/rendering/hdr/hdr-enabled</property></not> -->
      <not><property>sim/multiplay/generic/bool[2]</property></not>
    </condition>
    <object-name>vitres</object-name>
  </animation>

  <effect>
    <inherits-from>Effects/model-transparent</inherits-from>
    <object-name>propblur</object-name>
    <object-name>propdisc</object-name>
  </effect>

  <model>
    <path>Effects/wakes/all-wakes.xml</path>
  </model>

  <model>
    <path>Interior/interior.xml</path>
  </model>

  <model>
    <path>Effects/cranking/all-cranking.xml</path>
  </model>

  <!-- L'hélice du moteur avant -->
  <animation>
    <name>HeliceComplete</name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
    <object-name>helice</object-name>
    <object-name>bol</object-name>
  </animation>

  <!-- Séléction de l'objet visible en fonction des rpm -->
  <animation>
    <type>select</type>
    <object-name>propdisc</object-name>
    <condition>
      <and>
        <greater-than>
          <property>engines/engine[0]/rpm</property>
          <value>1500</value>
        </greater-than>
        <equals>
          <property>sim/model/mode</property>
          <value>2</value>
        </equals>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblur</object-name>
    <condition>
      <and>
        <greater-than>
          <property>engines/engine[0]/rpm</property>
          <value>600.000</value>
        </greater-than>
        <less-than>
          <property>engines/engine[0]/rpm</property>
          <value>1500.001</value>
        </less-than>
        <equals>
          <property>sim/model/mode</property>
          <value>2</value>
        </equals>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>helice</object-name>
    <condition>
      <or>
        <and>
          <less-than>
            <property>engines/engine[0]/rpm</property>
            <value>1500</value>
          </less-than>
          <equals>
            <property>sim/model/mode</property>
            <value>2</value>
          </equals>
        </and>
        <not-equals>
          <property>sim/model/mode</property>
          <value>2</value>
        </not-equals>
      </or>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceComplete</object-name>
    <condition>
      <and>
        <greater-than>
          <property>engines/engine[0]/rpm</property>
          <value> 5 </value>
        </greater-than>
        <equals>
          <property>sim/model/mode</property>
          <value>2</value>
        </equals>
      </and>
    </condition>
    <property>engines/engine[0]/rpm</property>
    <factor> 1 </factor>
    <center>
      <x-m> -3.97626 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.17276 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- L'hélice du moteur rear -->
  <animation>
    <name>HeliceRear</name>
    <object-name>helicerear1</object-name>
    <object-name>helicerear2</object-name>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceRear</object-name>
    <condition>
      <equals>
        <property>sim/model/mode</property>
        <value>1</value>
      </equals>
    </condition>
    <property>engines/engine[0]/rpm</property>
    <factor> 1 </factor>
    <axis>
      <x1-m>  3.33926 </x1-m>
      <y1-m>  0.00000 </y1-m>
      <z1-m> -0.36340 </z1-m>
      <x2-m>  3.73297 </x2-m>
      <y2-m>  0.00000 </y2-m>
      <z2-m> -0.38404 </z2-m>
    </axis>
  </animation>

  <!-- Gouverne de profondeur -->
  <animation>
    <type>rotate</type>
    <object-name>profondeur</object-name>
    <property>surface-positions/elevator-pos-norm</property>
    <factor> 15 </factor>
    <center>
      <x-m> 3.86091 </x-m>
      <y-m> 0.00000 </y-m>
      <z-m> 0.51730 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Gouverne de direction -->
  <animation>
    <type>rotate</type>
    <object-name>direction</object-name>
    <property>surface-positions/rudder-pos-norm</property>
    <factor> -15 </factor>
    <center>
      <x-m> 3.96822 </x-m>
      <y-m> 0.00000 </y-m>
      <z-m> 0.83734 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Gouvernail -->
  <animation>
    <type>rotate</type>
    <object-name>gouvernail</object-name>
    <property>surface-positions/rudder-pos-norm</property>
    <factor> -15 </factor>
    <center>
      <x-m>  3.93792 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m> -0.01760 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Animations des ailerons -->
  <animation>
    <type>rotate</type>
    <object-name>aileronG</object-name>
    <property>surface-positions/left-aileron-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m>  0.42076 </x1-m>
      <y1-m> -2.03125 </y1-m>
      <z1-m>  0.38983 </z1-m>
      <x2-m>  0.69398 </x2-m>
      <y2-m> -0.75346 </y2-m>
      <z2-m>  0.34469 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>aileronD</object-name>
    <property>surface-positions/right-aileron-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> 0.69398 </x1-m>
      <y1-m> 0.75346 </y1-m>
      <z1-m> 0.34469 </z1-m>
      <x2-m> 0.42076 </x2-m>
      <y2-m> 2.03125 </y2-m>
      <z2-m> 0.38983 </z2-m>
    </axis>
  </animation>

  <!-- Canopy -->
  <animation>
    <type>pick</type>
    <object-name>canopy</object-name>
    <object-name>vitres</object-name>
    <object-name>HDRvitres</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <condition>
          <and>
            <property>gear/gear[0]/wow</property>
            <property>gear/gear[1]/wow</property>
            <property>gear/gear[2]/wow</property>
            <less-than>
              <property>gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.crew.toggle();</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>canopy</object-name>
    <object-name>vitres</object-name>
    <object-name>HDRvitres</object-name>
    <!-- <property>sim/model/door-positions/crew/position-norm</property> -->
    <property>sim/multiplay/generic/float[0]</property>
    <factor> -160 </factor>
    <center>
      <x-m> 1.28976 </x-m>
      <y-m> 0.00000 </y-m>
      <z-m> 0.59179 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Pilage de l'hélice navale -->
  <animation>
    <type>rotate</type>
    <object-name>helicerear1</object-name>
    <!-- <property>sim/model/mode</property> -->
    <property>sim/multiplay/generic/int[6]</property>
    <interpolation>
      <entry><ind>    0 </ind><dep> 90 </dep></entry> <!-- Neutral -->
      <entry><ind>    1 </ind><dep>  0 </dep></entry> <!-- Water   -->
      <entry><ind>    2 </ind><dep> 90 </dep></entry> <!-- Air     -->
    </interpolation>
    <center>
      <x-m>  3.37947 </x-m>
      <y-m> -0.00058 </y-m>
      <z-m> -0.30708 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>helicerear2</object-name>
    <!-- <property>sim/model/mode</property> -->
    <property>sim/multiplay/generic/int[6]</property>
    <interpolation>
      <entry><ind>    0 </ind><dep> 90 </dep></entry> <!-- Neutral -->
      <entry><ind>    1 </ind><dep>  0 </dep></entry> <!-- Water   -->
      <entry><ind>    2 </ind><dep> 90 </dep></entry> <!-- Air     -->
    </interpolation>
    <center>
      <x-m>  3.37050 </x-m>
      <y-m>  0.00382 </y-m>
      <z-m> -0.43845 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

</PropertyList>
