private void SetCommentRes(bool comtype, string comment, int star) { var buffer = NetWorkManager.GetByteData(new CommentReq { Comment = comment, Star = star, Type = comtype ? 1 : 0 }); NetWorkManager.Instance.Send <CommentRes>(CMD.STORESCORE_Comment, buffer, res => { GlobalData.PlayerModel.UpdateUserMoney(res.UserMoney); _storeScoreWindow.Close(); if (_awardWindow == null) { _awardWindow = PopupManager.ShowWindow <AwardWindow>("GameMain/Prefabs/AwardWindow/AwardWindow"); } RepeatedField <AwardPB> gemAward = new RepeatedField <AwardPB>(); AwardPB awardPb = new AwardPB() { Num = 10, Resource = ResourcePB.Gem, ResourceId = 30001 }; gemAward.Add(awardPb); _awardWindow.SetData(gemAward); //评分完成且拿完奖励后去商店评分! if (comtype) { Debug.LogError("COMMENT URL" + GlobalData.VersionData.ForceUpdateAddr); Application.OpenURL(GlobalData.VersionData.ForceUpdateAddr); } }); }
private void OnDownloadReceiveAward(ReceiveDownloadAwardsRes res) { RewardUtil.AddReward(res.Awards); GuideManager.SetStatisticsRemoteGuideStep(GuideConst.MainLineStep_Extend_DowndLoad); view.InitOpenArrowCondition(); //todo 整包的时候不会弹出领奖阻碍引导! if (_awardWindow == null) { SendMessage(new Message(MessageConst.CMD_HIDEVIEW)); _awardWindow = PopupManager.ShowWindow <AwardWindow>("GameMain/Prefabs/AwardWindow/AwardWindow"); _awardWindow.WindowActionCallback = evt => { if (evt == WindowEvent.ClickOutsideToClose) { // SendMessage(new Message(MessageConst.CMD_DOWNLOAD_OK)); PopupManager.ShowPhoneTipsWindow(() => { SendRedPoint(); }); view.InitOpenArrowCondition(); } }; } _awardWindow.SetData(res.Awards, "引导通过奖励"); GlobalData.PlayerModel.PlayerVo.ExtInfo = res.UserExtraInfo; }