本文整理汇总了C#中UnityEngine.NetworkPlayer.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# NetworkPlayer.GetHashCode方法的具体用法?C# NetworkPlayer.GetHashCode怎么用?C# NetworkPlayer.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine.NetworkPlayer
的用法示例。
在下文中一共展示了NetworkPlayer.GetHashCode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RPCSetUserView
private void RPCSetUserView(NetworkPlayer nwid, string nick, int uid, string photo, int tk, int td, int tzk, int tzd)
{
CallRPC(true, localuser.nwid, localuser.nick, localuser.uid, localuser.photo, tk, td, tzk, tzd);
if (nwid == Network.player) return;
Vk.user user = new Vk.user();
user.nick = nick;
user.uid = uid;
user.photo = photo;
user.nwid = nwid;
user.totalkills = tk;
user.totaldeaths = td;
user.totalzombiekills = tzk;
user.totalzombiedeaths = tzd;
if (photo != "")
new WWW2(photo).done += delegate(WWW2 www)
{
print("loaded texture");
user.texture = www.texture;
DontDestroyOnLoad(user.texture);
};
userviews.Add(nwid.GetHashCode(), user);
}
示例2: OnPlayerDisconnected
void OnPlayerDisconnected(NetworkPlayer player2)
{
int player = player2.GetHashCode();
players[player].Destroy();
foreach (box a in GameObject.FindObjectsOfType(typeof(box)))
{
if (a.id == player)
a.RPCResetOwner();
foreach (NetworkView v in a.GetComponents<NetworkView>())
if (v.owner.GetHashCode() == player) Destroy(v.viewID);
}
Network.DestroyPlayerObjects(player2);
Network.RemoveRPCs(player2);
}
示例3: OnPlayerDisconnected
public void OnPlayerDisconnected(NetworkPlayer player)
{
CallRPC(RemovePlayerView, RPCMode.All, player.GetHashCode());
Network.RemoveRPCs(player);
Network.DestroyPlayerObjects(player);
}
示例4: OnPlayerDisconnected
private void OnPlayerDisconnected(NetworkPlayer player) {
Debug.Log("Player disconnected: " + player.GetHashCode());
Network.RemoveRPCs(player);
Network.DestroyPlayerObjects(player);
}
示例5: OnPlayerDisconnected
void OnPlayerDisconnected(NetworkPlayer player) //destroy
{
int playerid = player.GetHashCode();
RPCWriteMessage(players[playerid].nick + " Disconnected");
foreach (Box box in GameObject.FindObjectsOfType(typeof(Box)))
//if (!(box is Player))
{
if (box.selected == playerid)
box.RPCResetOwner();
foreach (NetworkView nw in box.GetComponents<NetworkView>())
if (nw.owner.GetHashCode() == playerid) RPCDestroy(nw.viewID);
}
Network.DestroyPlayerObjects(player);
Network.RemoveRPCs(player);
}