Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Circular Depend Your Shit #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Engine/Mine.cpp
@@ -1,5 +1,6 @@
#include "Mine.h"
#include "MainWindow.h"
#include "Ship.h"

//detects if the mine collides with a ship, passing in reference to the ship so mine knows its location
//returns a bool, this function will get called in mines update function
Expand Down
9 changes: 4 additions & 5 deletions Engine/Mine.h
@@ -1,19 +1,18 @@
#pragma once
#include "Graphics.h"
#include "MainWindow.h"
#include "Ship.h"
#include "Health.h"
#include "Sound.h"

class Mine
{
public:
bool DetectCollision(Ship& ship);
void Update(Ship& ship, float dt);
void Draw(Graphics& gfx, Ship& ship);
bool DetectCollision(class Ship& ship);
void Update(class Ship& ship, float dt);
void Draw(Graphics& gfx, class Ship& ship);
void SetPos(float X);
bool isActive();
bool GotShot(Ship& ship, int nBullets);
bool GotShot(class Ship& ship, int nBullets);
private:
float x = 0.0f;
float y = -50.0f;
Expand Down
1 change: 1 addition & 0 deletions Engine/MineManager.cpp
@@ -1,4 +1,5 @@
#include "MineManager.h"
#include "Ship.h"

//constructor sets x pos for all the mines
MineManager::MineManager()
Expand Down