Bomberman
AnimationsSystem.hpp
Go to the documentation of this file.
1 //
2 // Created by cbihan on 01/06/2021.
3 //
4 
5 #pragma once
6 
7 #include <System/System.hpp>
10 
11 namespace BBM
12 {
13  class AnimationsSystem : public WAL::System<Drawable3DComponent, AnimationsComponent>
14  {
15  private:
16 
18  long maxAnimsToSkip = 4;
19 
22 
23  public:
25  void onUpdate(WAL::ViewEntity<Drawable3DComponent, AnimationsComponent> &entity, std::chrono::nanoseconds dtime) override;
26 
28  void onSelfUpdate(std::chrono::nanoseconds dtime) override;
29 
31  explicit AnimationsSystem(WAL::Wal &wal);
33  AnimationsSystem(const AnimationsSystem &) = default;
35  ~AnimationsSystem() override = default;
37  AnimationsSystem &operator=(const AnimationsSystem &) = delete;
38  };
39 }
BBM::AnimationsSystem::~AnimationsSystem
~AnimationsSystem() override=default
A default destructor.
WAL::ViewEntity
Definition: View.hpp:19
BBM::AnimationsSystem::onSelfUpdate
void onSelfUpdate(std::chrono::nanoseconds dtime) override
A method called after all entities that this system manage has been updated.
Definition: AnimationsSystem.cpp:36
System.hpp
BBM::AnimationsSystem::onUpdate
void onUpdate(WAL::ViewEntity< Drawable3DComponent, AnimationsComponent > &entity, std::chrono::nanoseconds dtime) override
Definition: AnimationsSystem.cpp:19
BBM::AnimationsSystem
Definition: AnimationsSystem.hpp:13
BBM
Definition: AnimationsComponent.cpp:9
WAL::Wal
The main WAL class, it is used to setup and run the ECS.
Definition: Wal.hpp:27
BBM::AnimationsSystem::maxAnimsToSkip
long maxAnimsToSkip
used to reset animsToskip
Definition: AnimationsSystem.hpp:18
BBM::AnimationsSystem::AnimationsSystem
AnimationsSystem(WAL::Wal &wal)
A default constructor.
Definition: AnimationsSystem.cpp:15
BBM::AnimationsSystem::operator=
AnimationsSystem & operator=(const AnimationsSystem &)=delete
A system is not assignable.
WAL::System
A base system of WAL.
Definition: System.hpp:22
BBM::AnimationsSystem::animsToSkip
long animsToSkip
Should the next update call be skipped?
Definition: AnimationsSystem.hpp:21
Drawable3DComponent.hpp
AnimationsComponent.hpp