Refactored sprite & transform. Replaced distance with collider when picking objects up.

This commit is contained in:
2016-12-15 22:52:36 +02:00
parent ddae4934ef
commit 42f0d4125b
20 changed files with 273 additions and 208 deletions

View File

@ -3,21 +3,22 @@
<GameObject name="Ugliceea">
<Transform />
<Sprite name="Ugliceea" anchorX="0" anchorY=".5">
<Sprite w="1" h="2"
anchorX="0" anchorY=".5">
<State name="0">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="0" w="1" h="2" duration="1" />
<Frame tileSet="plants/graphics/Ugliceea.png" cell="0" duration="1" />
</State>
<State name="1">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="1" w="1" h="2" duration="1" />
<Frame tileSet="plants/graphics/Ugliceea.png" cell="1" duration="1" />
</State>
<State name="2">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="2" w="1" h="2" duration="1" />
<Frame tileSet="plants/graphics/Ugliceea.png" cell="2" duration="1" />
</State>
<State name="3">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="3" w="1" h="2" duration="1" />
<Frame tileSet="plants/graphics/Ugliceea.png" cell="3" duration="1" />
</State>
<State name="4">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="4" w="1" h="2" duration="1" />
<Frame tileSet="plants/graphics/Ugliceea.png" cell="4" duration="1" />
</State>
</Sprite>
<SpriteRenderer />

View File

@ -3,9 +3,10 @@
<GameObject name="Ugliceea seed">
<Transform />
<Sprite name="Ugliceea seed" anchorX="0" anchorY="1">
<Sprite w="1" h="1"
anchorX="0" anchorY="1">
<State name="0">
<Frame tileSet="plants/graphics/Ugliceea.png" cell="5" w="1" h="1" duration="1" />
<Frame tileSet="plants/graphics/Ugliceea.png" cell="5" duration="1" />
</State>
</Sprite>
<SpriteRenderer />

View File

@ -1,41 +1,41 @@
<?xml version="1.0" encoding="utf-8" ?>
<Sprite name="Player"
<Sprite w="1" h="2"
anchorX="0.5" anchorY="0.95">
<State name="Idle right">
<Frame tileSet="tilesets/PlayerTiles.png" cell="0" w="1" h="2" duration="1" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="0" duration="1" />
</State>
<State name="Idle up">
<Frame tileSet="tilesets/PlayerTiles.png" cell="2" w="1" h="2" duration="1" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="2" duration="1" />
</State>
<State name="Idle left">
<Frame tileSet="tilesets/PlayerTiles.png" cell="4" w="1" h="2" duration="1" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="4" duration="1" />
</State>
<State name="Idle down">
<Frame tileSet="tilesets/PlayerTiles.png" cell="6" w="1" h="2" duration="1" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="6" duration="1" />
</State>
<State name="Walking right">
<Frame tileSet="tilesets/PlayerTiles.png" cell="0" w="1" h="2" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="1" w="1" h="2" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="1" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="0" duration="0.2" />
</State>
<State name="Walking up">
<Frame tileSet="tilesets/PlayerTiles.png" cell="2" w="1" h="2" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="3" w="1" h="2" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="3" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="2" duration="0.2" />
</State>
<State name="Walking left">
<Frame tileSet="tilesets/PlayerTiles.png" cell="4" w="1" h="2" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="5" w="1" h="2" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="5" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="4" duration="0.2" />
</State>
<State name="Walking down">
<Frame tileSet="tilesets/PlayerTiles.png" cell="6" w="1" h="2" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="7" w="1" h="2" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="7" duration="0.2" />
<Frame tileSet="tilesets/PlayerTiles.png" cell="6" duration="0.2" />
</State>
</Sprite>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<Sprite name="StoneHoe"
<Sprite w="1" h="1"
anchorX="0" anchorY="0.1">
<State name="Normal">
<Frame tileSet="sprites/items/hoe.png" cell="0" w="1" h="1" duration="1" />
<Frame tileSet="sprites/items/hoe.png" cell="0" duration="1" />
</State>
<State name="Attack">
<Frame tileSet="sprites/items/hoe.png" cell="1" w="1" h="1" duration="1" />
<Frame tileSet="sprites/items/hoe.png" cell="1" duration="1" />
</State>
</Sprite>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<Sprite name="Lvl1Sword"
<Sprite w="1" h="1"
anchorX="0" anchorY="1">
<State name="Normal">
<Frame tileSet="sprites/items/sword.png" cell="0" w="1" h="1" duration="1" />
<Frame tileSet="sprites/items/sword.png" cell="0" duration="1" />
</State>
<State name="Attack">
<Frame tileSet="sprites/items/sword.png" cell="1" w="1" h="1" duration="1" />
<Frame tileSet="sprites/items/sword.png" cell="1" duration="1" />
</State>
</Sprite>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<Sprite name="Lvl2Sword"
<Sprite w="1" h="1"
anchorX="0" anchorY="1">
<State name="Normal">
<Frame tileSet="sprites/items/sword.png" cell="0" w="1" h="1" duration="1" />
<Frame tileSet="sprites/items/sword.png" cell="0" duration="1" />
</State>
<State name="Attack">
<Frame tileSet="sprites/items/sword.png" cell="1" w="1" h="1" duration="1" />
<Frame tileSet="sprites/items/sword.png" cell="1" duration="1" />
</State>
</Sprite>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<Sprite name="RustyWateringCan"
<Sprite w="1" h="1"
anchorX="0" anchorY="1">
<State name="Normal">
<Frame tileSet="sprites/items/wateringCan.png" cell="0" w="1" h="1" duration="1" />
<Frame tileSet="sprites/items/wateringCan.png" cell="0" duration="1" />
</State>
<State name="Attack">
<Frame tileSet="sprites/items/wateringCan.png" cell="1" w="1" h="1" duration="1" />
<Frame tileSet="sprites/items/wateringCan.png" cell="1" duration="1" />
</State>
</Sprite>