private void PayMoneyCallback(IGamerProfile.PayMoneyData paydata, bool isSucceed) { switch (paydata.item) { case IGamerProfile.PayMoneyItem.PayMoneyItem_Skill: { IsStartWork = true; ReleaseSkillprompt(); if (!isSucceed) { //如果技能释放失败了就不要提示后面的了 skillCheckTimerLock = new FTLibrary.Time.TimeLocker(int.MaxValue); skillCheckTimerLock.IsLocked = true; return; } //增加技能数量 GameSkill.SkillData data = IGamerProfile.gameSkill.FindSkillData(currentSkillpromptId); IGamerProfile.Instance.playerdata.skillCount[(int)currentSkillpromptId] += data.oncebuycount; IGamerProfile.Instance.playerdata.skillCount[(int)currentSkillpromptId] -= 1; UpdateSkillCount(); playerMoney.SetIntegerRollValue(IGamerProfile.Instance.playerdata.playerMoney); //需要存档 IGamerProfile.Instance.SaveGamerProfileToServer(); //释放这个技能 EffectSkill(currentSkillpromptId); } break; } }
protected virtual void Update() { if (!gameCenterCheckTimer.IsLocked) { gameCenterCheckTimer.IsLocked = true; if (!buttonGroup.IsWorkDo) { buttonGroup.IsWorkDo = IGameCenterEviroment.IsAllReady; if (buttonGroup.IsWorkDo) { //不在检测了 gameCenterCheckTimer = new FTLibrary.Time.TimeLocker(Int32.MaxValue); gameCenterCheckTimer.IsLocked = true; } } } }
protected override void OnInitializationUI() { levelNumber.Text = string.Format("{0}", IGamerProfile.Instance.playerdata.AccountLevelTotal(IGamerProfile.Instance.gameEviroment.mapIndex)); missionCompleteNumber.Text = IGamerProfile.gameLevel.mapData[IGamerProfile.Instance.gameEviroment.mapIndex]. levelData[IGamerProfile.Instance.gameEviroment.mapLevelIndex].missiontarget.ToString(); playerMoney.SetIntegerRollValue(0, true); playerMoney.SetIntegerRollValue(IGamerProfile.Instance.playerdata.playerMoney); Invoke("ShowStartGamePrompt", time_startgameprompt); //skillEffect = new bool[skillPosition.Length]; skillEffect = new bool[3]; skillCheckTimerLock = new FTLibrary.Time.TimeLocker((int)(time_skillpromptcheck * 1000.0f)); skillCheckTimerLock.IsLocked = true; UpdateMissionNumber(); UpdateEquipCount(); UpdateSkillCount(); UpdateTime(); }