public void OnEquipTitle() { RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON); TitleListItem[] titles = this.titleList.GetComponentsInChildren <TitleListItem>(true); TitleListItem currentEquipedTitle = titles.FirstOrDefault((TitleListItem _title) => _title.GetTitleId() == this.currentSelectedTitleId); APIRequestTask apirequestTask = new APIRequestTask(); apirequestTask.Add(TitleDataMng.RequestUpdateEquipedTitle(this.currentSelectedTitleId, false)); base.StartCoroutine(apirequestTask.Run(delegate { RestrictionInput.EndLoad(); TitleListItem[] titles; foreach (TitleListItem titleListItem in titles) { titleListItem.unequip(); } currentEquipedTitle.equip(); currentEquipedTitle.OnSelectTitle(); GUIPlayerStatus.RefreshParams_S(false); CMD_Profile.RefreshParams(); }, delegate(Exception nop) { RestrictionInput.EndLoad(); }, null)); }
public override void ClosePanel(bool animation = true) { this.inputNickName.value = this.TrimmingSpaceChar(this.inputNickName.value, "[ \n]"); this.inputComment.value = this.TrimmingSpaceChar(this.inputComment.value, "[\n]"); CMD_Profile.CheckInputCharResult checkInputCharResult = this.CheckInputChar(this.inputComment.value, 0, CMD_Profile.COMMENT_LENGTH_MAX); checkInputCharResult = ((checkInputCharResult != CMD_Profile.CheckInputCharResult.OK) ? checkInputCharResult : this.CheckInputChar(this.inputNickName.value, CMD_Profile.NICK_NAME_LENGTH_MIN, CMD_Profile.NICK_NAME_LENGTH_MAX)); if (checkInputCharResult != CMD_Profile.CheckInputCharResult.OK) { this.ShowErrorPopUp(checkInputCharResult); this.RefreshComponents(); } else { bool flag = this.IsUpdateNickName(); bool flag2 = this.IsUpdateComment(); if (flag || flag2) { this.OpenDialogSubmitConfirm(flag, flag2, new Action <int>(this.OnCloseNicknameUpdate)); } else { CMD_Profile.instance = null; base.ClosePanel(animation); } } }
protected override void Awake() { base.Awake(); this.googlePlay.Bootup(); CMD_Profile.instance = this; }