Jamie Slowgrove - PGG Assignment 1 - SDL
 All Classes Functions
collision.h
1 #pragma once
2 #ifndef COLLISION_H
3 #define COLLISION_H
4 
5 #include "player.h"
6 #include "mapLoader.h"
7 #include "background.h"
8 #include "audio.h"
9 
15 class Collision
16 {
17 private:
18  /*pointers to entities used in the tests*/
19  Player * player;
20  MapLoader * map;
21  Background * background;
22  /*pointers to sounds*/
23  Audio * gemPickup;
24  Audio * lifeLost;
25 public:
36 
41  ~Collision();
42 
49  void playerCollisionTest(float, char);
50 
56  void gemAction(int);
57 
63  void blockActionX(int);
64 
70  void blockActionY(int);
71 
77  void endGoalAction(int);
78 
87  void roundingCheck(float, int &minMap, int &maxMap, float);
88 
97  void leftTest(float, int, int, int);
98 
107  void rightTest(float, int, int, int);
108 
117  void downTest(float, int, int, int);
118 
125  void playerCreatureCollisionTest(float);
126 
133  void enemyCollision(int index, float deltaTime);
134 
144  void enemyLeftTest(float, int, int, int, int);
145 
155  void enemyRightTest(float, int, int, int, int);
156 };
157 
158 #endif
void blockActionY(int)
Definition: collision.cpp:333
void leftTest(float, int, int, int)
Definition: collision.cpp:73
void blockActionX(int)
Definition: collision.cpp:304
void enemyLeftTest(float, int, int, int, int)
Definition: collision.cpp:439
Creates a Background object that inherits Entity. Creates a Background object with a velocity...
Definition: background.h:13
void enemyRightTest(float, int, int, int, int)
Definition: collision.cpp:499
void playerCollisionTest(float, char)
Definition: collision.cpp:25
Collision(Player *, MapLoader *, Background *, Audio *, Audio *)
Definition: collision.cpp:6
void downTest(float, int, int, int)
Definition: collision.cpp:219
~Collision()
Definition: collision.cpp:18
void gemAction(int)
Definition: collision.cpp:291
void endGoalAction(int)
Definition: collision.cpp:346
a class to load in a map text file
Definition: mapLoader.h:16
void roundingCheck(float, int &minMap, int &maxMap, float)
Definition: collision.cpp:355
void enemyCollision(int index, float deltaTime)
Definition: collision.cpp:404
Creates an Collision object. The Collision object is for use with detecting Collision. Used help from http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/ in the type 2 section.
Definition: collision.h:15
void playerCreatureCollisionTest(float)
Definition: collision.cpp:375
Creates a Player object that inherits Creature which in turn inherits Entity.
Definition: player.h:10
void rightTest(float, int, int, int)
Definition: collision.cpp:146
Creates a Audio object to handle the SDL_Mixer. Done using help from http://www.lazyfoo.net/tutorials/SDL/21_sound_effects_and_music/index.php.
Definition: audio.h:13