refactoring

master
Vectozavr 2022-07-19 16:37:37 +07:00
parent d3fbaa0418
commit bc223e4230
8 changed files with 25 additions and 26 deletions

View File

@ -8,8 +8,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
add_executable(${CMAKE_PROJECT_NAME}
# game:
Source.cpp
Player.cpp
Player.h
player/Player.cpp
player/Player.h
network/ShooterClient.cpp
network/ShooterClient.h
network/ShooterServer.cpp
@ -21,8 +21,8 @@ add_executable(${CMAKE_PROJECT_NAME}
weapon/Gun.h
weapon/Gold_Ak47.h
weapon/Rifle.h
PlayerController.cpp
PlayerController.h
player/PlayerController.cpp
player/PlayerController.h
Shooter.cpp
Shooter.h
ShooterConsts.h

View File

@ -6,9 +6,9 @@
#define SHOOTER_SHOOTER_H
#include "engine/Engine.h"
#include "Player.h"
#include "PlayerController.h"
#include "PlayerController.h"
#include "player/Player.h"
#include "player/PlayerController.h"
#include "player/PlayerController.h"
#include "engine/gui/Window.h"
#include "network/ShooterClient.h"

View File

@ -6,7 +6,7 @@
#define SHOOTER_SHOOTERCLIENT_H
#include "../engine/network/ClientUDP.h"
#include "../Player.h"
#include "../player/Player.h"
class ShooterClient final : public ClientUDP {
private:

View File

@ -6,7 +6,7 @@
#define SHOOTER_SHOOTERSERVER_H
#include "../engine/network/ServerUDP.h"
#include "../Player.h"
#include "../player/Player.h"
struct BonusInfo final {
const Vec3D position{};

View File

@ -5,9 +5,9 @@
#include "Player.h"
#include <utility>
#include "engine/io/Screen.h"
#include "engine/utils/Log.h"
#include "engine/animation/Animations.h"
#include "../engine/io/Screen.h"
#include "../engine/utils/Log.h"
#include "../engine/animation/Animations.h"
Player::Player(ObjectNameTag name, const std::string &filename, const Vec3D &scale) : RigidBody(std::move(name), filename, scale) {
setAcceleration(Vec3D{0, -ShooterConsts::GRAVITY, 0});

View File

@ -7,15 +7,15 @@
#include <SFML/Audio/Sound.hpp>
#include <utility>
#include "engine/utils/ResourceManager.h"
#include "engine/Camera.h"
#include "engine/World.h"
#include "weapon/Ak47.h"
#include "weapon/Shotgun.h"
#include "weapon/Gun.h"
#include "weapon/Gold_Ak47.h"
#include "weapon/Rifle.h"
#include "ShooterConsts.h"
#include "../engine/utils/ResourceManager.h"
#include "../engine/Camera.h"
#include "../engine/World.h"
#include "../weapon/Ak47.h"
#include "../weapon/Shotgun.h"
#include "../weapon/Gun.h"
#include "../weapon/Gold_Ak47.h"
#include "../weapon/Rifle.h"
#include "../ShooterConsts.h"
class Player final : public RigidBody {
private:

View File

@ -3,9 +3,8 @@
//
#include "PlayerController.h"
#include "engine/utils/Log.h"
#include "ShooterConsts.h"
#include "engine/animation/Animations.h"
#include "../engine/utils/Log.h"
#include "../engine/animation/Animations.h"
PlayerController::PlayerController(std::shared_ptr<Player> player,
std::shared_ptr<Keyboard> keyboard,

View File

@ -6,8 +6,8 @@
#define SHOOTER_PLAYERCONTROLLER_H
#include "Player.h"
#include "engine/io/Keyboard.h"
#include "engine/io/Mouse.h"
#include "../engine/io/Keyboard.h"
#include "../engine/io/Mouse.h"
class PlayerController final {
private: