From 42f0d4125bdbc51ac97a6c81a80bbe7845f737d9 Mon Sep 17 00:00:00 2001 From: Tiberiu Chibici Date: Thu, 15 Dec 2016 22:52:36 +0200 Subject: [PATCH] Refactored sprite & transform. Replaced distance with collider when picking objects up. --- .cproject | 4 - assets/plants/Plantable.xml | 13 +-- assets/plants/Seeds.xml | 5 +- assets/sprites/Player.sprite | 26 +++--- assets/sprites/items/HoeStone.sprite | 6 +- assets/sprites/items/Lvl1Sword.sprite | 6 +- assets/sprites/items/Lvl2Sword.sprite | 6 +- assets/sprites/items/RustyWateringCan.sprite | 6 +- src/components/basic/Grid.cpp | 7 +- src/components/basic/Sprite.cpp | 90 ++++++++++++++------ src/components/basic/Sprite.h | 29 ++++--- src/components/player/Player.cpp | 58 ++++++------- src/graphics/SpriteRenderer.cpp | 24 +++--- src/math/GameMath.cpp | 53 +++++++----- src/math/GameMath.h | 22 ++++- src/model/Direction.h | 12 +-- src/model/GameObject.cpp | 2 +- src/model/Transform.cpp | 71 ++++++++------- src/model/Transform.h | 11 ++- src/storage/Parsers.cpp | 30 +++---- 20 files changed, 273 insertions(+), 208 deletions(-) diff --git a/.cproject b/.cproject index e214799..a2cfea1 100644 --- a/.cproject +++ b/.cproject @@ -29,7 +29,6 @@ @@ -39,7 +38,6 @@ @@ -115,7 +112,6 @@