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); } } }