Esempio n. 1
0
    void pushDominos()
    {
        if (this.allDominos.Count > 0)
        {
            foreach (GameObject domino in this.allDominos)
            {
                domino.rigidbody.isKinematic = false;
            }
            GameObject firstDomino      = (GameObject)this.allDominos[0];
            Domino     dominoAttributes = firstDomino.GetComponent <Domino>();
            dominoAttributes.hasCollided = true;
            LevelPropertiesScript.sharedInstance().nDominosCombo = 1;
            firstDomino.rigidbody.AddForce(firstDomino.transform.forward * 100);
            LevelPropertiesScript.sharedInstance().dominosFalling = true;
        }

        BackgroundMusic bm = this.GetComponent <BackgroundMusic>();

        bm.playGameFastMusic();
    }