-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from MasterLaplace/dev
Dev 0.2.0
- Loading branch information
Showing
55 changed files
with
3,273 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,8 @@ jobs: | |
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Your Name" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "MasterLaplace" | ||
- name: Install Doxygen | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -574,4 +574,3 @@ docs/Flakkari/ | |
build/ | ||
.Test/ | ||
poc/ | ||
Game/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
Flakkari/Engine/EntityComponentSystem/Components/2D/Movable.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** Title: Flakkari | ||
** Author: MasterLaplace | ||
** Created: 2023-01-06 | ||
** File description: | ||
** Movable | ||
*/ | ||
|
||
#ifndef MOVABLE_HPP_ | ||
#define MOVABLE_HPP_ | ||
|
||
#include "../../../Math/Vector.hpp" | ||
|
||
namespace Flakkari::Engine::ECS::Components::_2D { | ||
|
||
struct Movable { | ||
Math::Vector2d velocity; // pixels / second | ||
double angularVelocity; // degrees / second | ||
Math::Vector2d acceleration; // pixels / second^2 | ||
double angularAcceleration; // degrees / second^2 | ||
|
||
Movable() : velocity(0, 0), acceleration(0, 0) {}; | ||
Movable(const Math::Vector2d &velocity, const Math::Vector2d &acceleration) : velocity(velocity), acceleration(acceleration) {}; | ||
Movable(const Movable &other) : velocity(other.velocity), acceleration(other.acceleration) {}; | ||
}; | ||
|
||
} // namespace Game::ECS::Components::_2D | ||
|
||
#endif /* !MOVABLE_HPP_ */ |
29 changes: 29 additions & 0 deletions
29
Flakkari/Engine/EntityComponentSystem/Components/2D/Transform.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** Title: Flakkari | ||
** Author: MasterLaplace | ||
** Created: 2023-01-06 | ||
** File description: | ||
** Transform | ||
*/ | ||
|
||
#ifndef TRANSFORM_HPP_ | ||
#define TRANSFORM_HPP_ | ||
|
||
#include "../../../Math/Vector.hpp" | ||
|
||
namespace Flakkari::Engine::ECS::Components::_2D { | ||
|
||
struct Transform { | ||
Math::Vector2d position; | ||
Math::Vector2d scale; | ||
double rotation; | ||
|
||
Transform() : position(0, 0), scale(1, 1), rotation(0) {}; | ||
Transform(const Math::Vector2d &position, const Math::Vector2d &scale, double rotation) : position(position), scale(scale), rotation(rotation) {}; | ||
Transform(const Transform &other) : position(other.position), scale(other.scale), rotation(other.rotation) {}; | ||
}; | ||
|
||
} // namespace Game::ECS::Components::_2D | ||
|
||
#endif /* !TRANSFORM_HPP_ */ |
33 changes: 33 additions & 0 deletions
33
Flakkari/Engine/EntityComponentSystem/Components/Common/Child.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** Title: Flakkari | ||
** Author: MasterLaplace | ||
** Created: 2023-01-06 | ||
** File description: | ||
** Child | ||
*/ | ||
|
||
#ifndef CHILD_HPP_ | ||
#define CHILD_HPP_ | ||
|
||
#include <string> | ||
|
||
namespace Flakkari::Engine::ECS::Components::Common { | ||
|
||
/** | ||
* @brief Child component for ECS entities that have a child entity attached to them | ||
* | ||
* @details This component is used to create a child entity based on a prefab | ||
* and attach it to the entity that has this component | ||
*/ | ||
struct Child { | ||
std::string name; | ||
|
||
Child() : name("") {} | ||
Child(const std::string &name) : name(name) {} | ||
Child(const Child &other) : name(other.name) {} | ||
}; | ||
|
||
} // namespace Flakkari::Engine::ECS::Components::Common | ||
|
||
#endif /* !CHILD_HPP_ */ |
32 changes: 32 additions & 0 deletions
32
Flakkari/Engine/EntityComponentSystem/Components/Common/Parent.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** Title: Flakkari | ||
** Author: MasterLaplace | ||
** Created: 2023-01-06 | ||
** File description: | ||
** Parent | ||
*/ | ||
|
||
#ifndef PARENT_HPP_ | ||
#define PARENT_HPP_ | ||
|
||
#include <string> | ||
|
||
namespace Flakkari::Engine::ECS::Components::Common { | ||
|
||
/** | ||
* @brief Parent component for ECS entities that have a parent entity attached to them | ||
* | ||
* @details This component is used to store the parent entity of an entity in the ECS | ||
*/ | ||
struct Parent { | ||
std::size_t entity; | ||
|
||
Parent() : entity(0) {} | ||
Parent(const std::size_t &entity) : entity(entity) {} | ||
Parent(const Parent &other) : entity(other.entity) {} | ||
}; | ||
|
||
} // namespace Flakkari::Engine::ECS::Components::Common | ||
|
||
#endif /* !PARENT_HPP_ */ |
32 changes: 32 additions & 0 deletions
32
Flakkari/Engine/EntityComponentSystem/Components/Common/Tag.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** Title: Flakkari | ||
** Author: MasterLaplace | ||
** Created: 2023-01-06 | ||
** File description: | ||
** Tag | ||
*/ | ||
|
||
#ifndef TAG_HPP_ | ||
#define TAG_HPP_ | ||
|
||
#include <string> | ||
|
||
namespace Flakkari::Engine::ECS::Components::Common { | ||
|
||
/** | ||
* @brief Tag component for ECS entities that have a script attached to them | ||
* | ||
* @details This component is used to store the path to the script that will be executed | ||
*/ | ||
struct Tag { | ||
std::string tag; | ||
|
||
Tag() : tag("") {} | ||
Tag(const std::string &tag) : tag(tag) {} | ||
Tag(const Tag &other) : tag(other.tag) {} | ||
}; | ||
|
||
} // namespace Game::ECS::Components::Common | ||
|
||
#endif /* !TAG_HPP_ */ |
22 changes: 22 additions & 0 deletions
22
Flakkari/Engine/EntityComponentSystem/Components/Components2D.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/************************************************************************** | ||
* Flakkari Engine Library v0.2.0 | ||
* | ||
* Flakkari Library is a C++ Library for Network. | ||
* @file Components2D.hpp | ||
* @brief Components2D header. Contains all 2D components. | ||
* (Collider, Movable, RigidBody, Transform) | ||
* | ||
* Flakkari Library is under MIT License. | ||
* https://opensource.org/licenses/MIT | ||
* © 2023 @MasterLaplace | ||
* @version 0.2.0 | ||
* @date 2023-01-06 | ||
**************************************************************************/ | ||
|
||
#ifndef COMPONENTS2D_HPP_ | ||
#define COMPONENTS2D_HPP_ | ||
|
||
#include "2D/Movable.hpp" // Movable component (velocity, angularVelocity, acceleration, angularAcceleration) | ||
#include "2D/Transform.hpp" // Transform component (position, rotation, scale) | ||
|
||
#endif /* !COMPONENTS2D_HPP_ */ |
22 changes: 22 additions & 0 deletions
22
Flakkari/Engine/EntityComponentSystem/Components/ComponentsCommon.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/************************************************************************** | ||
* Flakkari Engine Library v0.2.0 | ||
* | ||
* Flakkari Library is a C++ Library for Network. | ||
* @file ComponentsCommon.hpp | ||
* @brief ComponentsCommon header. Contains all common components. | ||
* (Parent, Tag) | ||
* | ||
* Flakkari Library is under MIT License. | ||
* https://opensource.org/licenses/MIT | ||
* © 2023 @MasterLaplace | ||
* @version 0.2.0 | ||
* @date 2023-01-06 | ||
**************************************************************************/ | ||
|
||
#ifndef COMPONENTSCOMMON_HPP_ | ||
#define COMPONENTSCOMMON_HPP_ | ||
|
||
#include "Common/Parent.hpp" // Parent component (entity) | ||
#include "Common/Tag.hpp" // Tag component (tag) | ||
|
||
#endif /* !COMPONENTSCOMMON_HPP_ */ |
Oops, something went wrong.