C# Класс BeardedManStudios.Network.NetworkingManager

This is a singleton manager for all of the networked behaviors
Наследование: SimpleNetworkedMonoBehavior
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
allClientsLoaded NetWorker.BasicEvent
frameInterval int
networkInstantiates UnityEngine.GameObject[]
resourcesDirectory string
setupActions List
startNetworkedSceneBehaviors BeardedManStudios.Network.SimpleNetworkedMonoBehavior[]
updateTimeInterval float

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
NetworkStart ( ) : void

Приватные методы

Метод Описание
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

Описание методов

Disconnect() публичный Метод

public Disconnect ( ) : void
Результат void

GetAllSimpleMonoBehaviors() публичный статический Метод

public static GetAllSimpleMonoBehaviors ( GameObject o ) : BeardedManStudios.Network.SimpleNetworkedMonoBehavior[]
o UnityEngine.GameObject
Результат BeardedManStudios.Network.SimpleNetworkedMonoBehavior[]

GetFrameCountFromTime() публичный Метод

public GetFrameCountFromTime ( double milliseconds ) : byte
milliseconds double
Результат byte

Instantiate() публичный статический Метод

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
Результат void

NetworkStart() защищенный Метод

protected NetworkStart ( ) : void
Результат void

PollPlayerList() публичный Метод

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
Результат void

Populate() публичный Метод

This method is used to do all of the initial setup of objects
public Populate ( BeardedManStudios.Network.NetWorker socket ) : bool
socket BeardedManStudios.Network.NetWorker
Результат bool

PullObject() публичный Метод

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
Результат UnityEngine.GameObject

SetName() публичный Метод

Set the player name for the current running client or server
public SetName ( string newName ) : void
newName string
Результат void

TryPullIdFromObject() публичный статический Метод

public static TryPullIdFromObject ( string obj, ulong &uniqueId ) : bool
obj string
uniqueId ulong
Результат bool

Описание свойств

allClientsLoaded публичное свойство

public NetWorker.BasicEvent allClientsLoaded
Результат NetWorker.BasicEvent

frameInterval публичное свойство

public int frameInterval
Результат int

networkInstantiates публичное свойство

All game objects to be instantiated whenever necessary
public GameObject[],UnityEngine networkInstantiates
Результат UnityEngine.GameObject[]

resourcesDirectory публичное свойство

This is the resources directory where network prefabs are to be loaded from
public string resourcesDirectory
Результат string

setupActions публичное статическое свойство

The list of all setup actions for when an object is instantiated
public static List setupActions
Результат List

startNetworkedSceneBehaviors публичное свойство

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
Результат BeardedManStudios.Network.SimpleNetworkedMonoBehavior[]

updateTimeInterval публичное свойство

The amount of time in seconds to update the time from the server
public float updateTimeInterval
Результат float