private bool CheckForDeath(DieOnFallComponent comp, Collider coll) { if (coll.tag != _wallTag) { return(false); } var rigid = comp.GetComponent <Rigidbody>(); return(rigid.velocity.y < _fallThreshold); }
private void Die(DieOnFallComponent comp) { // ReSharper disable once AccessToStaticMemberViaDerivedType GameObject.Destroy(comp.gameObject); }