<level>
  <playground map="turrets.map">
    <decorations>
      <platform id="1" x="2" y="23" w="7"/>
      <platform id="2" x="31" y="23" w="7" left="yellow" right="yellow"/>
    
      <turret id="10" orientation="right" x="18" y="12" preset="mark1"/>
      <turret id="11" orientation="left" x="21" y="12" preset="mark1"/>
      <turret id="12" orientation="left" x="11" y="22" preset="mark1"/>
    </decorations>
  </playground>

  <startposition platform="1"/>

  <gamecontrol>
  <![CDATA[
	var targetPlatform;
	var state = 0;
	
	function init() {
		targetPlatform = gameControl.getObjectById(2);
		targetPlatform.setAnimate(false);
		
		addDestroyTargetObjective(10);
		addDestroyTargetObjective(11);
		addDestroyTargetObjective(12);
	}

	function onObjectiveReached() {
		switch (state) {
		case 0:
			addLandOnPlatformObjective(2);
			targetPlatform.setAnimate(true);
			state = 1;
			break;
		case 1:
			gameControl.finish();
			break;
		}
	}
  ]]>
  </gamecontrol>
</level>
