本文整理汇总了C#中IPlayer.RemoveMetadata方法的典型用法代码示例。如果您正苦于以下问题:C# IPlayer.RemoveMetadata方法的具体用法?C# IPlayer.RemoveMetadata怎么用?C# IPlayer.RemoveMetadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPlayer
的用法示例。
在下文中一共展示了IPlayer.RemoveMetadata方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ForceToZombie
private void ForceToZombie(IPlayer human)
{
human.SetMetadata("forcing", true);
human.SetMetadata("zombieForcing", true);
human.SetMetadata("ost.isZombie", true);
human.SetMetadata("ost.health", (float)100);
System.Threading.Tasks.Task task = new System.Threading.Tasks.Task(delegate
{
double oldX = human.BlockX;
double oldY = human.BlockY;
if (this.hologram != null)
bot.ChatSayer.Command("/teleport " + human.Name + " " + (int)(hologram.X + 1) + " " + (int)(hologram.Y - 1));
System.Threading.Thread.Sleep(1000);
bot.ChatSayer.Command("/kill " + human.Name);
//bot.ChatSayer.Command("/teleport " + human.Name + " " + oldX + " " + oldY);
System.Threading.Thread.Sleep(1000);
bot.ChatSayer.Command("/teleport " + human.Name + " " + oldX + " " + oldY);
System.Threading.Thread.Sleep(1000);
human.RemoveMetadata("zombieForcing");
human.RemoveMetadata("forcing");
});
task.Start();
}
示例2: EndRecord
private void EndRecord(IPlayer player)
{
List<IEditChange> record = (List<IEditChange>)recordingPlayer.GetMetadata("worldeditrecord");
if (record.Count > 0)
{
if (!player.HasMetadata("worldedithistory"))
player.SetMetadata("worldedithistory", new List<IEditChange>());
List<IEditChange> history = (List<IEditChange>)player.GetMetadata("worldedithistory");
history.Add(new EditChangeList((List<IEditChange>)record));
if (!player.HasMetadata("worldedithistoryindex"))
player.SetMetadata("worldedithistoryindex", 0);
else
player.SetMetadata("worldedithistoryindex", ((int)player.GetMetadata("worldedithistoryindex")) + 1);
}
player.RemoveMetadata("worldeditrecord");
recordingPlayer = null;
}
示例3: ForceToNormal
private void ForceToNormal(IPlayer zombie)
{
zombie.SetMetadata("forcing", true);
zombie.SetMetadata("humanForcing", true);
zombie.RemoveMetadata("ost.isZombie");
zombie.RemoveMetadata("ost.zombieCreationTime");
zombie.SetMetadata("ost.health", (float)100);
System.Threading.Tasks.Task task = new System.Threading.Tasks.Task(delegate
{
double oldX = zombie.X;
double oldY = zombie.Y;
if (this.cake != null)
bot.ChatSayer.Command("/teleport " + zombie.Name + " " + (int)(cake.X + 1) + " " + (int)(cake.Y - 1));
System.Threading.Thread.Sleep(500);
bot.ChatSayer.Command("/kill " + zombie.Name);
//bot.ChatSayer.Command("/teleport " + zombie.Name + " " + oldX + " " + oldY);
System.Threading.Thread.Sleep(500);
bot.ChatSayer.Command("/teleport " + zombie.Name + " " + oldX + " " + oldY);
System.Threading.Thread.Sleep(1000);
zombie.RemoveMetadata("humanForcing");
zombie.RemoveMetadata("forcing");
});
task.Start();
}