Added plants. Added game time management.

This commit is contained in:
2016-12-09 22:33:47 +02:00
parent c12a8ede5a
commit 2bd8605711
30 changed files with 645 additions and 87 deletions

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<Background columns="380" rows="213" >
<Layer name="Background"
cells="levels/Farm_Background.csv"
texture="tilesets/Ground.png" />
<Layer name="Soil"
cells="levels/Farm_Soil.csv"
texture="tilesets/Ground.png" />
</Background>

15
assets/maps/Farm.map Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<Map width="380" height="213"
cellWidth="16" cellHeight="16" >
<Layer name="Background" cells="maps/Farm_Background.csv">
<TileSet texture="tilesets/Ground.png"
tileWidth="16" tileHeight="16" />
</Layer>
<Layer name="Soil" cells="maps/Farm_Soil.csv">
<TileSet texture="tilesets/Ground.png"
tileWidth="16" tileHeight="16" />
</Layer>
</Map>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<ItemCollection>
<GameObject name="Ugliceea">
<Transform />
<Sprite name="Ugliceea" anchorX="0" anchorY=".5">
<State name="0">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="0" w="1" h="2" duration="1" />
</State>
<State name="1">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="1" w="1" h="2" duration="1" />
</State>
<State name="2">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="2" w="1" h="2" duration="1" />
</State>
<State name="3">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="3" w="1" h="2" duration="1" />
</State>
<State name="4">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="4" w="1" h="2" duration="1" />
</State>
</Sprite>
<SpriteRenderer />
<Plant needsWater="false" maxDaysWithoutWater="3">
<State len="1" />
<State len="1" />
<State len="2" />
<State len="1" />
<State len="-1" />
</Plant>
</GameObject>
</ItemCollection>

16
assets/plants/Seeds.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<ItemCollection>
<GameObject name="Ugliceea seed">
<Transform />
<Sprite name="Ugliceea seed" anchorX="0" anchorY="1">
<State name="0">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="5" w="1" h="1" duration="1" />
</State>
</Sprite>
<SpriteRenderer />
<Item name="Ugliceea seed" description="A pretty interesting plant." />
<Seed plantName="Ugliceea" />
</GameObject>
</ItemCollection>

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

View File

@ -6,15 +6,17 @@
<GameObject name="Main Camera">
<Transform />
<Camera scale="4" mainCamera="true" />
<GameTime />
</GameObject>
<!-- Background object -->
<GameObject name="Background">
<Background src="levels/Farm.back" />
<BackgroundRenderer />
<GameObject name="Map">
<Map src="maps/Farm.map" />
<MapRenderer />
</GameObject>
<GameObject name="Object Layer">
<Transform />
<Grid w="380" h="250" />
</GameObject>