Tramway SDK
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tram::Ext::Design::Button Class Reference

Essentially a func_door. More...

#include <entities.h>

Inheritance diagram for tram::Ext::Design::Button:
tram::Entity

Public Member Functions

 Button (const SharedEntityData &, const ValueArray &)
 
void UpdateParameters ()
 
void SetParameters ()
 
void Load ()
 
void Unload ()
 
void Serialize ()
 
void EventHandler (Event &event)
 
void MessageHandler (Message &msg)
 
name_t GetType ()
 
- Public Member Functions inherited from tram::Entity
 Entity ()
 Creates an unnamed entity with a random ID. More...
 
 Entity (name_t name)
 Creates a named entity with a random ID. More...
 
 Entity (const SharedEntityData &)
 Creates an entity from a SharedEntityData. More...
 
virtual ~Entity ()
 
name_t GetName () const
 
id_t GetID () const
 
WorldCellGetCell ()
 
bool IsLoaded () const
 
bool IsAutoLoad () const
 
bool IsPersistent () const
 
bool IsChanged () const
 
bool IsDeleted () const
 
bool IsLoadedFromDisk () const
 
void Yeet ()
 
void SetAutoLoad (bool is)
 
void SetPersistent (bool is)
 
void SetLocation (vec3 loc)
 
void SetRotation (quat rot)
 
void UpdateTransform (const vec3 &loc, const quat &rot)
 
const vec3GetLocation ()
 
const quatGetRotation ()
 
void CheckTransition ()
 
SignalTableGetSignalTable ()
 

Static Public Member Functions

static void Register ()
 
- Static Public Member Functions inherited from tram::Entity
static void Update ()
 
static void RegisterType (name_t name, Entity *(*constr_func)(const SharedEntityData &, const ValueArray &), void(*destr_func)(Entity *), const uint32_t *fields, size_t fieldcount)
 
static void RegisterType (name_t name, Entity *(*constr_func)(const SharedEntityData &, const ValueArray &), void(*destr_func)(Entity *), const FieldInfo *fields, size_t fieldcount)
 
static void RegisterType (name_t name, Entity *(*constr_func)(const SharedEntityData &, const ValueArray &), void(*destr_func)(Entity *), std::initializer_list< FieldInfo > fields)
 
static void UpdateFromList ()
 
static EntityMake (name_t type, File *file)
 Loads an Entity from a File. More...
 
static EntityMake (name_t type, const SharedEntityData &, const ValueArray &)
 
static EntityFind (id_t entity_id)
 
static EntityFind (name_t entity_name)
 

Protected Member Functions

void SwitchState (int)
 
- Protected Member Functions inherited from tram::Entity
void Register ()
 
void Unregister ()
 
void FireSignal (signal_t type)
 
void FireSignal (signal_t type, Value value)
 

Protected Attributes

Component< RenderComponentrendercomponent
 
Component< PhysicsComponentphysicscomponent
 
EventListener tick
 
uint32_t flags
 
name_t model
 
name_t lightmap
 
vec3 origin
 
vec3 direction
 
float speed
 
float pause
 
float distance
 
name_t sound
 
name_t parent
 
vec3 start_pos
 
quat start_rot
 
float progress
 
float timer
 
int state
 
int last_activate
 
- Protected Attributes inherited from tram::Entity
id_t id = 0
 
name_t name
 
WorldCellcell = nullptr
 
SignalTablesignals = nullptr
 
quat rotation = {1.0f, 0.0f, 0.0f, 0.0f}
 
vec3 location = {0.0f, 0.0f, 0.0f}
 
uint32_t flags = 0
 

Additional Inherited Members

- Public Types inherited from tram::Entity
enum  : uint32_t { FIELD_SERIALIZE = 1 }
 
- Protected Types inherited from tram::Entity
enum  : uint32_t {
  NON_PERSISTENT = 1 , LOADED = 2 , DISABLE_AUTO_LOAD = 4 , NON_SERIALIZABLE = 8 ,
  DIRTY = 16 , DELETED = 32 , LOADED_FROM_DISK = 64
}
 

Detailed Description

Essentially a func_door.

It can open. It can close. It responds to Signal inputs and gives out outputs. It can be a door. It can be a lift. It can even be a button.

Constructor & Destructor Documentation

◆ Button()

tram::Ext::Design::Button::Button ( const SharedEntityData shared_data,
const ValueArray field_array 
)

Member Function Documentation

◆ EventHandler()

void tram::Ext::Design::Button::EventHandler ( Event event)
virtual

Reimplemented from tram::Entity.

◆ GetType()

name_t tram::Ext::Design::Button::GetType ( )
virtual

Implements tram::Entity.

◆ Load()

void tram::Ext::Design::Button::Load ( )
virtual

Implements tram::Entity.

◆ MessageHandler()

void tram::Ext::Design::Button::MessageHandler ( Message msg)
virtual

Implements tram::Entity.

◆ Register()

void tram::Ext::Design::Button::Register ( )
static

◆ Serialize()

void tram::Ext::Design::Button::Serialize ( )
virtual

Implements tram::Entity.

◆ SetParameters()

void tram::Ext::Design::Button::SetParameters ( )
virtual

Implements tram::Entity.

◆ SwitchState()

void tram::Ext::Design::Button::SwitchState ( int  )
protected

◆ Unload()

void tram::Ext::Design::Button::Unload ( )
virtual

Implements tram::Entity.

◆ UpdateParameters()

void tram::Ext::Design::Button::UpdateParameters ( )
virtual

Implements tram::Entity.

Member Data Documentation

◆ direction

vec3 tram::Ext::Design::Button::direction
protected

◆ distance

float tram::Ext::Design::Button::distance
protected

◆ flags

uint32_t tram::Ext::Design::Button::flags
protected

◆ last_activate

int tram::Ext::Design::Button::last_activate
protected

◆ lightmap

name_t tram::Ext::Design::Button::lightmap
protected

◆ model

name_t tram::Ext::Design::Button::model
protected

◆ origin

vec3 tram::Ext::Design::Button::origin
protected

◆ parent

name_t tram::Ext::Design::Button::parent
protected

◆ pause

float tram::Ext::Design::Button::pause
protected

◆ physicscomponent

Component<PhysicsComponent> tram::Ext::Design::Button::physicscomponent
protected

◆ progress

float tram::Ext::Design::Button::progress
protected

◆ rendercomponent

Component<RenderComponent> tram::Ext::Design::Button::rendercomponent
protected

◆ sound

name_t tram::Ext::Design::Button::sound
protected

◆ speed

float tram::Ext::Design::Button::speed
protected

◆ start_pos

vec3 tram::Ext::Design::Button::start_pos
protected

◆ start_rot

quat tram::Ext::Design::Button::start_rot
protected

◆ state

int tram::Ext::Design::Button::state
protected

◆ tick

EventListener tram::Ext::Design::Button::tick
protected

◆ timer

float tram::Ext::Design::Button::timer
protected

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