Core::GameInteractionObject

Game Interaction Object in Unified Engine

The GameInteractionObject class serves as a base class in the Unified Engine for objects that have interactions within the game world. It encapsulates the necessary attributes and operations that are common to game-interactive entities.

Object Configuration & ID

The class uses an ID mechanism to identify the type and purpose of different interaction objects. An example ID is provided using a macro definition.

#define __GIO_WINDOW_OBJECT_ID__ 0x1

Class Definition

The primary class definition includes toggles, ID management, and virtual functions for loading and unloading.

class GameInteractionObject{
protected:
    bool loaded = false;
    uint64_t ID = 0;
protected:
    virtual int Load(){return -1;}
    virtual int Unload(){return -1;}

    inline GameInteractionObject(uint64_t id){
        this->ID = id;
    }
};

Last updated