예제 #1
0
 public void SelectCharacter(NetworkHash128 characterHash)
 {
     if (characterHash.IsValid())
     {
         manager.client.Send(MsgType.Highest + 1 + (short)NetMsgType.SelectCharacter, new HashMessage(characterHash));
     }
 }
예제 #2
0
    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);
        }
    }
예제 #3
0
        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);
        }