示例#1
0
        private bool CheckForDeath(DieOnFallComponent comp, Collider coll)
        {
            if (coll.tag != _wallTag)
            {
                return(false);
            }
            var rigid = comp.GetComponent <Rigidbody>();

            return(rigid.velocity.y < _fallThreshold);
        }
示例#2
0
 private void Die(DieOnFallComponent comp)
 {
     // ReSharper disable once AccessToStaticMemberViaDerivedType
     GameObject.Destroy(comp.gameObject);
 }