Beispiel #1
0
    // Update is called once per frame

    void OnTriggerExit(Collider collider)
    {
        if (collider.gameObject.name == "Ball")
        {
            ballsound.ResetSound();
        }
    }
    public void Bowl(int pinFall)
    {
        ballsound.ResetSound();
        ball.Reset();
        cam.ResetCamera();
        rolls.Add(pinFall);
        NextAction(rolls);

        scoreDisplay.FillRolls(rolls);
        scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(rolls));
    }
    // Use this for initialization
    void OnTriggerEnter(Collider collider)
    {
        GameObject thingLeft = collider.gameObject;

        if (thingLeft.gameObject.name == "Ball")
        {
            bsound.ResetSound();
        }

        if (thingLeft.GetComponent <Pin> ())
        {
            Destroy(thingLeft);
        }
    }