Exemplo n.º 1
0
    float shiftValue = 0.06f;   // значение смещения по вертикале при выборе

    void Start()
    {
        DigitsLabel label = transform.Find("Label").GetComponent <DigitsLabel>();

        label.setValue(int.Parse(name));
        RadioButtons rb             = transform.parent.GetComponent <RadioButtons>();
        var          selectedButton = rb.getSelectedButton();

        IAmSelected = selectedButton != null && gameObject == rb.getSelectedButton().gameObject;
        rb.subscribeOnRadioBtnSelected(OnNewSelected);
        if (IAmSelected)
        {
            select(true);
            Rooms.countTickets = int.Parse(this.gameObject.GetComponent <BaseController>().name);
        }
    }