コード例 #1
0
    /**
     * 显示签到成功界面
     */
    public static void ShowSignInSuccessView(string rewardDes)
    {
        GameObject commonUIPrefab = Resources.Load("Prefabs/SignInSuccessPopView") as GameObject;
        GameObject root           = Instantiate(commonUIPrefab) as GameObject;

        root.name                    = "SignInSuccessPopView";
        root.transform.parent        = canvas.transform;
        root.transform.localPosition = new Vector3(0, 0, 0);
        root.transform.localScale    = new Vector3(1, 1, 0);

        GameObject signInImage    = GameObject.Find(root.name + "/SignInImage");
        GameObject rewardDesImage = GameObject.Find(root.name + "/RewardDesImage");
        GameObject GoldImage      = GameObject.Find(root.name + "/GoldImage");
        Text       goldText       = root.Find <Text>(root.name + "/RewardDesImage/GoldText");

        goldText.text = rewardDes;

        rewardDesImage.SetActive(false);
        GoldImage.SetActive(false);

        PKAnimateTool.signSuccesView(signInImage, () =>
        {
            rewardDesImage.SetActive(true);
            GoldImage.SetActive(true);

            Sequence sequence = DOTween.Sequence();

            sequence.AppendInterval(1.5f);
            sequence.AppendCallback(() =>
            {
                Destroy(root);
            });
        });
    }
コード例 #2
0
 /**
  * 检查当天是否已经签到
  */
 void checkIsSignIn()
 {
     if (UserManager.Instance().userInfo.is_checkin == 0)
     {
         PKAnimateTool.popUpView(signInView);
     }
 }
コード例 #3
0
    /**
     * 点击底部菜单
     */
    public void bottomMenuItemClick(int index)
    {
        switch (index)
        {
        case 1:     // 消息
        {
            break;
        }

        case 2:     // 活动
        {
            PKAnimateTool.popUpView(taskView);
            break;
        }

        case 3:     // 反馈
        {
            break;
        }

        case 4:     // 设置
        {
            openSettings();
            break;
        }
        }
    }
コード例 #4
0
    /**
     * 初始化我的信息
     */
    public void initUserInfoView()
    {
        Button diamondBtn = userInfoView.Find <Button>(userInfoView.name + "/UserdiamondBtn");

        diamondBtn.onClick.AddListener(() => {
            PKAnimateTool.popUpView(diamondBuyView);
        });
        Button goldBtn = userInfoView.Find <Button>(userInfoView.name + "/UserGoldBtn");

        goldBtn.onClick.AddListener(() => {
            shopingView.SetActive(true);
        });
    }
コード例 #5
0
    /**
     * 点击左部菜单
     */
    public void leftMenuItemClick(int index)
    {
        switch (index)
        {
        case 1:                 // 签到
        {
            PKAnimateTool.popUpView(signInView);
            break;
        }

        case 2:                 // 训练营
        {
            break;
        }

        case 3:                 // 邀请用户
        {
            break;
        }
        }
    }
コード例 #6
0
 /**
  * 点击关闭按钮
  */
 public void closeBtnClick()
 {
     PKAnimateTool.closePopUpView(gameObject);
 }