SimpleAI
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups Pages
AIStepMessage.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include "IProtocolMessage.h"
7 
8 namespace ai {
9 
16 private:
17  int64_t _millis;
18 
19 public:
20  explicit AIStepMessage(int64_t millis) :
21  IProtocolMessage(PROTO_STEP) {
22  _millis = millis;
23  }
24 
25  explicit AIStepMessage(streamContainer& in) :
26  IProtocolMessage(PROTO_STEP) {
27  _millis = readLong(in);
28  }
29 
30  void serialize(streamContainer& out) const override {
31  addByte(out, _id);
32  addLong(out, _millis);
33  }
34 
35  inline int64_t getStepMillis() const {
36  return _millis;
37  }
38 };
39 
40 }
A protocol message is used for the serialization of the ai states for remote debugging.
Definition: IProtocolMessage.h:60
Perform one step if the ai controlled entities are in paused mode.
Definition: AIStepMessage.h:15