combat_system.hpp 578 Bytes
Newer Older
Florian Oetke's avatar
Florian Oetke committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#pragma once

#include <mirrage/ecs/entity_handle.hpp>
#include <mirrage/utils/messagebus.hpp>
#include <mirrage/utils/units.hpp>

namespace mirrage::ecs {
	class Entity_manager;
}

namespace phase_shifter::gameplay {

	struct Damaged_msg {
		mirrage::ecs::Entity_handle entity;
	};


	class Combat_system {
	  public:
		Combat_system(mirrage::util::Message_bus&, mirrage::ecs::Entity_manager&);

		void update(mirrage::util::Time);

	  private:
		mirrage::util::Mailbox_collection _mailbox;
		mirrage::ecs::Entity_manager&     _ecs;
	};

} // namespace phase_shifter::gameplay