IContext is an abstract base class that provides an interface for managing game state and interactions between different systems. It serves as a central point for operations related to entities, such as creation, destruction, and manipulation.

class IContext {
      public:
        IContext() = default;

        IContext(std::shared_ptr<INetwork> network) : _network(network) {}

        virtual ~IContext() = default;

        virtual void destroyObject(int id) = 0;

        virtual void createEnemy(int id) = 0;

        virtual void animationObject(int id, const ecs::component::Animations &rect) = 0;

        virtual void moveObject(int id, int x, int y) = 0;

        virtual void createProjectile(int id, const rtype::protocol::ObjectTypes &type) = 0;

        virtual void createMilespates(int id) = 0;

        virtual void createBoss(int id) = 0;

        virtual void createBossProjectile(int id, const rtype::protocol::ObjectTypes &type) = 0;

        std::shared_ptr<INetwork> _network = nullptr;

      protected:
    };

Destructor

(Virtual destructor to allow for proper cleanup of derived classes.)

Virtual Methods

Member Variables