コード例 #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.GetComponent <BallComp>())
        {
            controller.activeBonus = true;

            controller.numTilesWithBonus = controller.bonusDuration;

            controller.UpdateValueBonus();

            Destroy(gameObject);
        }
    }
コード例 #2
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.GetComponent <BallComp>())
        {
            if (controller.activeBonus)
            {
                --controller.numTilesWithBonus;

                if (controller.numTilesWithBonus == 0)
                {
                    controller.activeBonus = false;
                }

                controller.UpdateValueBonus();
            }

            controller.SpawnsProxTile();

            Destroy(transform.parent.gameObject, tempoVidaTile);
        }
    }