<?xml version ="1.0" encoding ="utf-8" standalone ="yes"?>
<particlesystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="../../../../bin/Xen.Ex.ParticleSystemImporter/particlesystem.xsd">

  <system frame_rate="60hz">
    <once>
      <emit type="snow" life="2"/>
    </once>
  </system>

  <!-- 
		Red particle moving up
	-->
  <particle name="snow" blend="alpha" texture="flake.png">
    <logic>
      <once>
        <set target="position.x" arg0="-2"/>
        <set target="position.y" arg0="3"/>
        <set target="position.z" arg0="-10"/>

        <set target="velocity.x" arg0="0"/>
        <set target="velocity.y" arg0="2"/>
        <set target="velocity.z" arg0="0"/>

        <set target="size" arg0="1.0"/>
        <set target="alpha" arg0="1"/>

        <set target="red" arg0="1"/>
        <set target="green" arg0="0"/>
        <set target="blue" arg0="0"/>
      </once>
    </logic>

    <emitter>
      <remove>
        <emit type="green" life="2"/>
      </remove>
    </emitter>
  </particle>

  <!-- 
		Green particle moving to the right
	-->
  <particle name="green" blend="alpha" texture="flake.png">
    <logic>
      <once>
        <set target="velocity.x" arg0="2"/>
        <set target="velocity.y" arg0="0"/>
        <set target="velocity.z" arg0="0"/>

        <set target="red" arg0="0"/>
        <set target="green" arg0="1"/>
        <set target="blue" arg0="0"/>
      </once>

      <frame>
        <set target="green" arg0="1"/>

        <!-- 
		      Remove the following line and the particles run fine
	      -->
        <set target="local0" arg0="life"/>

      </frame>
    </logic>

    <!-- 
      Or remove the emitter and it will run fine too
    -->
    <emitter>
      <frame>
        <every interval="0.5">
          <emit type="blue" life="2"/>
        </every>
      </frame>
    </emitter>
  </particle>

  <!-- 
		Blue particle moving down
	-->
  <particle name="blue" blend="alpha" texture="flake.png">
    <logic>
      <once>
        <set target="velocity.x" arg0="0"/>
        <set target="velocity.y" arg0="-2"/>
        <set target="velocity.z" arg0="0"/>

        <set target="red" arg0="0"/>
        <set target="green" arg0="0"/>
        <set target="blue" arg0="1"/>
      </once>
    </logic>
  </particle>

  <!-- 
		Empty fog particle so it still runs with unchanged tutorial code
	-->
  <particle name="fog" blend="alpha" texture="flake.png">
    <logic>
      <once>
        <set target="alpha" arg0="0"/>
      </once>
    </logic>
  </particle>

</particlesystem>