C# Class BeardedManStudios.Network.NetworkingManager

This is a singleton manager for all of the networked behaviors
Inheritance: SimpleNetworkedMonoBehavior
Afficher le fichier Open project: drakelinglabs/unityarmada Class Usage Examples

Méthodes publiques

Свойство Type Description
allClientsLoaded NetWorker.BasicEvent
frameInterval int
networkInstantiates UnityEngine.GameObject[]
resourcesDirectory string
setupActions List
startNetworkedSceneBehaviors BeardedManStudios.Network.SimpleNetworkedMonoBehavior[]
updateTimeInterval float

Méthodes publiques

Méthode Description
Disconnect ( ) : void
GetAllSimpleMonoBehaviors ( GameObject o ) : BeardedManStudios.Network.SimpleNetworkedMonoBehavior[]
GetFrameCountFromTime ( double milliseconds ) : byte
Instantiate ( NetworkReceivers receivers, string obj, Vector3 position, Quaternion rotation, int callbackCounter ) : void

This is the main instantiate method that is proxyed through the Networking.Instantiate method

PollPlayerList ( Action callback = null ) : void

Get the latest list of players from the server

Populate ( BeardedManStudios.Network.NetWorker socket ) : bool

This method is used to do all of the initial setup of objects

PullObject ( string name, string fallback = "" ) : GameObject

Get a game object of a given name in the NetworkingManager

SetName ( string newName ) : void

Set the player name for the current running client or server

TryPullIdFromObject ( string obj, ulong &uniqueId ) : bool

Méthodes protégées

Méthode Description
NetworkStart ( ) : void

Private Methods

Méthode Description
Awake ( ) : void
CreateUnityEventObject ( ) : void
DeserializeManualProperties ( NetworkingPlayer player, NetworkingStream stream ) : void
DestroyOnNetwork ( ulong networkId ) : void
InitializeObject ( ulong startObjectId, int count ) : void
NetworkInstantiate ( ulong ownerId, ulong startNetworkId, string name, Vector3 position, Quaternion rotation, int callbackId ) : void
OnLevelWasLoaded ( int level ) : void
PlayerLoadedLevel ( NetworkingPlayer player, NetworkingStream stream ) : void
PollPlayers ( ) : void
PollPlayersResponse ( NetworkingPlayer sender, NetworkingStream stream ) : void
ReadTransportObject ( NetworkingPlayer player, NetworkingStream stream ) : void
SetPlayerName ( string newName ) : void
SkipResetOnDestroy ( ) : void
TellServerLevelLoaded ( int level ) : void
Update ( ) : void
UpdateServerTime ( float time ) : void

Method Details

Disconnect() public méthode

public Disconnect ( ) : void
Résultat void

GetAllSimpleMonoBehaviors() public static méthode

public static GetAllSimpleMonoBehaviors ( GameObject o ) : BeardedManStudios.Network.SimpleNetworkedMonoBehavior[]
o UnityEngine.GameObject
Résultat BeardedManStudios.Network.SimpleNetworkedMonoBehavior[]

GetFrameCountFromTime() public méthode

public GetFrameCountFromTime ( double milliseconds ) : byte
milliseconds double
Résultat byte

Instantiate() public static méthode

This is the main instantiate method that is proxyed through the Networking.Instantiate method
public static Instantiate ( NetworkReceivers receivers, string obj, Vector3 position, Quaternion rotation, int callbackCounter ) : void
receivers NetworkReceivers The receivers that will get this instantiate command
obj string The name of the object that is to be instantiated
position Vector3 The position where the object will be instantiated at
rotation UnityEngine.Quaternion The rotation that the object will have when instantiated
callbackCounter int The id for the callback that is to be called when this object is instantiated
Résultat void

NetworkStart() protected méthode

protected NetworkStart ( ) : void
Résultat void

PollPlayerList() public méthode

Get the latest list of players from the server
public PollPlayerList ( Action callback = null ) : void
callback Action The method to call once the player list has been received
Résultat void

Populate() public méthode

This method is used to do all of the initial setup of objects
public Populate ( BeardedManStudios.Network.NetWorker socket ) : bool
socket BeardedManStudios.Network.NetWorker
Résultat bool

PullObject() public méthode

Get a game object of a given name in the NetworkingManager
public PullObject ( string name, string fallback = "" ) : GameObject
name string Name of the game object to pull
fallback string
Résultat UnityEngine.GameObject

SetName() public méthode

Set the player name for the current running client or server
public SetName ( string newName ) : void
newName string
Résultat void

TryPullIdFromObject() public static méthode

public static TryPullIdFromObject ( string obj, ulong &uniqueId ) : bool
obj string
uniqueId ulong
Résultat bool

Property Details

allClientsLoaded public_oe property

public NetWorker.BasicEvent allClientsLoaded
Résultat NetWorker.BasicEvent

frameInterval public_oe property

public int frameInterval
Résultat int

networkInstantiates public_oe property

All game objects to be instantiated whenever necessary
public GameObject[],UnityEngine networkInstantiates
Résultat UnityEngine.GameObject[]

resourcesDirectory public_oe property

This is the resources directory where network prefabs are to be loaded from
public string resourcesDirectory
Résultat string

setupActions public_oe static_oe property

The list of all setup actions for when an object is instantiated
public static List setupActions
Résultat List

startNetworkedSceneBehaviors public_oe property

This is a list of all of the behaviors in the scene that need to be setup on the network
public SimpleNetworkedMonoBehavior[],BeardedManStudios.Network startNetworkedSceneBehaviors
Résultat BeardedManStudios.Network.SimpleNetworkedMonoBehavior[]

updateTimeInterval public_oe property

The amount of time in seconds to update the time from the server
public float updateTimeInterval
Résultat float