diff options
| author | chai <chaifix@163.com> | 2020-12-30 20:59:04 +0800 | 
|---|---|---|
| committer | chai <chaifix@163.com> | 2020-12-30 20:59:04 +0800 | 
| commit | e9ea621b93fbb58d9edfca8375918791637bbd52 (patch) | |
| tree | 19ce3b1c1f2d51eda6878c9d0f2c9edc27f13650 /Client/Assembly-CSharp/DeadBody.cs | |
+init
Diffstat (limited to 'Client/Assembly-CSharp/DeadBody.cs')
| -rw-r--r-- | Client/Assembly-CSharp/DeadBody.cs | 35 | 
1 files changed, 35 insertions, 0 deletions
| diff --git a/Client/Assembly-CSharp/DeadBody.cs b/Client/Assembly-CSharp/DeadBody.cs new file mode 100644 index 0000000..5cab24a --- /dev/null +++ b/Client/Assembly-CSharp/DeadBody.cs @@ -0,0 +1,35 @@ +using System; +using UnityEngine; + +public class DeadBody : MonoBehaviour +{ +	public Vector2 TruePosition +	{ +		get +		{ +			return base.transform.position + this.myCollider.offset; +		} +	} + +	public bool Reported; + +	public short KillIdx; + +	public byte ParentId; + +	public Collider2D myCollider; + +	public void OnClick() +	{ +		if (this.Reported) +		{ +			return; +		} +		if (!PhysicsHelpers.AnythingBetween(PlayerControl.LocalPlayer.GetTruePosition(), this.TruePosition, Constants.ShipAndObjectsMask, false)) +		{ +			this.Reported = true; +			GameData.PlayerInfo playerById = GameData.Instance.GetPlayerById(this.ParentId); +			PlayerControl.LocalPlayer.CmdReportDeadBody(playerById); +		} +	} +} | 
