Example #1
0
    void OnParticleCollision(GameObject other)
    {
        if (hasSplashed == false && (other.GetComponent <FloorPiece>() || other.GetComponent <Pipe>()))
        {
            hasSplashed = true;
            splash.Play();
        }

        if (other.GetComponent <Mill> ())
        {
            Mill myMill = other.GetComponent <Mill> ();
            if (!myMill.isRotating)
            {
                myMill.ActivateMill();
            }
        }
    }