Nox Engine
 
Loading...
Searching...
No Matches
Component Struct Reference

The base class for all components in the ECS. More...

#include <ECS.h>

Inheritance diagram for Component:
Inheritance graph
Collaboration diagram for Component:
Collaboration graph

Public Member Functions

virtual void init ()
 Called once when the component is added to an entity.
 
virtual void update ()
 Called once per frame. Contains the component's main logic.
 
virtual void reload ()
 Called to reset the component's state.
 
virtual void draw ()
 Called once per frame after update. Used for rendering.
 

Public Attributes

Entityentity
 Pointer to the entity that owns this component.
 

Detailed Description

The base class for all components in the ECS.

Components contain data and logic that can be attached to entities.

Member Function Documentation

◆ draw()

virtual void Component::draw ( )
inlinevirtual

Called once per frame after update. Used for rendering.

Reimplemented in Animator, Button, Sprites, and Text.

◆ init()

virtual void Component::init ( )
inlinevirtual

Called once when the component is added to an entity.

Reimplemented in Animator, Button, Collider, Controller, MouseTracker, Sprites, Tile, and Transform.

◆ reload()

virtual void Component::reload ( )
inlinevirtual

Called to reset the component's state.

Reimplemented in Button, Controller, FPS, Points, MouseTracker, and Transform.

◆ update()

virtual void Component::update ( )
inlinevirtual

Called once per frame. Contains the component's main logic.

Reimplemented in Animator, Button, Collider, Controller, FPS, Points, MouseTracker, Sprites, Text, and Transform.


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