Jamie Slowgrove - PGG Assignment 1 - SDL
 All Classes Functions
background.h
1 #pragma once
2 #ifndef BACKGROUND_H
3 #define BACKGROUND_H
4 
5 #include "entity.h"
6 
13 class Background : public Entity
14 {
15 private:
16  /*Background velocity*/
17  float velocity;
18  /*position check variables*/
19  int minX;
20  int maxX;
21  /*can the Background move?*/
22  bool moveable;
23  bool left;
24  bool right;
25  /*Background type*/
26  int backgroundType;
27 public:
36  Background(Texture *, int);
37 
42  ~Background();
43 
49  void setVelocity(float);
50 
59  void updateX(float);
60 
65  int getType();
66 
71  bool getMoveable();
72 
77  bool getRightMoveable();
78 
83  bool getLeftMoveable();
84 };
85 #endif
bool getLeftMoveable()
Definition: background.cpp:125
int getType()
Definition: background.cpp:98
bool getMoveable()
Definition: background.cpp:107
Creates a Background object that inherits Entity. Creates a Background object with a velocity...
Definition: background.h:13
Creates an Entity object Creates an Entity object with a Texture (including variables for the source ...
Definition: entity.h:13
void updateX(float)
Definition: background.cpp:55
void setVelocity(float)
Definition: background.cpp:46
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition: texture.h:13
bool getRightMoveable()
Definition: background.cpp:116
~Background()
Definition: background.cpp:39
Background(Texture *, int)
Definition: background.cpp:6