Ejemplo n.º 1
0
        public static void SendPhysicsRaycastInfo(RaycastHit hitInfo)
        {
            IDecalReceiver decalReceiver = hitInfo.collider.GetComponent <IDecalReceiver>();

            if (decalReceiver == null)
            {
                decalReceiver = hitInfo.collider.GetComponentInParent <IDecalReceiver>();
            }

            if (decalReceiver != null)
            {
                decalReceiver.HittedByPhysicsRaycast(hitInfo);
            }
        }
Ejemplo n.º 2
0
        public static void SendGPURaycastInfo(GPURaycastDecalsTargetInfo hitInfo)
        {
            IDecalReceiver decalReceiver = hitInfo.hittedRenderer.GetComponent <IDecalReceiver>();

            if (decalReceiver == null)
            {
                decalReceiver = hitInfo.hittedRenderer.GetComponentInParent <IDecalReceiver>();
            }

            if (decalReceiver != null)
            {
                decalReceiver.HittedByGPURaycast(hitInfo);
            }
        }
Ejemplo n.º 3
0
        public static void SendCollision(Collision collision)
        {
            IDecalReceiver decalReceiver = collision.collider.GetComponent <IDecalReceiver>();

            if (decalReceiver == null)
            {
                decalReceiver = collision.collider.GetComponentInParent <IDecalReceiver>();
            }

            if (decalReceiver != null)
            {
                decalReceiver.HittedByPhysicsCollision(collision);
            }
        }
Ejemplo n.º 4
0
        public static void SendParticleCollisionEvent(ParticleCollisionEvent collisionEvent)
        {
            IDecalReceiver decalReceiver = collisionEvent.colliderComponent.GetComponent <IDecalReceiver>();

            if (decalReceiver == null)
            {
                decalReceiver = collisionEvent.colliderComponent.GetComponentInParent <IDecalReceiver>();
            }

            if (decalReceiver != null)
            {
                decalReceiver.HittedByParticle(collisionEvent);
            }
        }