-
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 branch 'feat/all-command' of github.com:maelbecel/R-Type into f…
…eat/all-command
- Loading branch information
Showing
9 changed files
with
69 additions
and
10 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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
** EPITECH PROJECT, 2023 | ||
** R-Type | ||
** File description: | ||
** ClockSystem | ||
*/ | ||
|
||
#include "ClockSystem.hpp" | ||
#include "Component/Clock.hpp" | ||
|
||
namespace RType { | ||
|
||
using namespace Exodia; | ||
|
||
///////////// | ||
// Methods // | ||
///////////// | ||
|
||
void ClockSystem::Update(World *world, Timestep ts) { | ||
|
||
world->LockMutex(); | ||
world->ForEach<Clock>([&](Entity *entity, auto clock) { | ||
clock->ElapsedTime += ts; | ||
EXODIA_INFO("ClockSystem: ElapsedTime: {0} from entity {1}", clock->ElapsedTime, | ||
entity->GetComponent<TagComponent>().Get().Tag); | ||
}); | ||
world->UnlockMutex(); | ||
} | ||
}; // namespace RType |
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, 2023 | ||
** R-Type | ||
** File description: | ||
** AnimationSystem | ||
*/ | ||
|
||
#ifndef CLOCKSYSTEM_HPP_ | ||
#define CLOCKSYSTEM_HPP_ | ||
|
||
// R-Type Events includes | ||
#include "Event/AnimationEvent.hpp" | ||
|
||
namespace RType { | ||
|
||
class ClockSystem : public Exodia::EntitySystem { | ||
|
||
////////////////////////////// | ||
// Constructor & Destructor // | ||
////////////////////////////// | ||
public: | ||
ClockSystem() = default; | ||
~ClockSystem() = default; | ||
|
||
///////////// | ||
// Methods // | ||
///////////// | ||
public: | ||
void Update(Exodia::World *world, Exodia::Timestep ts) override; | ||
}; | ||
}; // namespace RType | ||
|
||
#endif /* !CLOCKSYSTEM_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