コード例 #1
0
    void OnParticleTrigger()
    {
        // get the particles which matched the trigger conditions this frame
        int numEnter = ps.GetTriggerParticles(ParticleSystemTriggerEventType.Enter, enter);
        int numExit  = ps.GetTriggerParticles(ParticleSystemTriggerEventType.Exit, exit);

        if (numEnter > 0)
        {
            player.BulletHit(damage);
        }
    }