My Project
AISimulator.h
1 #pragma once
2 #include "util/mutex.h"
3 #include <list>
4 using namespace std;
5 
6 // declaration
7 namespace NPL
8 {
9  class CNPLRuntime;
10 }
11 
12 namespace ParaEngine
13 {
29  {
30  private:
32  string m_sGameloop;
33  float m_fGameloopInterval;
35  mutex m_mutex;
37  NPL::CNPLRuntime* m_pRuntimeEnv;
38  bool m_bIsCleanedup;
39  public:
41  static CAISimulator * GetSingleton();
42 
46  void AddNPLCommand(const string& sCommand);
47 
49  inline NPL::CNPLRuntime* GetNPLRuntime(){return m_pRuntimeEnv;};
50 
52  void CleanUp();
53  bool IsCleanedUp();
54 
56  void FrameMove(float fElapsedTime = 0);
57 
63  int NPLActivate(const char* filepath, const char* code = NULL, int nLength=0);
71  void NPLLoadFile(const char* filename, bool bReload=false);
72 
78  void NPLDoString(const char* strCode, int nLength = 0);
79 
84  void SetGameLoop(const string& scriptName);
86  void SetGameLoopInterval(float fInterval);
87  public:
88 
89  CAISimulator(void);
90  ~CAISimulator(void);
91  };
92 }
define this to enable debugging of NPL code in visual studio
Definition: INPL.h:9
different physics engine has different winding order.
Definition: EventBinding.h:32
CNPLRuntime is a wrapper of the NPL application programming interface (NPL API).
Definition: NPLRuntime.h:64
AI and AI scripts handlers.
Definition: AISimulator.h:28
NPL::CNPLRuntime * GetNPLRuntime()
get the current NPL runtime environment.
Definition: AISimulator.h:49
Definition: inftrees.h:24
cross platform mutex
Definition: mutex.h:95