1 #ifndef BLOBS_CREATURE_NEED_HPP_
2 #define BLOBS_CREATURE_NEED_HPP_
19 // how fast value grows per second
21 // the value at which this need is no longer satisfied
22 double inconvenient = 0.0;
23 // the value at which this need starts to hurt
24 double critical = 0.0;
26 virtual ~Need() noexcept;
28 void Tick(double dt) noexcept;
30 bool IsSatisfied() const noexcept { return value < inconvenient; }
31 bool IsInconvenient() const noexcept { return value >= inconvenient && value < critical; }
32 bool IsCritical() const noexcept { return value >= critical; }
34 virtual void ApplyEffect(Creature &, double dt) = 0;