本文整理汇总了C#中MCForge.Entity.Player.SpawnOtherPlayersForThisPlayer方法的典型用法代码示例。如果您正苦于以下问题:C# Player.SpawnOtherPlayersForThisPlayer方法的具体用法?C# Player.SpawnOtherPlayersForThisPlayer怎么用?C# Player.SpawnOtherPlayersForThisPlayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCForge.Entity.Player
的用法示例。
在下文中一共展示了Player.SpawnOtherPlayersForThisPlayer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Use
public void Use(Player p, string[] args)
{
Level tempLevel = Level.FindLevel(args[0]);
if (tempLevel != null)
{
if (tempLevel.visit != null && tempLevel.visit.Permission < p.Group.Permission) {
p.SendMessage("You dont have permission to go to this level");
return;
}
#region Send and Spawn
p.GlobalDie();
p.IsLoading = true;
p.Level = tempLevel;
short x = (short)((0.5 + tempLevel.SpawnPos.x) * 32);
short y = (short)((1 + tempLevel.SpawnPos.y) * 32);
short z = (short)((0.5 + tempLevel.SpawnPos.z) * 32);
p.Pos = new Vector3S(x, z, y);
p.Rot = tempLevel.SpawnRot;
p.oldPos = p.Pos;
p.oldRot = p.Rot;
p.SendSpawn(p);
p.IsLoading = false;
p.SpawnOtherPlayersForThisPlayer();
p.SpawnThisPlayerToOtherPlayers();
p.SpawnBotsForThisPlayer();
#endregion
Player.UniversalChat(p.Username + " went to " + args[0] + "!");
}
else
{
p.SendMessage("This level does not exist!");
}
}
示例2: Use
public void Use(Player p, string[] args)
{
ExtraPlayerData z = ZombiePlugin.ZombiePlugin.FindPlayer(p);
z.Aka = !z.Aka;
foreach (Player e in Server.Players.ToArray())
{
Packet pa = new Packet(new byte[2] { (byte)Packet.Types.SendDie, e.ID });
if (p != e)
{
p.SendPacket(pa);
}
}
p.SpawnOtherPlayersForThisPlayer();
p.SendMessage("Aka mode is now " + z.Aka.ToString().Replace("True", "on!").Replace("False", "off!"));
}