R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
ecs::Wall Class Reference

Component for static or destructible walls/obstacles. More...

#include <Wall.hpp>

Inheritance diagram for ecs::Wall:
Inheritance graph
Collaboration diagram for ecs::Wall:
Collaboration graph

Public Member Functions

 Wall (bool destructible=false)
 Constructor.
 
 ~Wall () override=default
 
bool isDestructible () const
 Check if the wall is destructible.
 
void setDestructible (bool destructible)
 Set destructible state.
 
ComponentType getType () const override
 Get the component type ID.
 
- Public Member Functions inherited from ecs::IComponent
virtual ~IComponent ()=default
 Virtual destructor.
 

Private Attributes

bool _destructible
 Can this wall be destroyed?
 

Detailed Description

Component for static or destructible walls/obstacles.

Walls are obstacles that can be destructible or indestructible. They use Transform, Collider, and optionally Health components.

Definition at line 20 of file Wall.hpp.

Constructor & Destructor Documentation

◆ Wall()

ecs::Wall::Wall ( bool  destructible = false)
inlineexplicit

Constructor.

Parameters
destructibleWhether the wall can be destroyed

Definition at line 26 of file Wall.hpp.

◆ ~Wall()

ecs::Wall::~Wall ( )
overridedefault

Member Function Documentation

◆ getType()

ComponentType ecs::Wall::getType ( ) const
inlineoverridevirtual

Get the component type ID.

Returns
ComponentType Unique ID for Wall component.

Implements ecs::IComponent.

Definition at line 46 of file Wall.hpp.

◆ isDestructible()

bool ecs::Wall::isDestructible ( ) const
inline

Check if the wall is destructible.

Returns
True if destructible

Definition at line 34 of file Wall.hpp.

References _destructible.

◆ setDestructible()

void ecs::Wall::setDestructible ( bool  destructible)
inline

Set destructible state.

Parameters
destructibleNew state

Definition at line 40 of file Wall.hpp.

References _destructible.

Member Data Documentation

◆ _destructible

bool ecs::Wall::_destructible
private

Can this wall be destroyed?

Definition at line 49 of file Wall.hpp.

Referenced by isDestructible(), and setDestructible().


The documentation for this class was generated from the following file: