Exemplo n.º 1
0
        private void AddOption(ActionSheetOption option)
        {
            var instance = Instantiate(m_ActionSheetTemplate, m_ActionSheetContainer, false);
            ActionSheetOptionViewController vc = instance.GetComponent <ActionSheetOptionViewController>();

            vc.Initialize(option, OnActionSheetOptionClicked);
            m_Options.Add(vc);
        }
        private void OnActionSheetOptionClicked(ActionSheetOptionViewController vc)
        {
            foreach (var o in m_Options)
            {
                if (o == vc)
                {
                    continue;
                }

                o.DisableButton();
            }

            vc.option.Invoke();
        }