本文整理汇总了C#中fCraft.Player.Kill方法的典型用法代码示例。如果您正苦于以下问题:C# Player.Kill方法的具体用法?C# Player.Kill怎么用?C# Player.Kill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fCraft.Player
的用法示例。
在下文中一共展示了Player.Kill方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HitPlayer
public void HitPlayer(World world, Player hitted, Player by)
{
if (by == null)
{
if (MineField.Failed != null && !MineField.Failed.Contains(hitted))
{
hitted.Kill(world, String.Format("{0}&S was torn to pieces and lost the game!", hitted.ClassyName));
if (MineField.PlayerBlowUpCheck(hitted))
{
hitted.Message("&WYou lost the game! You are now unable to win.");
}
return;
}
else return;
}
hitted.Kill(world, String.Format("{0}&S was torn to pieces by {1}", hitted.ClassyName, hitted.ClassyName==by.ClassyName?"theirself":by.ClassyName));
}
示例2: HitPlayer
public void HitPlayer(World world, Vector3I pos, Player hitted, Player by, ref int restDistance, IList<BlockUpdate> updates)
{
hitted.Kill(world, String.Format("{0}&S was torn to pieces by {1}", hitted.ClassyName, hitted.ClassyName == by.ClassyName ? "theirself" : by.ClassyName));
updates.Add(new BlockUpdate(null, pos, Block.TNT));
world.AddPhysicsTask(new TNTTask(world, pos, by, false, true), 0);
restDistance = 0;
}
示例3: HitPlayer
public void HitPlayer(World world, Vector3I pos, Player hitted, Player by, ref int restDistance, IList<BlockUpdate> updates)
{
hitted.Kill(world, String.Format("{0}&S was shot by {1}", hitted.ClassyName, hitted.ClassyName == by.ClassyName ? "theirself" : by.ClassyName));
updates.Add(new BlockUpdate(null, pos, Block.Air));
restDistance = 0;
}
示例4: HitPlayer
public void HitPlayer(World world, Vector3I pos, Player hitted, Player by, ref int restDistance, IList<BlockUpdate> updates)
{
if ((hitted.Info.isOnBlueTeam && by.Info.isOnBlueTeam) || (hitted.Info.isOnRedTeam && by.Info.isOnRedTeam))
{
by.Message("{0} is on your team!", hitted.ClassyName);
}
else
{
hitted.Kill(world, String.Format("{0}&S was shot by {1}", hitted.ClassyName, hitted.ClassyName == by.ClassyName ? "theirself" : by.ClassyName));
updates.Add(new BlockUpdate(null, pos, Block.Air));
restDistance = 0;
if (TeamDeathMatch.isOn)
{
if (hitted.Info.isPlayingTD && hitted.Info.isOnBlueTeam && by.Info.isPlayingTD) //if the player is playing TD and on blue team, +1 for Red Team Score
{
TeamDeathMatch.redScore++;
hitted.Info.gameDeaths++;
hitted.Info.totalDeathsTDM++;
by.Info.gameKills++;
by.Info.totalKillsTDM++;
}
if (hitted.Info.isPlayingTD && hitted.Info.isOnRedTeam && by.Info.isPlayingTD) //if the player is playing TD and on blue team, +1 for Red Team Score
{
TeamDeathMatch.blueScore++;
hitted.Info.gameDeaths++; //counts the individual players deaths
hitted.Info.totalDeathsTDM++; //tallies total TDM deaths (never gets reset)
by.Info.gameKills++; //counts the individual players amount of kills
by.Info.totalKillsTDM++; //tallies total TDM kills
}
}
}
}