Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
lava.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <chrono>
9
10class Lava : public Trap {
11public:
12 static const int DAMAGE;
13
19 Lava(glm::vec3 corner, ModelType model_type, float grid_width, const PointLightProperties& light_properties);
20
21 bool shouldTrigger(ServerGameState& state) override;
22
23 bool shouldReset(ServerGameState& state) override;
24
25 void doCollision(Object* other, ServerGameState& state) override;
26
27 virtual SharedObject toShared() override;
28private:
29 std::chrono::time_point<std::chrono::system_clock> shoot_time;
30
31 PointLightProperties light_properties;
32};
Definition: lava.hpp:10
void doCollision(Object *other, ServerGameState &state) override
Code to run when this object collides with another.
Definition: lava.cpp:22
static const int DAMAGE
Definition: lava.hpp:12
virtual SharedObject toShared() override
Generates a SharedObject representation of this object.
Definition: lava.cpp:33
bool shouldReset(ServerGameState &state) override
Definition: lava.cpp:18
bool shouldTrigger(ServerGameState &state) override
Definition: lava.cpp:14
Definition: object.hpp:95
The ServerGameState class contains all abstract game state data and logic for a single game state ins...
Definition: servergamestate.hpp:43
Representation of the Object class used by ServerGameState, containing exactly the subset of Object d...
Definition: sharedobject.hpp:302
Definition: trap.hpp:9
ModelType
Enumeration of every render model in the game.
Definition: sharedmodel.hpp:6
Definition: point_light.hpp:5