Skip to content

File PluginExampleEvents.hpp

File List > Components > PluginExampleEvents.hpp

Go to the documentation of this file

#ifndef ENGINE_COMPONENTS_PLUGINEXAMPLEEVENTS_HPP_
#define ENGINE_COMPONENTS_PLUGINEXAMPLEEVENTS_HPP_

#include "ECS/Entity.hpp"
#include <functional>
#include <vector>

namespace Engine {
struct PluginExampleEvents {
    // A list of callbacks triggered when a specific condition is met
    std::vector<std::function<void(Entity me)>> onConditionMet;

    // Another list of callbacks that passes data (like the new state)
    std::vector<std::function<void(Entity me, int newState)>> onStateChanged;
};
} // namespace Engine

#endif // ENGINE_COMPONENTS_PLUGINEXAMPLEEVENTS_HPP_