Skip to content

Instantly share code, notes, and snippets.

@Aleksey-Danchin
Created June 4, 2018 10:26
Show Gist options
  • Save Aleksey-Danchin/e33b5a8d9b09e1610f8365b096d2e60b to your computer and use it in GitHub Desktop.
Save Aleksey-Danchin/e33b5a8d9b09e1610f8365b096d2e60b to your computer and use it in GitHub Desktop.
Декларативное описание игры
<game type="rpg">
<objects>
<unit tag="warrior" tileset="/src/unit/warrior/tileset.png" atlas="/src/unit/warrior/tileset.png" action-default="wait" />
<build tag="barrack" tileset="/src/build/barrack/tileset.png" atals="/src/build/barrack/tileset.png" action-default="wait" />
</objects>
<fraction name="Alex" color="red">
<resource type="wood" count="150" />
<resource type="water" count="100" />
<resource type="gold" count="100" />
</fraction>
<fraction name="Gena" color="blue">
<resource type="wood" count="150" />
<resource type="water" count="100" />
<resource type="gold" count="100" />
</fraction>
<map atlas="/src/maps/map1.json" tileset-binom="/src/maps/binom.png">
<camera x="0" y="0" width="500" height="500" />
<selector x="0" y="0" width="300" height="300">
<barrack fraction="Alex" max-health="500" current-health="500" x="0" y="0" vision-radius="20" />
<warrior fraction="Alex" max-health="100" current-health="100" attack="15" x="15" y="15" vision-radius="20" />
</selector>
<layer type="builds">
<barrack fraction="Alex" max-health="500" current-health="500" x="0" y="0" vision-radius="20" />
<barrack fraction="Gena" max-health="500" current-health="500" x="200" y="200" vision-radius="20" />
</layer>
<layer type="units">
<warrior fraction="Alex" max-health="100" current-health="100" attack="15" x="15" y="15" vision-radius="20" />
<warrior fraction="Gena" max-health="100" current-health="100" attack="15" x="190" y="190" vision-radius="20" />
</layer>
</map>
</game>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment