#include <object.hpp>
|
| 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...
|
| |
◆ Object()
- Parameters
-
| type | Type of the object |
| Physics | position/physics info for the object |
| modelType | What kind of model to render for this object |
◆ ~Object()
◆ doCollision()
Code to run when this object collides with another.
NOTE: default implementation does nothing only override behaviors will matter
Reimplemented in Exit, FireballTrap, FloorSpike, Item, Lava, Minotaur, Orb, Projectile, Python, Slime, Spell, SpikeTrap, TeleporterTrap, and WeaponCollider.
◆ setModel()
Sets this Object's model and initializes its dimensions to the given model's default dimensions.
- Parameters
-
| type | ModelType of the render model that this Object should be rendered as. |
◆ to_string() [1/2]
| std::string Object::to_string |
( |
| ) |
|
|
inline |
◆ to_string() [2/2]
| std::string Object::to_string |
( |
unsigned int |
tab_offset | ) |
|
◆ toShared()
Generates a SharedObject representation of this object.
- Returns
- A SharedObject representation of this object.
Reimplemented in Creature, DungeonMaster, Enemy, Exit, Item, Lava, Orb, Player, Projectile, SolidSurface, Torchlight, Trap, WeaponCollider, and Lightning.
◆ animState
Object's animation state and current action. For non-animated objects, this defaults as AnimState::IdleAnim.
◆ distance_moved
| float Object::distance_moved |
Distance moved, for use in deciding when to play footsteps IMPORTANT: reset every time a footstep sound is performed for objects that play foosteps.
◆ globalID
◆ gridCellPositions
| std::vector<glm::ivec2> Object::gridCellPositions |
Vector of (x, y) positions of GridCells currently occupied by this object.
◆ is_sprinting
| bool Object::is_sprinting |
used to determine if the player is sprinting for animation purposes
◆ models
| std::unordered_map< ModelType, glm::vec3 > Object::models |
|
static |
Maps from ModelType to a model's dimensions as read from the model files. (At present, these values are hard-coded in object.cpp)
◆ modelType
Object's render model type (specifies this Object's render model to the client)
◆ movableID
Movable ID (used to index into the movable objects vector in ServerGameState)
◆ physics
Object's Physics-related properties.
◆ type
Identifies this object's type (derived class)
◆ typeID
The documentation for this class was generated from the following files: