R-Type
R-Type project
RType::RtypeNetworkManager Class Reference
Inheritance diagram for RType::RtypeNetworkManager:
KapMirror::NetworkManager KapEngine::Component KapEngine::IComponent

Public Member Functions

 RtypeNetworkManager (std::shared_ptr< KapEngine::GameObject > go, bool _isServer=false)
 
void onStart () override
 call component start More...
 
void onClientConnected (const std::shared_ptr< KapMirror::NetworkConnection > &connection) override
 This is invoked when the client is connected to a server.
 
void onClientDisconnected (const std::shared_ptr< KapMirror::NetworkConnection > &connection) override
 This is invoked when the client is disconnected from a server.
 
void onServerClientConnected (const std::shared_ptr< KapMirror::NetworkConnection > &connection) override
 This is invoked when a client is connected to a server.
 
void onServerClientDisconnected (const std::shared_ptr< KapMirror::NetworkConnection > &connection) override
 This is invoked when a client is disconnected from a server.
 
- Public Member Functions inherited from KapMirror::NetworkManager
 NetworkManager (std::shared_ptr< KapEngine::GameObject > go)
 
std::shared_ptr< NetworkServergetServer () const
 
std::shared_ptr< NetworkClientgetClient () const
 
void onAwake () override
 call component awake More...
 
void onFixedUpdate () override
 call eachv x ms More...
 
void setTransport (const std::shared_ptr< Transport > &_transport)
 Set transport layer.
 
void setCompression (const std::shared_ptr< Compression > &_compression)
 
void startServer ()
 Starts the server, listening for incoming connections.
 
void stopServer ()
 Stops the server from listening and simulating the game.
 
void startClient ()
 Starts the client, connects it to the server with ip and port.
 
void stopClient ()
 Stops and disconnects the client.
 
- Public Member Functions inherited from KapEngine::Component
 Component (std::shared_ptr< GameObject > &go, std::string const &name)
 
 Component (GameObject &go, std::string const &name)
 
void __update (bool runDisplay=true)
 function call by KapEngine to update your component More...
 
bool __setId (std::size_t i)
 function call by KapEngine to init your component More...
 
GameObjectgetGameObject () const
 Get the Game Object object. More...
 
std::size_t getGameObjectId () const
 
virtual void onInit () override
 call on component init More...
 
virtual void onUpdate () override
 call each frame
 
virtual void onDisplay () override
 use to display some things this function is call after all updates fucntion
 
virtual void onTriggerEnter (std::shared_ptr< GameObject > go) override
 something enter in object More...
 
virtual void onTriggerStay (std::shared_ptr< GameObject > go) override
 something stay in object More...
 
virtual void onTriggerExit (std::shared_ptr< GameObject > go) override
 something out of object More...
 
virtual void onMouseEnter () override
 called when mouse enter object More...
 
virtual void onMouseStay () override
 called when mouse stay on object More...
 
virtual void onMouseExit () override
 called when mouse leave object More...
 
virtual bool checkComponentValidity () override
 Check you component is runnable With this function you can add some conditions to make your component runnable or not. More...
 
virtual void onGameQuit () override
 call when game is turn off More...
 
virtual void onDestroy () override
 call when component destroyed More...
 
virtual void onDisable () override
 call when GameObject is disable after being enable More...
 
virtual void onEnable () override
 call when GameObject is enable after being disable More...
 
virtual void onSceneUpdated () override
 call when scene is updated (not threaded) More...
 
virtual void onSceneGonnaUpdated () override
 call when scene will update (not threaded) More...
 
virtual void onSceneChanged () override
 call when scene is changed More...
 
std::size_t getLevel () const
 Get the Level component. More...
 
void setLevel (std::size_t lvl)
 Set the Level object. More...
 
bool isEnable () const
 return if component is enable More...
 
bool isDisable () const
 return if component is disbale More...
 
void setActive (bool b)
 Set the active status of component if true : component is active else component is disable. More...
 
std::string getName () const
 Get the component name. More...
 
void __engineStop ()
 
int getThreadRunning () const
 Get the Thread Running index index of thread component. More...
 
Events::Input getInput ()
 Get input events. More...
 
Events::Mouse getMouse ()
 Get mouse events. More...
 
void addRequireComponent (std::string const &componentName)
 Add require component If your component need another component to work, you can add it's name with this function. Without the component require this component cannot run. More...
 
void __fixedUpdate ()
 
void __awake ()
 check awake validity More...
 
TransformgetTransform ()
 Get the Transform component. More...
 
std::size_t getId () const
 Get the Id of component. More...
 
void __setPhysics (bool b)
 set if it is a physic component if component is a physic component then it will be updated in physic thread if engine is threaded More...
 
bool __isPhysics () const
 check if component is a physic component More...
 
void __sceneChanged ()
 
SceneManagement::ScenegetScene () const
 
KEnginegetEngine () const
 

Public Attributes

KapEngine::Dictionary< unsigned int, KapEngine::Dictionary< unsigned int, long long > > pingRequests
 
- Public Attributes inherited from KapMirror::NetworkManager
int maxConnections = 100
 
std::string networkAddress = "127.0.0.1"
 
int networkPort = 7777
 

Additional Inherited Members

- Static Public Member Functions inherited from KapMirror::NetworkManager
static NetworkManagergetInstance ()
 
- Protected Member Functions inherited from KapMirror::NetworkManager
virtual void onStartServer ()
 This is invoked when a server is started.
 
virtual void onStopServer ()
 This is called when a server is stopped.
 
virtual void onStartClient ()
 This is invoked when the client is started.
 
virtual void onStopClient ()
 This is called when a client is stopped.
 
- Protected Attributes inherited from KapEngine::Component
std::string _name
 Component name.
 

Member Function Documentation

◆ onStart()

void RtypeNetworkManager::onStart ( )
overridevirtual

call component start

will be called when the scene is loaded or when its KapEngine::GameObject is active after it is disabled

Reimplemented from KapEngine::Component.


The documentation for this class was generated from the following files: