Пример #1
0
        private void OnDiss()
        {
            //弹窗是否发起解散
            GameObject go = UnityEngine.Object.Instantiate((GameObject)res.GetAsset(UICowCowAB.CowCow_Prefabs, UICowCowType.CowCowInitiateDissPanel));

            go.transform.SetParent(BackGround.transform, false);
            Action action = () => { UnityEngine.Object.Destroy(go.gameObject); };

            go.GetComponent <Button>().onClick.Add(action);
            Button initiateBtn = go.transform.Find("BG/InitiateBtn").GetComponent <Button>();
            Button cancelBtn   = go.transform.Find("BG/CancelBtn").GetComponent <Button>();

            initiateBtn.onClick.Add(() =>
            {
                Actor_DissoltionHelper.OnSendVOte(GamerComponent.LocalSeatID, true).Coroutine();
                action?.Invoke();
            });
            cancelBtn.onClick.Add(action);
        }
Пример #2
0
 private void OnDisagree()
 {
     Actor_DissoltionHelper.OnSendVOte(room.GamerComponent.LocalSeatID, false).Coroutine();
     this.ShowHideAgreeButton(false);
 }