Jamie Slowgrove - PGG Assignment 1 - SDL
 All Classes Functions
mapObject.h
1 #pragma once
2 #ifndef MAPOBJECT_H
3 #define MAPOBJECT_H
4 
5 #include "entity.h"
6 
10 class MapObject : public Entity
11 {
12 protected:
13  /*is the object collidable?*/
14  bool collidable;
15  /*if a collision does the object remove a life?*/
16  bool damaging;
17  /*does the object need to be deleted?*/
18  bool deleteable;
19  /*Gem velocity*/
20  float velocity;
21  /*position check variables*/
22  int minX;
23  int maxX;
24  /*can the Background move?*/
25  bool moveable;
26 public:
34  MapObject(Texture *, float, float);
35 
40  ~MapObject();
41 
47  void setCollidable(bool);
48 
54  bool getCollidable();
55 
61  void setDamaging(bool);
62 
67  bool getDamaging();
68 
74  void setDeletable(bool);
75 
80  bool getDeletable();
81 
87  void setVelocity(float);
88 
97  void updateX(float);
98 
99 
104  float getVelocity();
105 };
106 #endif
void setDeletable(bool)
Definition: mapObject.cpp:72
void setVelocity(float)
Definition: mapObject.cpp:90
float getVelocity()
Definition: mapObject.cpp:135
MapObject(Texture *, float, float)
Definition: mapObject.cpp:6
void setDamaging(bool)
Definition: mapObject.cpp:54
Creates a MapObject object that inherits Entity.
Definition: mapObject.h:10
bool getDamaging()
Definition: mapObject.cpp:63
Creates an Entity object Creates an Entity object with a Texture (including variables for the source ...
Definition: entity.h:13
~MapObject()
Definition: mapObject.cpp:29
bool getCollidable()
Definition: mapObject.cpp:45
void updateX(float)
Definition: mapObject.cpp:99
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition: texture.h:13
void setCollidable(bool)
Definition: mapObject.cpp:36
bool getDeletable()
Definition: mapObject.cpp:81