My Project
EmuCSParaEditGame.h
1 #pragma once
2 #include "FrameRateController.h"
3 
4 namespace NPL
5 {
6  struct NPLPacket;
7 }
8 namespace ParaEngine
9 {
10  class CEnvSimServer;
11  class CEnvSimClient;
17  {
18  public:
19  CEmuCSParaEditGame(void);
20  ~CEmuCSParaEditGame(void);
22  static CEmuCSParaEditGame& GetInstance();
23 
24  enum CurrentState
25  {
26  STATE_STAND_ALONE = 0,
27  STATE_SERVER,
28  STATE_CLIENT,
29  };
30  public:
31 
36  CurrentState GetState();
37 
40  bool SetState(CurrentState state);
41 
46  bool OnReceiveNPLPacket(NPL::NPLPacket* p);
52  bool OnCenterUserLost(const char* sUserName);
58  bool OnReceptorUserLost(const char* sUserName);
68  bool SendTerrainUpdate(const string& sDestination, const D3DXVECTOR3& vCenter, float fRadius, float fResolution=1.f);
69 
75  bool OnReceiveTerrainUpdate(NPL::NPLPacket* p);
76 
80  void FrameMove();
81  private:
82  CEnvSimServer* GetEnvServer();
83  CEnvSimClient* GetEnvClient();
84 
85  CFrameRateController m_clientTimer;
86  CFrameRateController m_serverTimer;
87  };
88 
89 }
this is the environment simulator of a standard game world server.
Definition: EnvSimClient.h:14
this is the environment simulator of a standard game world server.
Definition: EnvSimServer.h:18
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
emulating a client/server based ParaEngine world editing game, using NPL language.
Definition: EmuCSParaEditGame.h:16
the class for all frame rate controller.
Definition: FrameRateController.h:10