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

<PropertyList>

  <path>coanda1910.ac</path>

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/Coanda-1910/Models/Liveries", 10);

      var self = cmdarg();

      var float_0 = self.getNode("sim/multiplay/generic/float[0]", 1);
      var float_1 = self.getNode("sim/multiplay/generic/float[1]", 1);

      var crew_door = self.getNode("sim/model/door-positions/crew/position-norm", 1);
      var passenger_door = self.getNode("sim/model/door-positions/passenger/position-norm", 1);
      
      crew_door.alias(float_0);
      passenger_door.alias(float_0);
    </load>

    <unload>
      livery_update.stop();
      crew_door.unalias();
      passenger_door.unalias();
    </unload>
  </nasal>

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>capot</object-name>
    <object-name>capot2</object-name>
    <object-name>ailesH</object-name>
    <object-name>ailesB</object-name>
    <object-name>ailesA</object-name>
    <object-name>derives</object-name>
    <object-name>structure</object-name>
    <object-name>structure2</object-name>
    <object-name>structure3</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>helice</object-name>
    <object-name>reservoir</object-name>
      
    <object-name>trous</object-name>
    <object-name>cables</object-name>
    <object-name>moteur</object-name>
    <object-name>patin</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>

    <!-- Objets transparents -->
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>capot</object-name>
    <object-name>capot2</object-name>
    <object-name>ailesH</object-name>
    <object-name>ailesB</object-name>
    <object-name>ailesA</object-name>
    <object-name>derives</object-name>
    <object-name>structure</object-name>
    <object-name>structure2</object-name>
    <object-name>structure3</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>helice</object-name>
    <object-name>tuyere</object-name>
    <object-name>reservoir</object-name>
    
    <object-name>trous</object-name>
    <object-name>cables</object-name>
    <object-name>moteur</object-name>
    <object-name>patin</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    
    <property-base>sim/model/livery</property-base>
    <texture-prop>texture</texture-prop>
    <texture>texture.png</texture>
    <emission>
      <red-prop>emission/red</red-prop>
      <green-prop>emission/green</green-prop>
      <blue-prop>emission/blue</blue-prop>
    </emission>
  </animation>

  <effect>
    <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
    <object-name>capot</object-name>
    <object-name>capot2</object-name>
    <object-name>structure</object-name>
    <object-name>structure3</object-name>
    <object-name>helice</object-name>
    <object-name>tuyere</object-name>
    <object-name>reservoir</object-name>
  </effect>

  <!-- Interieur -->
  <model>
    <path>Aircraft/Coanda-1910/Models/Interior/interior.xml</path>
  </model>
  
  <!-- Une ombre pour OSG -->
  <model>
    <path>Aircraft/Coanda-1910/Models/shadow.xml</path>
    <offsets>
      <x-m>  0.000 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -1.450 </z-m>
    </offsets>
  </model>
  
  <!-- Effets sur le sol -->
  <!-- Roue gauche -->
  <model>
    <path>Aircraft/Coanda-1910/Models/Effects/ground/ground0.xml</path>   
    <offsets>
      <x-m> -2.94734 </x-m>
      <y-m> -0.87472 </y-m>
      <z-m> -1.65062 </z-m>
    </offsets>
  </model>

  <!-- Roue droite -->
  <model>
    <path>Aircraft/Coanda-1910/Models/Effects/ground/ground1.xml</path>
    <offsets>
      <x-m> -2.94734 </x-m>
      <y-m>  0.87472 </y-m>
      <z-m> -1.65062 </z-m>
    </offsets>
  </model>

  <!-- Patte de queue -->
  <model>
    <path>Aircraft/Coanda-1910/Models/Effects/ground/ground2.xml</path>
    <offsets>
      <x-m>  4.73351 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m> -0.52823 </z-m>
    </offsets>
  </model>
  
  <!-- L'hélice -->
  <animation>
    <type>spin</type>
    <object-name>helice</object-name>
    <property>controls/engines/engine[0]/throttle</property>
    <factor> 100 </factor>
    <center>
      <x-m> -6.08986 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.34806 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </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> 5.54761 </x-m>
     <y-m> 0.00000 </y-m>
     <z-m> 0.36602 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

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

  <!-- Rotation des roues lors du roulage -->
  <animation>
    <type>spin</type>
    <object-name>roueG</object-name>
    <property>gear/gear[0]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m> -2.94734 </x-m>
      <y-m> -0.87454 </y-m>
      <z-m> -1.35773 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>roueD</object-name>
    <property>gear/gear[1]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m> -2.94734 </x-m>
      <y-m>  0.87454 </y-m>
      <z-m> -1.35773 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

</PropertyList>
