当前位置: 首页>>代码示例>>C#>>正文


C# Player.Kill方法代码示例

本文整理汇总了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));
 }
开发者ID:727021,项目名称:800craft,代码行数:17,代码来源:ExplodingPhysics.cs

示例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;
 }
开发者ID:EricKilla,项目名称:LegendCraft,代码行数:7,代码来源:ParticleSystem.cs

示例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;
 }
开发者ID:727021,项目名称:800craft,代码行数:6,代码来源:ParticleSystem.cs

示例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
             }
         }
     }
 }
开发者ID:venofox,项目名称:AtomicCraft,代码行数:32,代码来源:ParticleSystem.cs


注:本文中的fCraft.Player.Kill方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。