public void SelectCharacter(NetworkHash128 characterHash) { if (characterHash.IsValid()) { manager.client.Send(MsgType.Highest + 1 + (short)NetMsgType.SelectCharacter, new HashMessage(characterHash)); } }
void OnSelectCharacter(NetworkMessage netMsg) { NetworkHash128 hash = netMsg.reader.ReadNetworkHash128(); if (hash.IsValid()) { UserAccount account = AccountManager.GetAccount(netMsg.conn); account.data.characterHash = hash; manager.AccountEnter(account); } }
internal static bool GetPrefab(NetworkHash128 assetId, out GameObject prefab) { bool result; if (!assetId.IsValid()) { prefab = null; result = false; } else if (guidToPrefab.ContainsKey(assetId) && guidToPrefab[assetId] != null) { prefab = guidToPrefab[assetId]; result = true; } else { prefab = null; result = false; } return(result); }