Пример #1
0
    public void Show(EnumActiveState state, int value)
    {
        leveltxt.text = value.ToString();
        canon.gameObject.SetActive(false);
        canyes.gameObject.SetActive(false);
        cangeton.gameObject.SetActive(false);
        cangetyes.gameObject.SetActive(false);
        getalready.gameObject.SetActive(false);
        cangeton.enabled = true;
        if (state == EnumActiveState.NotPick)
        {
            canon.gameObject.SetActive(true);
            cangeton.gameObject.SetActive(true);
        }
        else if (state == EnumActiveState.CanPick)
        {
            canyes.gameObject.SetActive(true);
            cangeton.gameObject.SetActive(true);
            cangetyes.gameObject.SetActive(true);
        }
        else if (state == EnumActiveState.AlreadPick)
        {
            canyes.gameObject.SetActive(true);
            cangeton.enabled = false;
            getalready.gameObject.SetActive(true);
        }

        //方法
        cangeton.onClick.RemoveAllListeners();
        cangetyes.onClick.RemoveAllListeners();
        cangeton.onClick.AddListener(Awardno_show);
        cangetyes.onClick.AddListener(Awardyes_show);
    }
Пример #2
0
 private void WeekQianAwardGet(EnumActiveState state)
 {
     qianreward_no.enabled = true;
     qianreward_no.gameObject.SetActive(false);
     qianreward_yes.gameObject.SetActive(false);
     qianreward_alreadly.gameObject.SetActive(false);
     //0 不可领取 1 可领取 2 已经领取过了
     if (state == EnumActiveState.NotPick)
     {
         qianreward_no.gameObject.SetActive(true);
     }
     else if (state == EnumActiveState.CanPick)
     {
         qianreward_yes.gameObject.SetActive(true);
     }
     else if (state == EnumActiveState.AlreadPick)
     {
         qianreward_no.gameObject.SetActive(true);
         qianreward_no.enabled = false;
         qianreward_alreadly.gameObject.SetActive(true);//已经领取过
     }
 }