Exemplo n.º 1
0
    public void SwitchToCase(Transform _dateList)
    {
        if (AnimationAssistant.IsShown(_dateList.GetComponent <CanvasGroup>()))
        {
            return;
        }

        _deactivateCurrentCase();

        AnimationAssistant.SwitchFromTo(_activeDateList.GetComponent <CanvasGroup>(), _dateList.GetComponent <CanvasGroup>());

        _activeDateList = _dateList;

        _mainScrollRect.content = _dateList as RectTransform;
        _updateIndicator.SetList(_dateList);

        switch (_dateList.name)
        {
        case "Programme12Date":
            _changeCaseToActive(_date12);
            break;

        case "Programme13Date":
            _changeCaseToActive(_date13);
            break;

        case "Programme14Date":
            _changeCaseToActive(_date14);
            break;

        case "Programme15Date":
            _changeCaseToActive(_date15);
            break;
        }
    }
    public void SwitchToSection(GameObject section)
    {
        if (AnimationAssistant.IsShown(section.GetComponent <CanvasGroup>()))
        {
            return;
        }

        _deactivateCurrentSection();

        AnimationAssistant.SwitchFromTo(_activeSection.GetComponent <CanvasGroup>(),
                                        section.GetComponent <CanvasGroup>());

        _activeSection = section;

        switch (section.name)
        {
        case "ProgrammeView":
            _changeCaseToActive(_programmeCase);
            break;

        case "NewsView":
            _changeCaseToActive(_newsCase);
            break;

        case "NavigationView":
            _changeCaseToActive(_navigationCase);
            _gradient.alpha = 0f;
            break;
        }
    }