コード例 #1
0
        protected override void OnCollision(EntityId targetEntityId, Vec3 hitPos, Vec3 dir, short materialId, Vec3 contactNormal)
        {
            if (Velocity.Length > VelocityToKill)
            {
                var particle = ParticleEffect.Get("explosions.barrel.explode");
                particle.Spawn(hitPos);

                Entity.Remove(Id);
            }
        }