CHATGPT AI
collision
_handler.h
§§ 1000
#ifndef COLLISION_HANDLER_H
#define COLLISION_HANDLER_H
#include <list>
#include <vector>
#include "../Objects/object.h"
#include "../Objects/player.h"
#include "../Objects/bullet.h"
#include "../Objects/asteroid.h"
#include "../Objects/powerup.h"
using namespace std;
class CollisionHandler{ //Class to handle collisions between objects in the game
public:
CollisionHandler(); //Constructor for collision handler
void checkCollisions(list<Player*> players, list<Bullet*> bullets, list<Asteroid*> asteroids, list<Powerup*> powerups); //Checks collisions between all objects in the game and handles them accordingly
private:
bool checkCollision(Object *obj1, Object *obj2); //Checks if two objects are colliding with each other
void handleCollision(Player *player, Bullet *bullet); //Handles a collision between a player and a bullet
void handleCollision(Player *player, Asteroid *asteroid); //Handles a collision between a player and an asteroid
void handleCollision(Player *player, Powerup *powerup); //Handles a collision between a player and a powerup
};
§§ COM20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735
#endif /*COLLISION_HANDLER_H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER
§§ 1000
#ifndef COLLISION_HANDLER_H
#define COLLISION_HANDLER_H
#include <list>
#include <vector>
#include "../Objects/object.h"
#include "../Objects/player.h"
#include "../Objects/bullet.h"
#include "../Objects/asteroid.h"
#include "../Objects/powerup.h"
using namespace std;
class CollisionHandler{ //Class to handle collisions between objects in the game
public:
CollisionHandler(); //Constructor for collision handler
void checkCollisions(list<Player*> players, list<Bullet*> bullets, list<Asteroid*> asteroids, list<Powerup*> powerups); //Checks collisions between all objects in the game and handles them accordingly
private:
bool checkCollision(Object *obj1, Object *obj2); //Checks if two objects are colliding with each other
void handleCollision(Player *player, Bullet *bullet); //Handles a collision between a player and a bullet
void handleCollision(Player *player, Asteroid *asteroid); //Handles a collision between a player and an asteroid
void handleCollision(Player *player, Powerup *powerup); //Handles a collision between a player and a powerup
};
§§ COM20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735
#endif /*COLLISION_HANDLER_H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER
_handler.h
§§ 1000
#ifndef COLLISION_HANDLER_H
#define COLLISION_HANDLER_H
#include <list>
#include <vector>
#include "../Objects/object.h"
#include "../Objects/player.h"
#include "../Objects/bullet.h"
#include "../Objects/asteroid.h"
#include "../Objects/powerup.h"
using namespace std;
class CollisionHandler{ //Class to handle collisions between objects in the game
public:
CollisionHandler(); //Constructor for collision handler
void checkCollisions(list<Player*> players, list<Bullet*> bullets, list<Asteroid*> asteroids, list<Powerup*> powerups); //Checks collisions between all objects in the game and handles them accordingly
private:
bool checkCollision(Object *obj1, Object *obj2); //Checks if two objects are colliding with each other
void handleCollision(Player *player, Bullet *bullet); //Handles a collision between a player and a bullet
void handleCollision(Player *player, Asteroid *asteroid); //Handles a collision between a player and an asteroid
void handleCollision(Player *player, Powerup *powerup); //Handles a collision between a player and a powerup
};
§§ COM20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735-collision_handler.cpp added to repo (empty) -jb20200608-1735
#endif /*COLLISION_HANDLER_H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER H*/ /*COLLISION HANDLER
0 Comments & Tags
0 Distribuiri
1 Views