[Add] Adding a nice sprite into the mix.

This commit is contained in:
Rtch90 2012-04-10 23:38:20 +01:00
parent 6241b32288
commit 51502ccd3a
5 changed files with 5 additions and 5 deletions

BIN
Data/Img/Player.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1005 B

View File

@ -12,7 +12,7 @@ Player::~Player(void) {
void Player::Prepare(void) {
_player = new Sprite();
_playerTexture = new Texture();
_playerTexture->Load("../Data/Img/test.png");
_playerTexture->Load("../Data/Img/Player.png");
_player->SetTexture(_playerTexture);
_player->SetPosition(Vec2(800/2, 600/2));
_player->SetScale(Vec2(4.5f, 4.5f));

View File

@ -13,8 +13,8 @@ public:
virtual void Draw() const;
const Vec2& GetPosition() const { return position; }
float GetX(void) { return position.x; }
float GetY(void) { return position.y; }
float GetX(void) { return position.x; }
float GetY(void) { return position.y; }
const Vec2& GetSize() const { return size; }
const Vec2& GetScale() const { return scale; }
float GetRotation() const { return rotation; }
@ -24,8 +24,8 @@ public:
void SetPosition(const Vec2& position) { this->position = position; }
void SetX(float xArg) { this->position.x = xArg; }
void SetY(float yArg) { this->position.y = yArg; }
void SetScale(const Vec2& scale) { this->scale = scale; }
void SetRotation(float rotation) { this->rotation = rotation; }
void SetScale(const Vec2& scale) { this->scale = scale; }
void SetRotation(float rotation) { this->rotation = rotation; }
void SetTexture(Texture* texture);
protected: