Who knows

This commit is contained in:
Benjamin Morgan 2025-09-26 09:26:47 -06:00
parent eaf5a55d18
commit 32e50969b4
45 changed files with 38346 additions and 38306 deletions

114
Ship.h
View file

@ -1,57 +1,57 @@
//
// Created by benmo on 2/16/2020.
//
#ifndef SFML_TEMPLATE_SHIP_H
#define SFML_TEMPLATE_SHIP_H
#include <vector>
#include <SFML/Graphics/Texture.hpp>
#include "GameSprite.h"
#include "Weapon.h"
class Ship : public GameSprite {
protected:
float fullScale, turnRate;
int fuelCap, fuel, hullCap, hull, cargoSpace, cargoUsed = 0, passengerSpace, passengersOn = 0;
std::vector<Weapon*> weapons;
Ship *target;
public:
Ship(const sf::Texture &texture, float scale, float xPos, float yPos, float velocity, float maxVelocity, float direction, float turnSpeed, int maxFuel, int maxHull, int cargo, int passengers);
void update();
virtual void shoot(std::vector<Shootable*> &projectiles);
float getTurnRate() const;
float getFullScale () const;
int getFuelCap() const;
int getFuelRemaining() const;
void useFuel();
void setFuel(int);
int getHullCap() const;
int getHullRemaining() const;
void setHull(int _hull);
int getCargoSpace() const;
int getUsedCargoSpace() const;
void setUsedCargoSpace(int _cargoUsed);
int getPassengerSpace() const;
int getPassengersAboard() const;
void setPassengersAboard(int _passengersOn);
Ship * getTarget() const;
void setTarget(Ship *_target);
void addWeapon(Weapon *w);
};
#endif //SFML_TEMPLATE_SHIP_H
//
// Created by benmo on 2/16/2020.
//
#ifndef SFML_TEMPLATE_SHIP_H
#define SFML_TEMPLATE_SHIP_H
#include <vector>
#include <SFML/Graphics/Texture.hpp>
#include "GameSprite.h"
#include "Weapon.h"
class Ship : public GameSprite {
protected:
float fullScale, turnRate;
int fuelCap, fuel, hullCap, hull, cargoSpace, cargoUsed = 0, passengerSpace, passengersOn = 0;
std::vector<Weapon*> weapons;
Ship *target;
public:
Ship(const sf::Texture &texture, float scale, float xPos, float yPos, float velocity, float maxVelocity, float direction, float turnSpeed, int maxFuel, int maxHull, int cargo, int passengers);
void update();
virtual void shoot(std::vector<Shootable*> &projectiles);
float getTurnRate() const;
float getFullScale () const;
int getFuelCap() const;
int getFuelRemaining() const;
void useFuel();
void setFuel(int);
int getHullCap() const;
int getHullRemaining() const;
void setHull(int _hull);
int getCargoSpace() const;
int getUsedCargoSpace() const;
void setUsedCargoSpace(int _cargoUsed);
int getPassengerSpace() const;
int getPassengersAboard() const;
void setPassengersAboard(int _passengersOn);
Ship * getTarget() const;
void setTarget(Ship *_target);
void addWeapon(Weapon *w);
};
#endif //SFML_TEMPLATE_SHIP_H