-
Notifications
You must be signed in to change notification settings - Fork 0
/
Character.h
41 lines (31 loc) · 894 Bytes
/
Character.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef DUNGEON_QUEST_CHARACTER_H
#include <string>
#include <SFML/Graphics.hpp>
#include <iostream>
#include "Animation.h"
#include "Sound.h"
using namespace std;
#define DUNGEON_QUEST_CHARACTER_H
class Character{
public:
/**
* declaring parameter for the constructor
* using this in the Character.cpp file
***/
Character(std::string path, std::string walkSoundPath);
Character(std::string path, sf::IntRect textRec, std::string walkSoundPath);
void setPosition(float x, float y);
void setScale(float x, float y);
sf::Vector2f getPosition();
sf::Sprite* getSprite();
int getCurrentTile();
void setCurrentTile(int tileIndex);
void move(float offSetX, float offSetY);
private:
// making the sprite
sf::Sprite sprite;
sf::Texture texture;
int currentTile;
Sound walkSound;
};
#endif //DUNGEON_QUEST_CHARACTER_H