Photon Bolt Engine API
Networking Middleware
Public Member Functions | Properties | List of all members
BoltGlobalBehaviourAttribute Class Reference

Sets the network mode and scenes that a Bolt.GlobalEventListener should be run on More...

Inheritance diagram for BoltGlobalBehaviourAttribute:

Public Member Functions

 BoltGlobalBehaviourAttribute ()
 
 BoltGlobalBehaviourAttribute (BoltNetworkModes mode)
 
 BoltGlobalBehaviourAttribute (params string[] scenes)
 
 BoltGlobalBehaviourAttribute (BoltNetworkModes mode, params string[] scenes)
 

Properties

BoltNetworkModes Mode [get]
 Sets this behaviour to run only in server or client network mode More...
 
string[] Scenes [get]
 A list of scenes for this behaviour to run on More...
 

Detailed Description

Sets the network mode and scenes that a Bolt.GlobalEventListener should be run on

Example: Setting up a server-side event listener to spawn players

1 [BoltGlobalBehaviour(BoltNetworkModes.Server)]
2 public class BoltServerCallbacks: Bolt.GlobalEventListener {
3  public override void SceneLoadLocalDone(string map) {
4  SpawnServerPlayer();
5  }
6 
7  public override void SceneLoadRemoteDone(BoltConnection connection) {
8  SpawnRemotePlayer(connection);
9  }
10 }

Constructor & Destructor Documentation

BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( )
inline
BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( BoltNetworkModes  mode)
inline
BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( params string[]  scenes)
inline
BoltGlobalBehaviourAttribute.BoltGlobalBehaviourAttribute ( BoltNetworkModes  mode,
params string[]  scenes 
)
inline

Property Documentation

BoltNetworkModes BoltGlobalBehaviourAttribute.Mode
get

Sets this behaviour to run only in server or client network mode

string [] BoltGlobalBehaviourAttribute.Scenes
get

A list of scenes for this behaviour to run on