AutorechargeBehavior.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <ivorium.hpp>
4 
5 namespace comp
6 {
7 
12 {
13 public:
15 
16  AutorechargeBehavior( iv::Instance * inst, iv::TimeId time, iv::Attr< int > * m_charges, uint64_t recharge_ms, int max );
17 
18  void reset();
19  void step( int step_ms );
20 
21 private:
22  iv::Attr< int > * m_charges;
23  uint64_t recharge_ms;
24  int max;
25 
26  int cooldown_ms;
27 };
28 
29 }