Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
fakewall.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <chrono>
8
15class FakeWall : public Trap {
16public:
21 FakeWall(glm::vec3 corner, glm::vec3 dimensions);
22
23 const static std::chrono::seconds TIME_VISIBLE; // how long it should stay visible for
24 const static std::chrono::seconds TIME_INVISIBLE; // how long it should stay translucent for
25
26 bool shouldTrigger(ServerGameState& state) override;
27 bool shouldReset(ServerGameState& state) override;
28
29 // we don't override trigger and reset because client side it will choose to render it depending
30 // on whether it is triggered or not
31
32private:
33 std::chrono::time_point<std::chrono::system_clock> transition_time;
34};
Definition: fakewall.hpp:15
static const std::chrono::seconds TIME_VISIBLE
Definition: fakewall.hpp:23
bool shouldReset(ServerGameState &state) override
Definition: fakewall.cpp:24
static const std::chrono::seconds TIME_INVISIBLE
Definition: fakewall.hpp:24
bool shouldTrigger(ServerGameState &state) override
Definition: fakewall.cpp:15
The ServerGameState class contains all abstract game state data and logic for a single game state ins...
Definition: servergamestate.hpp:43
Definition: trap.hpp:9