#include <lava.hpp>
|
| | Lava (glm::vec3 corner, ModelType model_type, float grid_width, const PointLightProperties &light_properties) |
| |
| bool | shouldTrigger (ServerGameState &state) override |
| |
| bool | shouldReset (ServerGameState &state) override |
| |
| void | doCollision (Object *other, ServerGameState &state) override |
| | Code to run when this object collides with another. More...
|
| |
| virtual SharedObject | toShared () override |
| | Generates a SharedObject representation of this object. More...
|
| |
| | Trap (ObjectType type, bool movable, glm::vec3 corner, Collider collider, ModelType model, glm::vec3 dimensions=glm::vec3(1.0f)) |
| |
| virtual bool | shouldTrigger (ServerGameState &state)=0 |
| |
| virtual void | trigger (ServerGameState &state) |
| |
| virtual bool | shouldReset (ServerGameState &state)=0 |
| |
| virtual void | reset (ServerGameState &state) |
| |
| SharedObject | toShared () override |
| | Generates a SharedObject representation of this object. More...
|
| |
| void | setIsDMTrap (bool is_dm_trap) |
| |
| void | setIsDMTrapHover (bool is_dm_trap_hover) |
| |
| void | setExpiration (std::chrono::time_point< std::chrono::system_clock > expiration) |
| |
| bool | getIsDMTrap () |
| |
| std::chrono::time_point< std::chrono::system_clock > | getExpiration () |
| |
| | Object (ObjectType type, Physics physics, ModelType modelType) |
| |
| virtual | ~Object () |
| |
| void | setModel (ModelType type) |
| | Sets this Object's model and initializes its dimensions to the given model's default dimensions. More...
|
| |
| virtual SharedObject | toShared () |
| | Generates a SharedObject representation of this object. More...
|
| |
| virtual void | doCollision (Object *other, ServerGameState &state) |
| | Code to run when this object collides with another. More...
|
| |
| std::string | to_string (unsigned int tab_offset) |
| |
| std::string | to_string () |
| |
|
| static const int | DAMAGE = 1 |
| |
| static std::unordered_map< ModelType, glm::vec3 > | models |
| | Maps from ModelType to a model's dimensions as read from the model files. (At present, these values are hard-coded in object.cpp) More...
|
| |
◆ Lava()
- Parameters
-
| corner | Corner position of the floor spike trap |
| model_type | type of model |
| grid_width | or how wide the longer axis should be (e.g. z if vertical, x if horizontal) |
◆ doCollision()
Code to run when this object collides with another.
NOTE: default implementation does nothing only override behaviors will matter
Reimplemented from Object.
◆ shouldReset()
Resets the trap
- Parameters
-
| state | GameState, in case you need that to determine if the trap should reset |
- Returns
- True if the trap should reset, false otherwise
Implements Trap.
◆ shouldTrigger()
Determines if the trap should be triggered
- Parameters
-
| state | GameState, in case you need that to determine if the trap should trigger |
- Returns
- True if the trap should trigger, false otherwise
Implements Trap.
◆ toShared()
◆ DAMAGE
| const int Lava::DAMAGE = 1 |
|
static |
The documentation for this class was generated from the following files: