Skip to content

Class Engine::SpritePlugin

ClassList > Engine > SpritePlugin

Plugin that bundles the SpriteComponent andSpriteSystem .

  • #include <SpritePlugin.hpp>

Inherits the following classes: Engine::IPlugin

Public Functions

Type Name
virtual void Init (Registry & registry) override
Initializes the SpritePlugin by registering theSpriteComponent andSpriteSystem . Also registersPosition , whichSpriteSystem needs to place sprites.

Public Functions inherited from Engine::IPlugin

See Engine::IPlugin

Type Name
virtual void Init (Registry & registry) = 0
Initializes the plugin, registering components and systems.
virtual ~IPlugin () = default

Public Static Functions

Type Name
void AttachToEntity (Registry & registry, Entity entity, const SpriteComponent & sprite)
Attaches a SpriteComponent to an entity and ensures it has aPosition . An existingPosition is left untouched.

Public Functions Documentation

function Init

Initializes the SpritePlugin by registering theSpriteComponent andSpriteSystem . Also registersPosition , whichSpriteSystem needs to place sprites.

virtual void Engine::SpritePlugin::Init (
    Registry & registry
) override

Parameters:

  • registry The ECS registry where components and systems are registered.

Implements Engine::IPlugin::Init


Public Static Functions Documentation

function AttachToEntity

Attaches a SpriteComponent to an entity and ensures it has aPosition . An existingPosition is left untouched.

static void Engine::SpritePlugin::AttachToEntity (
    Registry & registry,
    Entity entity,
    const SpriteComponent & sprite
) 

Parameters:

  • registry The ECS registry containing the entity.
  • entity The entity to attach the sprite to.
  • sprite The sprite component to attach.


The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Plugins/SpritePlugin.hpp