fCraft.BulletBehavior.HitPlayer C# (CSharp) Method

HitPlayer() public method

public HitPlayer ( World world, Vector3I pos, Player hitted, Player by, int &restDistance, IList updates ) : void
world World
pos Vector3I
hitted Player
by Player
restDistance int
updates IList
return void
        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;
        }