コード例 #1
0
    /// <summary>
    /// 切换是否再次提示
    /// </summary>
    /// <param name="isOn"></param>
    private void OnValueChangedTips(bool isOn)
    {
        if (_isNotTips == isOn)
        {
            return;
        }

        _isNotTips = isOn;
        //存储数据
        if (_isNotTips)
        {
            PlayerPrefs.SetString(GameUITool.GetItemSaveTipsTimeKey(_useItemID), TimeHelper.CurGameTimeDay());
        }
        else
        {
            PlayerPrefs.SetString(GameUITool.GetItemSaveTipsTimeKey(_useItemID), string.Empty);
        }
    }
コード例 #2
0
 /// <summary>
 /// 开始游戏
 /// </summary>
 private void OnClickStartGame()
 {
     //新手引导标记完成
     if (StaticData.isOpenGuide && GuideCanvasComponent._instance != null && GuideCanvasComponent._instance.isCurrStepGuiding)
     {
         GuideCanvasComponent._instance.SetLittleStepFinish();
     }
     //1.可以免费入场
     if (StaticData.configExcel.GetVertical().DayZillionaireCount > StaticData.GetZillionaireMapEnterCount())
     {
         //直接进入游戏
         EnterGame();
         return;
     }
     //2.入场券提示
     if (GetAdmissionNum() > 0)
     {
         //提示设置 每日
         var timeDay = PlayerPrefs.GetString(GameUITool.GetItemSaveTipsTimeKey(StaticData.configExcel.GetVertical().AdmissionGoodsId));
         if (string.IsNullOrEmpty(timeDay) || !TimeHelper.IsTheSameDay(timeDay))
         {
             //提示
             OpenAdmissionUseTips();
             return;
         }
         else
         {
             //直接进入游戏
             EnterGame();
             return;
         }
     }
     else //入场券不足提示
     {
         OpenNotAdmissionTips();
         return;
     }
 }