-
Notifications
You must be signed in to change notification settings - Fork 0
/
stickman.h
42 lines (30 loc) · 947 Bytes
/
stickman.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
#pragma once
#include <iostream>
#include <string>
#include <QPixmap>
class Stickman {
public:
Stickman(std::string size = "small",
int position = 0,
double starting_velocity = 0.0);
virtual ~Stickman();
//Getter functions
std::string getSize() { return size; }
int getXPosition() { return position; }
double getVelocity() { return velocity; }
double getWidth() { return width; }
double getHeight() { return height; }
virtual QPixmap getPixmap(unsigned int frame);
//Change and set functions
void changeSize(std::string new_size) { size = new_size; }
void changeXPosition(int new_position) { position = new_position; }
void changeVelocity(int new_velocity) { velocity = new_velocity; }
virtual void setDimensions();
virtual void updateStickman();
private:
std::string size;
int position;
double velocity;
int width;
int height;
};