TNet 3  3.0.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
TNet.TNEventReceiver Class Reference

Convenience class that you can inherit from that implements all of TNet's common notifications for user convenience. Note that this script should ideally only be used on a manager class that needs to know about all these events. If your class only needs a few of these events, consider simply subscribing to them directly using the same += and -= logic in OnEnable/OnDisable. More...

Inheritance diagram for TNet.TNEventReceiver:
ExampleMenu

Protected Member Functions

virtual void OnError (string msg)
 
virtual void OnConnect (bool success, string msg)
 
virtual void OnDisconnect ()
 
virtual void OnJoinChannel (int channelID, bool success, string message)
 
virtual void OnLeaveChannel (int channelID)
 
virtual void OnPlayerJoin (int channelID, Player p)
 
virtual void OnPlayerLeave (int channelID, Player p)
 
virtual void OnRenamePlayer (Player p, string previous)
 
virtual void OnSetServerData (string path, DataNode node)
 
virtual void OnSetChannelData (Channel ch, string path, DataNode node)
 
virtual void OnSetPlayerData (Player p, string path, DataNode node)
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Detailed Description

Convenience class that you can inherit from that implements all of TNet's common notifications for user convenience. Note that this script should ideally only be used on a manager class that needs to know about all these events. If your class only needs a few of these events, consider simply subscribing to them directly using the same += and -= logic in OnEnable/OnDisable.

Member Function Documentation

virtual void TNet.TNEventReceiver.OnConnect ( bool  success,
string  msg 
)
protectedvirtual

Reimplemented in ExampleMenu.

virtual void TNet.TNEventReceiver.OnDisable ( )
protectedvirtual
virtual void TNet.TNEventReceiver.OnDisconnect ( )
protectedvirtual

Reimplemented in ExampleMenu.

virtual void TNet.TNEventReceiver.OnEnable ( )
protectedvirtual
virtual void TNet.TNEventReceiver.OnError ( string  msg)
protectedvirtual
virtual void TNet.TNEventReceiver.OnJoinChannel ( int  channelID,
bool  success,
string  message 
)
protectedvirtual

Reimplemented in ExampleMenu.

virtual void TNet.TNEventReceiver.OnLeaveChannel ( int  channelID)
protectedvirtual

Reimplemented in ExampleMenu.

virtual void TNet.TNEventReceiver.OnPlayerJoin ( int  channelID,
Player  p 
)
protectedvirtual
virtual void TNet.TNEventReceiver.OnPlayerLeave ( int  channelID,
Player  p 
)
protectedvirtual
virtual void TNet.TNEventReceiver.OnRenamePlayer ( Player  p,
string  previous 
)
protectedvirtual
virtual void TNet.TNEventReceiver.OnSetChannelData ( Channel  ch,
string  path,
DataNode  node 
)
protectedvirtual
virtual void TNet.TNEventReceiver.OnSetPlayerData ( Player  p,
string  path,
DataNode  node 
)
protectedvirtual
virtual void TNet.TNEventReceiver.OnSetServerData ( string  path,
DataNode  node 
)
protectedvirtual

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