supertux
Public Types | Public Member Functions | Protected Member Functions | List of all members
TriggerBase Class Referenceabstract

This class is the base class for all objects you can interact with in some way. More...

#include <trigger_base.hpp>

Inheritance diagram for TriggerBase:
Inheritance graph
[legend]
Collaboration diagram for TriggerBase:
Collaboration graph
[legend]

Public Types

enum  EventType { EVENT_TOUCH, EVENT_LOSETOUCH, EVENT_ACTIVATE }
 

Public Member Functions

virtual void event (Player &player, EventType type)=0
 Receive trigger events.
 
virtual void object_removed (GameObject *object) override
 Called by GameObject destructor of an object in losetouch_listeners.
 

Protected Member Functions

void update ()
 
HitResponse collision (GameObject &other, const CollisionHit &hit)
 

Detailed Description

This class is the base class for all objects you can interact with in some way.

There are several interaction types defined like touch and activate

Member Enumeration Documentation

◆ EventType

Enumerator
EVENT_TOUCH 

Object came into contact.

EVENT_LOSETOUCH 

Lost contact with object.

EVENT_ACTIVATE 

Action button pressed.


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