Merge branch 'master' into UserCenter
1 文件已重命名
53个文件已修改
1个文件已删除
2 文件已复制
3个文件已添加
| | |
| | | SoundPlayer.CreateSoundPlayer();
|
| | | SoundPlayer.Instance.PlayLoginMusic();
|
| | | SystemSetting.Instance.SetSoundVolume(SystemSetting.Instance.GetSoundVolume());
|
| | | SystemSetting.Instance.SetSoundEffect(SystemSetting.Instance.GetSoundEffect());
|
| | | SystemSetting.Instance.SetGameFps(SystemSetting.Instance.GetGameFps());
|
| | |
|
| | | SDKUtility.Instance.Init();
|
| | |
| | | AddAsyncTask<RuneTowerFloorConfig>();
|
| | | AddAsyncTask<TreasureRefineConfig>();
|
| | | AddAsyncTask<AlchemyConfig>();
|
| | | AddAsyncTask<BlastFurnaceLVConfig>();
|
| | | AddAsyncTask<AlchemySpecConfig>();
|
| | | AddAsyncTask<QuestionBankConfig>();
|
| | | AddAsyncTask<WingRefineExpConfig>();
|
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A3 13 物品拆解 #tagCMItemDecompound
|
| | |
|
| | | public class CA313_tagCMItemDecompound : GameNetPackBasic {
|
| | | public byte Index; // 拆解物品所在背包索引
|
| | |
|
| | | public CA313_tagCMItemDecompound () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xA313;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (Index, NetDataType.BYTE);
|
| | | }
|
| | |
|
| | | }
|
| File was renamed from Core/GameEngine/Model/Config/BlastFurnaceLVConfig.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1bbbc87171e60f949bb6b7572c73fa38 |
| | | timeCreated: 1515213620 |
| | | guid: 77eef483c79a1a244b31335edb236af7 |
| | | timeCreated: 1539335657 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | m_Json["roleID"] = PlayerDatas.Instance.baseData.PlayerID;
|
| | | m_Json["roleName"] = PlayerDatas.Instance.baseData.PlayerName;
|
| | | m_Json["level"] = PlayerDatas.Instance.baseData.LV.ToString();
|
| | | m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_Json["sid"] = ServerListCenter.Instance.currentServer.region_flag;
|
| | | }
|
| | |
|
| | | if (ChannelPlatform == E_ChannelPlatform.Mr)
|
| | |
| | |
|
| | | m_Json["roleID"] = roleID;
|
| | | m_Json["roleName"] = roleName;
|
| | | m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_Json["sid"] = ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_Json["serverName"] = ServerListCenter.Instance.currentServer.name;
|
| | | m_Json["familyName"] = PlayerDatas.Instance.baseData.FamilyName;
|
| | | m_Json["level"] = "1";
|
| | |
| | |
|
| | | m_Json["roleID"] = roleID;
|
| | | m_Json["roleName"] = roleName;
|
| | | m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_Json["sid"] = ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_Json["serverName"] = ServerListCenter.Instance.currentServer.name;
|
| | | m_Json["familyName"] = PlayerDatas.Instance.baseData.FamilyName;
|
| | | m_Json["level"] = PlayerDatas.Instance.baseData.LV;
|
| | |
| | |
|
| | | m_Json["roleID"] = PlayerDatas.Instance.PlayerId.ToString();
|
| | | m_Json["roleName"] = PlayerDatas.Instance.baseData.PlayerName;
|
| | | m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_Json["sid"] = ServerListCenter.Instance.currentServer.region_flag;
|
| | | m_Json["serverName"] = ServerListCenter.Instance.currentServer.name;
|
| | | m_Json["familyName"] = PlayerDatas.Instance.baseData.FamilyName;
|
| | | m_Json["level"] = PlayerDatas.Instance.baseData.LV;
|
| | |
| | | |
| | | if (_actor != null) |
| | | { |
| | | _actor.Polymorph(false); |
| | | var _config = Config.Instance.Get<TableConfig.SkillConfig>(h0605.SkillID); |
| | | |
| | | int _npcID = 0; |
| | | |
| | | if (_config.Effect1 == 1063) |
| | | { |
| | | _npcID = _config.EffectValue11; |
| | | } |
| | | else if (_config.Effect2 == 1063) |
| | | { |
| | | _npcID = _config.EffectValue21; |
| | | } |
| | | else if (_config.Effect3 == 1063) |
| | | { |
| | | _npcID = _config.EffectValue31; |
| | | } |
| | | else if (_config.Effect4 == 1063) |
| | | { |
| | | _npcID = _config.EffectValue41; |
| | | } |
| | | else if (_config.Effect5 == 1063) |
| | | { |
| | | _npcID = _config.EffectValue51; |
| | | } |
| | | else if (_config.Effect6 == 1063) |
| | | { |
| | | _npcID = _config.EffectValue61; |
| | | } |
| | | |
| | | _actor.Polymorph(false, _npcID); |
| | | } |
| | | } |
| | | } |
| | |
| | | {
|
| | | if (m_SheepModel)
|
| | | {
|
| | | var _a = m_SheepModel.GetComponent<Animator>();
|
| | | if (_a)
|
| | | {
|
| | | _a.enabled = false;
|
| | | }
|
| | |
|
| | | if (m_SheepIsDefaultNpc)
|
| | | {
|
| | | GameObjectPoolManager.Instance.ReleaseDefaultFightNPC(m_SheepModel);
|
| | | }
|
| | | else
|
| | | {
|
| | | var _prefab = InstanceResourcesLoader.LoadNpc(10101001);
|
| | | var _prefab = InstanceResourcesLoader.LoadNpc(npcID);
|
| | | GameObjectPoolManager.Instance.ReleaseGameObject(_prefab, m_SheepModel);
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var _prefab = InstanceResourcesLoader.LoadNpc(10101001);
|
| | | var _prefab = InstanceResourcesLoader.LoadNpc(npcID);
|
| | | GameObjectPoolManager.Instance.ReleaseGameObject(_prefab, m_SheepModel);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | yield return WaitingForSecondConst.WaitMS500;
|
| | |
|
| | | string _path = "BaseCanvas/MainInterfaceWin/TaskAndTeamTip/TaskListTip/Parent/TaskScroll View/Content/Main_1000";
|
| | | if(!WindowCenter.Instance.uiRoot.transform.Find(_path))
|
| | | {
|
| | | _path = "BaseCanvas/MainInterfaceWin/TaskAndTeamTip/TaskListTip/Parent/TaskScroll View/Content/Main_1001";
|
| | | }
|
| | |
|
| | | // 打开引导界面
|
| | | NewGuideModel _model2 = ModelCenter.Instance.GetModel<NewGuideModel>();
|
| | | _model2.showMask = true;
|
| | | _model2.content = "点击开始<color=#00ff00>试炼</color>";
|
| | | _model2.componentPath = "BaseCanvas/MainInterfaceWin/TaskAndTeamTip/TaskListTip/Parent/TaskScroll View/Content/Main_1001";
|
| | | _model2.componentPath = _path;
|
| | | _model2.size = new Vector2(276, 72);
|
| | | _model2.direction = 3;
|
| | | _model2.clickClosed = true;
|
| | |
| | | {
|
| | | GA_Hero.s_MapSwitching = false;
|
| | |
|
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/TaskAndTeamTip/TaskListTip/Parent/TaskScroll View/Content/Main_1001");
|
| | | _temp = WindowCenter.Instance.uiRoot.transform.Find(_path);
|
| | | var _btn = _temp.GetComponent<UnityEngine.UI.Button>();
|
| | | if (_btn)
|
| | | {
|
| | |
| | | { |
| | | guideAchievementId = _achievementId; |
| | | } |
| | | }
|
| | |
|
| | | public static void Goto3129(int _achievementId, SuccessConfig config) |
| | | { |
| | | if (config == null) return; |
| | | |
| | | guideAchievementId = _achievementId; |
| | | var dogzModel = ModelCenter.Instance.GetModel<DogzModel>(); |
| | | int dogzId = 0; |
| | | if(config.Condition != null && config.Condition.Length > 0)
|
| | | {
|
| | | dogzId = config.Condition[0];
|
| | | } |
| | | dogzModel.SetSelectDogz(dogzId); |
| | | } |
| | | } |
| | | |
| | |
| | | case 125:
|
| | | AchievementGoto.GotoIceCrystal(_achievementId);
|
| | | break;
|
| | | case 129:
|
| | | AchievementGoto.Goto3129(_achievementId, config);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public int id;
|
| | | public int count;
|
| | | public bool bind;
|
| | | public int quality;
|
| | |
|
| | | public Item(int _id, int _count)
|
| | | {
|
| | | this.id = _id;
|
| | | this.count = _count;
|
| | | this.bind = false;
|
| | | this.quality = 0;
|
| | | }
|
| | |
|
| | | public Item(int _id, int _count, bool _bind)
|
| | |
| | | this.id = _id;
|
| | | this.count = _count;
|
| | | this.bind = _bind;
|
| | | this.quality = 0;
|
| | | }
|
| | |
|
| | | public Item(int _id, int _count, bool _bind, int _quality)
|
| | | {
|
| | | this.id = _id;
|
| | | this.count = _count;
|
| | | this.bind = _bind;
|
| | | this.quality = _quality;
|
| | | }
|
| | | }
|
| | |
|
| New file |
| | |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class PrayForDrugVipLackWin : Window
|
| | | {
|
| | | [SerializeField] Button m_ViewVip;
|
| | | [SerializeField] Button m_Close;
|
| | | [SerializeField] Text vipLvText;
|
| | | [SerializeField] Text contenetText;
|
| | | #region Built-in
|
| | | public static int vipLv = 0;
|
| | | public static string content;
|
| | | |
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_ViewVip.AddListener(ViewVip);
|
| | | m_Close.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | Display();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void Display()
|
| | | {
|
| | | vipLvText.text = vipLv.ToString();
|
| | | contenetText.text = content;
|
| | | }
|
| | |
|
| | | private void ViewVip()
|
| | | {
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("FuncNoOpen_VIP");
|
| | | return;
|
| | | }
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc2);
|
| | | }
|
| | | }
|
| | | }
|
copy from Core/GameEngine/Model/Config/BlastFurnaceLVConfig.cs.meta
copy to System/BlastFurnace/PrayForDrugVipLackWin.cs.meta
| File was copied from Core/GameEngine/Model/Config/BlastFurnaceLVConfig.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1bbbc87171e60f949bb6b7572c73fa38 |
| | | timeCreated: 1515213620 |
| | | guid: 55268f4e1c8090748bdbe67d2162fc31 |
| | | timeCreated: 1539156973 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | {
|
| | | SetPrayDrugCondi();
|
| | | SetPrayDrugDict();
|
| | | SetPrayVipLimit();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= UpdateFuncState;
|
| | | blastModel.RefreshStoveModelEvent -= UpdateBlastLv;
|
| | | playerPack.RefreshItemSumUseCntAct -= RefreshItemUsce;
|
| | | |
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= UpdateVipLV;
|
| | |
|
| | | }
|
| | |
|
| | | public void OnAfterPlayerDataInitialize()
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += UpdateVipLV;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += UpdateFuncState;
|
| | | blastModel.RefreshStoveModelEvent += UpdateBlastLv;
|
| | | playerPack.RefreshItemSumUseCntAct += RefreshItemUsce;
|
| | | SetPrayPrivilegeByVipLv();
|
| | | prayDrugRecordKey = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "PrayDrugRecord");
|
| | | SetIsNewDay();
|
| | | UpdatePrayDanRedpoint();
|
| | | }
|
| | |
|
| | | private void UpdateVipLV(PlayerDataRefresh type)
|
| | | {
|
| | | if (type != PlayerDataRefresh.VIPLv) return;
|
| | |
|
| | | SetPrayPrivilegeByVipLv();
|
| | | UpdatePrayDanRedpoint();
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | #region 读取本地配置
|
| | | public int costMoney { get; private set; }
|
| | | public int everyDayNum { get; private set; }
|
| | | public int costMoney { get; private set; } |
| | | public int prayPushLv { get; private set;}
|
| | |
|
| | | private void SetPrayDrugCondi()
|
| | | {
|
| | | FuncConfigConfig func = Config.Instance.Get<FuncConfigConfig>("GodAlchemy");
|
| | | costMoney = int.Parse(func.Numerical2);
|
| | | everyDayNum = int.Parse(func.Numerical3);
|
| | | func = Config.Instance.Get<FuncConfigConfig>("GodAlchemyShow");
|
| | | prayPushLv = int.Parse(func.Numerical2);
|
| | | }
|
| | |
| | | if (day != TimeUtility.ServerNow.Day)
|
| | | {
|
| | | IsNewDay = true;
|
| | | LocalSave.SetInt(prayDrugRecordKey, TimeUtility.ServerNow.Day);
|
| | | if (CheckIsPray())
|
| | | {
|
| | | LocalSave.SetInt(prayDrugRecordKey, TimeUtility.ServerNow.Day);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | else
|
| | | {
|
| | | IsNewDay = true;
|
| | | LocalSave.SetInt(prayDrugRecordKey, TimeUtility.ServerNow.Day);
|
| | | if(CheckIsPray())
|
| | | {
|
| | | LocalSave.SetInt(prayDrugRecordKey, TimeUtility.ServerNow.Day);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public int everyDayNum { get; private set; }
|
| | | public int minVipLvLimit { get; private set; }
|
| | | public void SetPrayPrivilegeByVipLv()
|
| | | {
|
| | | int vipLv = PlayerDatas.Instance.baseData.VIPLv;
|
| | | everyDayNum = VipPrivilegeConfig.GetVipPrivilegeData(VipPrivilegeType.PrayForDrug,vipLv);
|
| | | }
|
| | |
|
| | | public void SetPrayVipLimit()
|
| | | {
|
| | | for (int i = 0; i < 16; i++)
|
| | | {
|
| | | int prayNum = VipPrivilegeConfig.GetVipPrivilegeData(VipPrivilegeType.PrayForDrug, i);
|
| | | if(prayNum != 0)
|
| | | {
|
| | | minVipLvLimit = i;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool CheckIsPrayByVip()
|
| | | {
|
| | | return PlayerDatas.Instance.baseData.VIPLv >= minVipLvLimit ? true : false;
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | }
|
| | |
|
| | | #region 红点
|
| | |
|
| | | public bool CheckIsPray()
|
| | | {
|
| | | if (blastModel.StoveLV < prayPushLv
|
| | | || alreadyPrayNum >= everyDayNum
|
| | | || GetPrayDruglist().Count < 1)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | return true;
|
| | | }
|
| | |
|
| | | public const int PRAYDRUGREDPOINT_KEY = 110011001;
|
| | | private Redpoint prayRedpoint = new Redpoint(BlastFurnaceModel.LINGDANREDPOINT_KEY, PRAYDRUGREDPOINT_KEY);
|
| | | public void UpdatePrayDanRedpoint()
|
| | | {
|
| | | if (blastModel.StoveLV < prayPushLv
|
| | | || alreadyPrayNum >= everyDayNum
|
| | | || GetPrayDruglist().Count < 1
|
| | | || !IsNewDay)
|
| | | if ( !CheckIsPray() || !IsNewDay)
|
| | | {
|
| | | prayRedpoint.state = RedPointState.None;
|
| | | return;
|
| | |
| | |
|
| | | public void ClearPrayRedpoint()
|
| | | {
|
| | | prayRedpoint.state = RedPointState.None;
|
| | | IsNewDay = false;
|
| | | if(prayRedpoint.state != RedPointState.None)
|
| | | {
|
| | | prayRedpoint.state = RedPointState.None;
|
| | | LocalSave.SetInt(prayDrugRecordKey, TimeUtility.ServerNow.Day);
|
| | | IsNewDay = false;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | | }
|
| | |
| | | [SerializeField] ScrollerController ctrl;
|
| | | [SerializeField] Button prayBtn;
|
| | | [SerializeField] Image prayBtnImg;
|
| | | [SerializeField] GameObject vipPray;
|
| | | [SerializeField] Text prayVipLimit;
|
| | | [SerializeField] GameObject unVipPray;
|
| | | [SerializeField] GameObject vipLimitText;
|
| | | [SerializeField] GameObject prayMoneyGo;
|
| | |
|
| | | [SerializeField] Text costText;
|
| | | [SerializeField] Button closeBtn;
|
| | | [Header("最大格子数")]
|
| | |
| | | private void UpdatePrayBtn()
|
| | | {
|
| | | prayBtn.RemoveAllListeners();
|
| | | if (PrayModel.alreadyPrayNum >= PrayModel.everyDayNum)
|
| | | if(PrayModel.CheckIsPrayByVip())
|
| | | {
|
| | | prayBtnImg.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | vipLimitText.SetActive(false);
|
| | | vipPray.SetActive(false);
|
| | | unVipPray.SetActive(true);
|
| | | if (PrayModel.alreadyPrayNum >= PrayModel.everyDayNum)
|
| | | {
|
| | | prayBtnImg.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | }
|
| | | else
|
| | | {
|
| | | prayBtn.AddListener(ClickPrayBtn);
|
| | | prayBtnImg.material = MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | prayBtn.AddListener(ClickPrayBtn);
|
| | | prayBtnImg.material = MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | prayBtnImg.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | vipPray.SetActive(true);
|
| | | unVipPray.SetActive(false);
|
| | | vipLimitText.SetActive(true);
|
| | | prayVipLimit.text = StringUtility.Contact("V",PrayModel.minVipLvLimit);
|
| | | prayBtn.AddListener(()=>
|
| | | {
|
| | | PrayForDrugVipLackWin.vipLv = PrayModel.minVipLvLimit;
|
| | | PrayForDrugVipLackWin.content = Language.Get("BlessingHint", PrayModel.costMoney);
|
| | | WindowCenter.Instance.Open<PrayForDrugVipLackWin>();
|
| | | });
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | private void ClickPrayBtn()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static int GetVersionNumber(string version)
|
| | | {
|
| | | var numberStrings = version.Split('.');
|
| | | var number = 0;
|
| | |
|
| | | for (var i = 0; i < Mathf.Min(numberStrings.Length, 3); i++)
|
| | | {
|
| | | var temp = 0;
|
| | | int.TryParse(numberStrings[i], out temp);
|
| | | number += temp * MathUtility.Power(1000, 2 - i);
|
| | | }
|
| | |
|
| | | return number;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool IsShangGu()
|
| | | {
|
| | | return VersionConfig.Get().appId == "815035927";
|
| | | }
|
| | |
|
| | | public class VersionInfo
|
| | | {
|
| | | public int ForceCount;
|
| | |
| | | [SerializeField]
|
| | | Text successRateText;
|
| | |
|
| | | [SerializeField] Text dismantleText;
|
| | |
|
| | | [SerializeField]
|
| | | Button helpBtn;
|
| | |
|
| | |
| | |
|
| | | private void CreateCell()
|
| | | {
|
| | | dismantleText.gameObject.SetActive(false);
|
| | | cellCtrl.Refresh();
|
| | |
|
| | | if(curSecondType == 0)
|
| | | {
|
| | | ChangeUIState(true, false,false);
|
| | |
| | | curComposeEquipIndex = -1;
|
| | | selectModel.ClearSelectModel();
|
| | | }
|
| | | |
| | | |
| | | CreateCell();
|
| | | }
|
| | |
|
| | |
| | | ItemCompoundConfig tagItemCompound = thirdTypelist[curComposeEquipIndex];
|
| | | ClickEquipTypeCell(tagItemCompound, curComposeEquipIndex);
|
| | | }
|
| | |
|
| | | if(thirdTypelist.Count > 1)
|
| | | {
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(thirdTypelist[0].makeID);
|
| | | if (itemConfig != null && itemConfig.ItemColor == 6)
|
| | | {
|
| | | dismantleText.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | dismantleText.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | dismantleText.gameObject.SetActive(false);
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | private void RefreshEquipTypeLineCell(ScrollerDataType type, CellView cell)
|
| | |
| | | for (int i = 0; i < hourMinutes.Count; i++)
|
| | | {
|
| | | var hourMinute = hourMinutes[i];
|
| | | if (hour <= hourMinute.hourEnd && minute <= hourMinute.minuteEnd)
|
| | | if (hour < hourMinute.hourEnd || (hour == hourMinute.hourEnd && minute <= hourMinute.minuteEnd))
|
| | | {
|
| | | _hourMinute = hourMinute;
|
| | | break;
|
| | |
| | | for (int i = 0; i < hourMinutes.Count; i++)
|
| | | {
|
| | | var hourMinute = hourMinutes[i];
|
| | | if (hour <= hourMinute.hourEnd && minute <= hourMinute.minuteEnd)
|
| | | if (hour < hourMinute.hourEnd || (hour == hourMinute.hourEnd && minute <= hourMinute.minuteEnd))
|
| | | {
|
| | | _hourMinute = hourMinute;
|
| | | break;
|
| | |
| | | var openDayWeek = (int)TimeUtility.openServerDayOfWeek;
|
| | | var dayIndex = TimeUtility.OpenDay + 1;
|
| | | var maxDays = 15 - openDayWeek == 0 ? 7 : openDayWeek;
|
| | | for (int i = dayIndex; i <= maxDays; i++)
|
| | | var startDay = dayIndex;
|
| | | var createRoleTime = TimeUtility.createRoleTime;
|
| | | if (dayIndex == 1 && specialOpenTimes.ContainsKey(openDayWeek) && specialOpenTimes[openDayWeek].ContainsKey(dayIndex))
|
| | | {
|
| | | var openServerDay = TimeUtility.ServerNow.AddTicks(-TimeUtility.OpenDay * TimeSpan.TicksPerDay);
|
| | | if (createRoleTime.Year == openServerDay.Year && createRoleTime.Month == openServerDay.Month
|
| | | && createRoleTime.Day == openServerDay.Day)
|
| | | {
|
| | | var hourMinutes = specialOpenTimes[openDayWeek][1];
|
| | | var hourMinute = hourMinutes[hourMinutes.Count - 1];
|
| | | var hour = createRoleTime.Hour;
|
| | | var minute = createRoleTime.Minute;
|
| | | if (hour > hourMinute.hourEnd ||
|
| | | (hour == hourMinute.hourEnd && minute >= hourMinute.minuteEnd))
|
| | | {
|
| | | startDay++;
|
| | | }
|
| | | }
|
| | | }
|
| | | for (int i = startDay; i <= maxDays; i++)
|
| | | {
|
| | | if (specialOpenTimes.ContainsKey(openDayWeek) && specialOpenTimes[openDayWeek].ContainsKey(dayIndex))
|
| | | {
|
| | |
| | | var openDayWeek = (int)TimeUtility.openServerDayOfWeek;
|
| | | var dayIndex = TimeUtility.OpenDay + 1;
|
| | | var maxDays = 15 - openDayWeek == 0 ? 7 : openDayWeek;
|
| | | for (int i = 1; i <= maxDays; i++)
|
| | | var startDay = 1;
|
| | | var createRoleTime = TimeUtility.createRoleTime;
|
| | | if (specialOpenTimes.ContainsKey(openDayWeek) && specialOpenTimes[openDayWeek].ContainsKey(1))
|
| | | {
|
| | | var openServerDay = TimeUtility.ServerNow.AddTicks(-TimeUtility.OpenDay * TimeSpan.TicksPerDay);
|
| | | if (createRoleTime.Year == openServerDay.Year && createRoleTime.Month == openServerDay.Month
|
| | | && createRoleTime.Day == openServerDay.Day)
|
| | | {
|
| | | var hourMinutes = specialOpenTimes[openDayWeek][1];
|
| | | var hourMinute = hourMinutes[hourMinutes.Count - 1];
|
| | | var hour = createRoleTime.Hour;
|
| | | var minute = createRoleTime.Minute;
|
| | | if (hour > hourMinute.hourEnd ||
|
| | | (hour == hourMinute.hourEnd && minute >= hourMinute.minuteEnd))
|
| | | {
|
| | | startDay = 2;
|
| | | }
|
| | | }
|
| | | }
|
| | | for (int i = startDay; i <= maxDays; i++)
|
| | | {
|
| | | if (specialOpenTimes.ContainsKey(openDayWeek) && specialOpenTimes[openDayWeek].ContainsKey(dayIndex))
|
| | | {
|
| | |
| | | { |
| | | if (PlayerDatas.Instance.baseData.MapID == DogzDungeonModel.DATA_MAPID) |
| | | { |
| | | WindowJumpMgr.Instance.ClearJumpData(); |
| | | WindowCenter.Instance.Close<LootPreciousFrameWin>(); |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | } |
| | |
| | | SysNotifyMgr.Instance.sysNotifyEvent += SystemNotifyEvent;
|
| | | GlobalTimeEvent.Instance.secondEvent += SecondEvent;
|
| | | TimeMgr.Instance.OnMinuteEvent += MinuteEvent;
|
| | | TimeUtility.OnServerOpenDayRefresh += OnServerOpenDayRefresh;
|
| | | OpenServerActivityCenter.Instance.Register(13, this);
|
| | | }
|
| | |
|
| | |
| | | SysNotifyMgr.Instance.sysNotifyEvent -= SystemNotifyEvent;
|
| | | GlobalTimeEvent.Instance.secondEvent -= SecondEvent;
|
| | | TimeMgr.Instance.OnMinuteEvent -= MinuteEvent;
|
| | | TimeUtility.OnServerOpenDayRefresh -= OnServerOpenDayRefresh;
|
| | | }
|
| | |
|
| | | private void OnServerOpenDayRefresh()
|
| | | {
|
| | | if (cacheNoticeOpen != IsOpen)
|
| | | {
|
| | | cacheNoticeOpen = !cacheNoticeOpen;
|
| | | if (onStateUpate != null)
|
| | | {
|
| | | onStateUpate((int)OpenServerActivityCenter.OSActivityType.FairyGrabBossNotice);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void MinuteEvent()
|
| | |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= OnRefreshFairyMine;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += OnRefreshFairyInfo;//加入仙盟
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine += OnRefreshFairyMine;//退出仙盟
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//数据的刷新(h0418)
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418)
|
| | | FairyAuMethodDic();
|
| | | FairyAuMethodRedPoint();
|
| | | }
|
| | |
|
| | | private void Updatefighting(PlayerDataRefresh obj)
|
| | | {
|
| | | if (obj == PlayerDataRefresh.LV)
|
| | | {
|
| | | FairyAuMethodDic();
|
| | | FairyAuMethodRedPoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnRefreshFairyInfo()//加入仙盟
|
| | | {
|
| | | FairyAuHallRedPoint();
|
| | |
| | | {
|
| | | if (isReconnected)
|
| | | {
|
| | | if (surplusTime < 0f)
|
| | | if (surplusTime <= 0f)
|
| | | {
|
| | | if (fighting)
|
| | | {
|
| | |
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendSellQuest(ItemWinBtnType.sell,attrData); });
|
| | | }
|
| | |
|
| | | List<int> dismantleReturnlist = attrData.GetUseDataModel((int)ItemUseDataKey.Def_IudetItemDecompound);
|
| | | if (dismantleReturnlist != null && dismantleReturnlist.Count > 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.dismantle, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendDismantleQuest(ItemWinBtnType.dismantle, attrData); });
|
| | | }
|
| | |
|
| | | if (!isOverdue)
|
| | | {
|
| | | if(attrData.itemConfig.JumpComposeCondi != null && attrData.itemConfig.JumpComposeCondi.Length > 0)
|
| | |
| | | }
|
| | | return s;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region 设置传奇属性
|
| | |
| | |
|
| | | if(type == PackType.rptDogzEquip || type == PackType.rptDogzItem)
|
| | | {
|
| | | strengthDataDict = new Dictionary<int, int>();
|
| | | if (GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
|
| | | {
|
| | | StrengthLV = GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus)[0];
|
| | | }
|
| | | strengthDataDict = beastModel.SiteEnhancementAttribute(type,index);
|
| | | Dictionary<int,int> getStregthDict = beastModel.SiteEnhancementAttribute(type,index);
|
| | | foreach(var key in getStregthDict.Keys)
|
| | | {
|
| | | strengthDataDict.Add(key,getStregthDict[key]);
|
| | | }
|
| | | }
|
| | |
|
| | | SetWinType();
|
| | |
| | | {
|
| | | legendIdlist = new List<int>();
|
| | | legendValuelist = new List<int>();
|
| | | string attrCntKey = StringUtility.Contact(itemConfig.ItemColor, itemConfig.StarLevel);
|
| | | if (itemTipsModel.legendAttrIDPreviewDict.ContainsKey(itemConfig.EquipPlace))
|
| | | {
|
| | | foreach (var attrType in itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace].Keys)
|
| | | {
|
| | | switch (attrType)
|
| | | int attrCnt = 0;
|
| | | if (itemTipsModel.legendAttrCntPreviewDict.ContainsKey(attrCntKey))
|
| | | {
|
| | | case LegendAttrType.Pursuit:
|
| | | legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | case LegendAttrType.Fixed:
|
| | | legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | attrCnt = itemTipsModel.legendAttrCntPreviewDict[attrCntKey][attrType];
|
| | | }
|
| | | if(attrCnt > 0)
|
| | | {
|
| | | switch (attrType)
|
| | | {
|
| | | case LegendAttrType.Pursuit:
|
| | | legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | case LegendAttrType.Fixed:
|
| | | legendIdlist.AddRange(itemTipsModel.legendAttrIDPreviewDict[itemConfig.EquipPlace][attrType]);
|
| | | break;
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | | int i = 0;
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 发送拆解请求
|
| | | public void SendDismantleQuest(ItemWinBtnType btnType, ItemAttrData attrData)
|
| | | {
|
| | | List<int> dismantleReturnlist = attrData.GetUseDataModel((int)ItemUseDataKey.Def_IudetItemDecompound);
|
| | | int needGridCnt = 0;
|
| | | int fixedMatcnt = 0;
|
| | | int unfixedMatId = 0;
|
| | | for (int i = 0; i < dismantleReturnlist.Count; i++)
|
| | | {
|
| | | if (i == 0)
|
| | | {
|
| | | if (dismantleReturnlist[i] != 0)
|
| | | {
|
| | | needGridCnt += 1;
|
| | | unfixedMatId = dismantleReturnlist[i];
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if ((i - 1) % 3 == 0)
|
| | | {
|
| | | if (dismantleReturnlist[i] != 0)
|
| | | {
|
| | | needGridCnt += 1;
|
| | | fixedMatcnt += dismantleReturnlist[i + 1];
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | int offsetGrid = needGridCnt - playerPack.GetReaminGridCount(PackType.rptItem) - 1;
|
| | | if (offsetGrid > 0)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("BagFull102", attrData.itemConfig.ItemName, offsetGrid);
|
| | | return;
|
| | | }
|
| | | else
|
| | | {
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(unfixedMatId);
|
| | | if(itemConfig != null)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("PinkChaiRemind2", fixedMatcnt,itemConfig.LV),
|
| | | (bool isOk)=>
|
| | | {
|
| | | if(isOk)
|
| | | {
|
| | | CA313_tagCMItemDecompound decompound = new CA313_tagCMItemDecompound();
|
| | | decompound.Index = (byte)attrData.index;
|
| | | GameNetSystem.Instance.SendInfo(decompound);
|
| | | }
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | CA313_tagCMItemDecompound decompound = new CA313_tagCMItemDecompound();
|
| | | decompound.Index = (byte)attrData.index;
|
| | | GameNetSystem.Instance.SendInfo(decompound);
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 发送续费请求
|
| | | public void SendRenewalQuest(ItemWinBtnType btnType,int index)
|
| | | {
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region 获取仓库数据
|
| | | #region 获取仓库数据
|
| | | public void SendOpenWarehouse()
|
| | | {
|
| | | CA204_tagCMOpenLongWarehouse openWarehouse = new CA204_tagCMOpenLongWarehouse();
|
| | |
| | | equipAttrActiveDict.TryGetValue(type,out cnt);
|
| | | return cnt;
|
| | | }
|
| | |
|
| | | public List<int> GetAddAttrIdByStars(out int starsCount)
|
| | | {
|
| | | starsCount = 0;
|
| | | List<int> activeIdlist = new List<int>();
|
| | | List<int> addIdlist = new List<int>();
|
| | | int activeStars = GetActiveCntByType(1);
|
| | | RoleEquipStarsConfig activeStarsConfig = RoleEquipStarsConfig.GetEquipStarsModel(activeStars);
|
| | | if(activeStarsConfig != null)
|
| | | {
|
| | | for(int i = 0; i < activeStarsConfig.attType.Length; i++)
|
| | | {
|
| | | activeIdlist.Add(activeStarsConfig.attType[i]);
|
| | | }
|
| | | }
|
| | | List<RoleEquipStarsConfig> starsConfigs = Config.Instance.GetAllValues<RoleEquipStarsConfig>();
|
| | | for (int i = 0; i < starsConfigs.Count; i++)
|
| | | {
|
| | | bool isAddId = false;
|
| | | RoleEquipStarsConfig starsConfig = starsConfigs[i];
|
| | | if (activeStars < starsConfig.countNeed)
|
| | | {
|
| | | for(int j = 0; j < starsConfig.attType.Length; j++)
|
| | | {
|
| | | int attrId = starsConfig.attType[j];
|
| | | if (!activeIdlist.Contains(attrId))
|
| | | {
|
| | | isAddId = true;
|
| | | addIdlist.Add(attrId);
|
| | | }
|
| | | }
|
| | | }
|
| | | if(isAddId)
|
| | | {
|
| | | starsCount = starsConfig.countNeed;
|
| | | break;
|
| | | }
|
| | | |
| | | }
|
| | | return addIdlist;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #endregion
|
| | |
| | | [SerializeField] Button activityBtn;
|
| | | [SerializeField] Text activeBtnText;
|
| | | [SerializeField] UIEffect successEffect;
|
| | | [SerializeField] Text addAttrText;
|
| | |
|
| | | private int _curStarsCount;
|
| | | private PlayerPropertyConfig _playerProModel;
|
| | |
| | | nextNoActObj.SetActive(true);
|
| | | RefreshActiveBtnUI(false);
|
| | | }
|
| | |
|
| | | int addAttrStarsNum = 0;
|
| | | List<int> addIdlist = playerPack.GetAddAttrIdByStars(out addAttrStarsNum);
|
| | | if(addIdlist.Count > 0)
|
| | | {
|
| | | addAttrText.gameObject.SetActive(true);
|
| | | string addAttr = "";
|
| | | for(int i = 0; i < addIdlist.Count; i++)
|
| | | {
|
| | | PlayerPropertyConfig propertyConfig = Config.Instance.Get<PlayerPropertyConfig>(addIdlist[i]);
|
| | | if(propertyConfig != null)
|
| | | {
|
| | | addAttr = StringUtility.Contact(addAttr, propertyConfig.Name);
|
| | | }
|
| | | }
|
| | | addAttrText.text = Language.Get("KnapS148",addAttrStarsNum,addAttr);
|
| | | }
|
| | | else
|
| | | {
|
| | | addAttrText.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshActiveBtnUI(bool isActive)
|
| | |
| | | {
|
| | | if (_playerProModel.ISPercentage == 0)
|
| | | {
|
| | | strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + proValue + "</color>";
|
| | | strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + proValue + "</color>";
|
| | | }
|
| | | else if (_playerProModel.ISPercentage == 1)
|
| | | {
|
| | | strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + (float)Math.Round(proValue / 100f, 1) + "%" + "</color>";
|
| | | strPro = _playerProModel.Name + "<color=#109D06FF>" + " +" + (float)Math.Round(proValue / 100f, 1) + "%" + "</color>";
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | var itemBehaviour = RequireBehaviour(); |
| | | if (itemBehaviour != null) |
| | | { |
| | | var quality = modelInterface.GetItemQuality(itemId, model.useDataDict); |
| | | itemBehaviour.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | itemBehaviour.Begin(new Item(itemId, 1), m_StartPoint.localPosition, m_EndPoint.localPosition, OnBehaviourFinished); |
| | | itemBehaviour.Begin(new Item(itemId, 1, false, quality), m_StartPoint.localPosition, m_EndPoint.localPosition, OnBehaviourFinished); |
| | | showingItems.Add(itemBehaviour.gameObject); |
| | | } |
| | | } |
| | |
| | | m_BuildTime.text = "";
|
| | | }
|
| | |
|
| | | m_Progress.text = StringUtility.Contact(0, "%");
|
| | | m_Progress.text = VersionUtility.Instance.IsShangGu() ? "" : StringUtility.Contact(0, "%");
|
| | |
|
| | | UpdateLoadingProgress(Launch.currentStage, Launch.progress);
|
| | |
|
| | |
| | | }
|
| | |
|
| | | m_ProgressSlider.value = behaviourProgress;
|
| | | m_Progress.text = StringUtility.Contact(stepDescription, Mathf.RoundToInt(behaviourProgress * 100), "%");
|
| | | m_Progress.text = VersionUtility.Instance.IsShangGu() ? stepDescription :
|
| | | StringUtility.Contact(stepDescription, Mathf.RoundToInt(behaviourProgress * 100), "%");
|
| | |
|
| | | if (!assetBuildTimeShowed && AssetVersionUtility.assetsBuildTime != DateTime.MinValue)
|
| | | {
|
| | |
| | | }else if(SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Js)
|
| | | {
|
| | | send.IDType = 4;
|
| | | send.Extra += ("|" + sdkLoginResult.token);
|
| | | send.ExtraLen = (byte)send.Extra.Length;
|
| | | }
|
| | | send.AccID = sdkLoginResult.account;
|
| | | send.Password = sdkLoginResult.token;
|
| | |
| | | if (_DicTaskInformation[_MissionId].ContainsKey(_DictKey))
|
| | | {
|
| | | _DicTaskInformation[_MissionId][_DictKey] = _DictValue.ToString();
|
| | | if (_DictKey == "kaji" && _DictValue == 0)
|
| | | if (_DictKey == "kaji" && (_DictValue == 0|| _DictValue == 1))//kaji:0为主线卡级变更,kaji:1为魔族卡级变更
|
| | | {
|
| | | if (CardLevelChange != null)
|
| | | {
|
| | |
| | | public class UpgradeWin : Window |
| | | {
|
| | | [SerializeField] ScaleTween m_ScaleTween; |
| | | [SerializeField] UIAlphaTween m_UIAlphaTween; |
| | | [SerializeField] Text m_TextLV; |
| | | [SerializeField] UIEffect m_UIEffect; |
| | | public float Delay = 0.5f; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | m_UIAlphaTween.SetStartState();
|
| | | m_TextLV.text = PlayerDatas.Instance.baseData.LV.ToString();
|
| | | } |
| | | protected override void OnActived()
|
| | | {
|
| | | m_UIEffect.Play();
|
| | | m_UIEffect.OnComplete = () => { CloseImmediately(); };
|
| | | m_ScaleTween.Play();
|
| | | m_UIEffect.OnComplete = () =>
|
| | | {
|
| | | StopCoroutine(DelayIEnumerator());
|
| | | Close();
|
| | | };
|
| | | m_ScaleTween.Play(false, () => { StartCoroutine(DelayIEnumerator()); });
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | {
|
| | |
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | |
|
| | | IEnumerator DelayIEnumerator()
|
| | | {
|
| | | yield return new WaitForSeconds(Delay);
|
| | | m_UIAlphaTween.Play();
|
| | | }
|
| | | #endregion
|
| | | private void windowBeforeClose(Window _window)
|
| | | {
|
| | | if (_window is MainInterfaceWin)
|
| | | {
|
| | | StopCoroutine(DelayIEnumerator());
|
| | | Close();
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField] Image m_Icon; |
| | | public Image icon { get { return m_Icon; } } |
| | | [SerializeField] Transform m_Locked; |
| | | public Transform locked { get { return m_Locked; } } |
| | | public Transform locked |
| | | { |
| | | get |
| | | { |
| | | return m_Locked; |
| | | } |
| | | } |
| | | |
| | | [SerializeField] Text m_CoolDown; |
| | | [SerializeField] Image m_CoolDownMask; |
| | |
| | | bool isExit = false; |
| | | |
| | | float m_TotalCoolDown = 0f; |
| | | public float totalCoolDown { |
| | | get { |
| | | public float totalCoolDown |
| | | { |
| | | get |
| | | { |
| | | return m_TotalCoolDown; |
| | | } |
| | | set { |
| | | set |
| | | { |
| | | m_TotalCoolDown = value; |
| | | } |
| | | } |
| | | |
| | | float m_CoolDownCompleteTime = 0f; |
| | | public float coolDownCompleteTime { |
| | | get { |
| | | public float coolDownCompleteTime |
| | | { |
| | | get |
| | | { |
| | | return m_CoolDownCompleteTime; |
| | | } |
| | | set { |
| | | set |
| | | { |
| | | m_CoolDownCompleteTime = value; |
| | | } |
| | | } |
| | |
| | | m_SkillData = _skillData; |
| | | if (m_SkillData == null) |
| | | { |
| | | m_Locked.gameObject.SetActive(true); |
| | | locked.gameObject.SetActive(true); |
| | | m_Icon.gameObject.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | if (PreFightMission.Instance.IsFinished()) |
| | | if (PreFightMission.Instance.IsFinished() |
| | | || PreFightMission.Instance.s_MissionDict.ContainsKey(1002)) |
| | | { |
| | | m_Locked.gameObject.SetActive(false); |
| | | locked.gameObject.SetActive(false); |
| | | m_Icon.gameObject.SetActive(true); |
| | | } |
| | | var skillConfig = m_SkillData.skillCfg; |
| | |
| | | case GuideTriggerType.QuestCanAward:
|
| | | return mainTaskId == config.Condition && taskmodel.currentMissionState == 2;
|
| | | case GuideTriggerType.QuestLimit:
|
| | | return taskmodel.currentMission == config.Condition &&
|
| | | return mainTaskId == config.Condition &&
|
| | | (taskmodel.GetTaskStatus(config.Condition) == PlayerTaskDatas.TaskStatus.CardLevel || taskmodel.GetTaskStatus(config.Condition) == PlayerTaskDatas.TaskStatus.TreasureCardLevel);
|
| | | case GuideTriggerType.QuestContinue:
|
| | | return taskmodel.currentMission == config.Condition && (taskmodel.GetTaskStatus(config.Condition) == PlayerTaskDatas.TaskStatus.Normal);
|
| | | var questState = taskmodel.SideQuestState(config.Condition);
|
| | | var taskStatus = taskmodel.GetTaskStatus(config.Condition);
|
| | | return questState == 1 && (taskStatus == PlayerTaskDatas.TaskStatus.Normal || taskStatus == PlayerTaskDatas.TaskStatus.TreasureCardLevel);
|
| | | case GuideTriggerType.Treasure:
|
| | | if (!model.newGotShowing)
|
| | | {
|
| | |
| | | private void OnRankListClick(CellView cell)
|
| | | {
|
| | | int index = cell.index;
|
| | | if (model.rankList == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (index < model.rankList.Count)
|
| | | {
|
| | | if (model.rankList[index].ID == PlayerDatas.Instance.baseData.PlayerID)
|
| | |
| | | }
|
| | | int _titleId = model.roleTitleList[_index];
|
| | | TitleData titleData = model.GetGainTitle(_titleId);
|
| | | DienstgradConfig _dienstgradCfg = Config.Instance.Get<DienstgradConfig>(_titleId);
|
| | | m_TitleIcon.SetSprite(_dienstgradCfg.Image);
|
| | | DienstgradConfig config = Config.Instance.Get<DienstgradConfig>(_titleId);
|
| | | m_TitleIcon.SetSprite(config.Image);
|
| | | m_TitleIcon.SetNativeSize();
|
| | | if (model.presentSelectTitle == model.roleTitleList[_index])
|
| | | {
|
| | |
| | | {
|
| | | m_BottomImg.SetSprite("Title_PopupWindow");
|
| | | }
|
| | | m_TitleGetBtn.gameObject.SetActive(!model.IsTitleGain(_titleId));
|
| | | m_TitleGetBtn.gameObject.SetActive(!model.IsTitleGain(_titleId) && config.gotoId > 0);
|
| | | m_UseTitleBtn.gameObject.SetActive(model.IsTitleGain(_titleId));
|
| | | m_ContainerNewGet.gameObject.SetActive(model.IsNewGet(_titleId));
|
| | | m_UseTitleBtn.onClick.RemoveAllListeners();
|
| | |
| | | m_TitleEquipImg.gameObject.SetActive(titleData.isEquiped);
|
| | | }
|
| | | m_TitleGetBtn.RemoveAllListeners();
|
| | | if (titleData == null)
|
| | | if (titleData == null && config.gotoId > 0)
|
| | | {
|
| | | m_TitleGetBtn.AddListener(() =>
|
| | | {
|
| | | if (_dienstgradCfg.gotoId > 0)
|
| | | if (config.gotoId > 0)
|
| | | {
|
| | | if (_dienstgradCfg.missionId > 0
|
| | | && task.GetQuestState(_dienstgradCfg.missionId) == -1)
|
| | | if (config.missionId > 0
|
| | | && task.GetQuestState(config.missionId) == -1)
|
| | | {
|
| | | var taskConfig = Config.Instance.Get<PyTaskConfig>(_dienstgradCfg.missionId);
|
| | | var taskConfig = Config.Instance.Get<PyTaskConfig>(config.missionId);
|
| | | var taskName = string.Empty;
|
| | | if (taskConfig != null)
|
| | | {
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("RoleTitle_1", taskName);
|
| | | return;
|
| | | }
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)_dienstgradCfg.gotoId);
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.gotoId);
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | int[] curAttrValues = ConfigParse.GetMultipleStr<int>(curSpecConfig.attByLevelValue);
|
| | | raiseAttrCell.SetActive(false);
|
| | |
|
| | | tempCelllist.Add(GetRaiseGo(Language.Get("MainInterfacePanel_HeadPortraitTip_ZL"),preFightNum.ToString(),(curFightNum-preFightNum).ToString()));
|
| | | tempCelllist.Add(GetRaiseGo(Language.Get("L1056"),preFightNum.ToString(),(curFightNum-preFightNum).ToString()));
|
| | |
|
| | | for (int i = 0; i < preAttrIds.Length; i++)
|
| | | {
|
| | |
| | |
|
| | |
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | if (itemModel == null)
|
| | | var WingItem = Config.Instance.Get<WingRefineExpConfig>(itemModel.itemId);
|
| | | if (itemModel == null || WingItem == null)
|
| | | return;
|
| | |
|
| | | int YRefiningRatioMin = 0;//预览生命比值
|
| | |
| | | #endregion
|
| | |
|
| | | #region 初始化系统设置
|
| | | SystemSetting.Instance.SetSoundVolume(1);
|
| | | SystemSetting.Instance.SetSoundEffect(1);
|
| | | SystemSetting.Instance.SetSystemSettingSwitch(SystemSwitch.OtherPlayer, false);
|
| | | SystemSetting.Instance.SetSystemSettingSwitch(SystemSwitch.HideMonster, false);
|
| | | #endregion
|
| | |
| | |
|
| | | public float GetSoundVolume()
|
| | | {
|
| | | return LocalSave.GetFloat(SOUND_VOLUME_KEY, 1);
|
| | | return LocalSave.GetFloat(SOUND_VOLUME_KEY, .55f);
|
| | | }
|
| | |
|
| | | public void SetSoundEffect(float value)
|
| | |
| | |
|
| | | public float GetSoundEffect()
|
| | | {
|
| | | return LocalSave.GetFloat(SOUND_EFFECT_KEY, 1);
|
| | | return LocalSave.GetFloat(SOUND_EFFECT_KEY, .55f);
|
| | | }
|
| | |
|
| | | public void SetGameFps(GameFps _frame)
|
| | |
| | | {
|
| | | DisplayPotentialBook(model.selectedPotentialBook);
|
| | | var levelUpConfig = GetPotentialLevelUpConfig();
|
| | | m_PotentialCount.text = StringUtility.Contact(levelUpConfig.own, "/", levelUpConfig.need);
|
| | | bool satisfy = levelUpConfig.own >= levelUpConfig.need;
|
| | | m_PotentialCount.text = StringUtility.Contact(UIHelper.GetTextColorByItemColor(satisfy ?
|
| | | TextColType.LightYellow : TextColType.Red, levelUpConfig.own.ToString()), "/", levelUpConfig.need);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | | properties[0].gameObject.SetActive(true);
|
| | | properties[0].Display(6, (int)(value * percentWing));
|
| | | properties[0].DisplayUpper(6, (int)(value * percentWing));
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | m_PreviewPropretys[0].gameObject.SetActive(true);
|
| | | m_PreviewPropretys[0].Display(6, (int)(value * percentWing));
|
| | | m_PreviewPropretys[0].DisplayUpper(6, (int)(value * percentWing));
|
| | | }
|
| | | break;
|
| | | case TreasurePrivilege.DemonJarAtk:
|
| | |
| | | private Dictionary<TreasureCategory, List<TreasureComponent>> m_Treasures = new Dictionary<TreasureCategory, List<TreasureComponent>>();
|
| | | private Dictionary<TreasureCategory, bool> m_PreloadDict = new Dictionary<TreasureCategory, bool>();
|
| | |
|
| | | Coroutine preloadCoroutine = null;
|
| | | private void InitTreasure()
|
| | | {
|
| | | Load(TreasureCategory.Human);
|
| | |
| | | HideAllTreasure();
|
| | | InitScene();
|
| | |
|
| | | if (preloadCoroutine != null)
|
| | | {
|
| | | StopCoroutine(preloadCoroutine);
|
| | | preloadCoroutine = null;
|
| | | }
|
| | |
|
| | | if (!m_PreloadDict.ContainsKey(currentCategory) && !_closer)
|
| | | {
|
| | | Preloading = true;
|
| | |
| | | current_angle = 0;
|
| | | before_angle = 0;
|
| | | before_drag_angle = current_angle;
|
| | | StartCoroutine(Co_PreLoad(currentCategory, () =>
|
| | | {
|
| | | if (!m_PreloadDict.ContainsKey(currentCategory))
|
| | | {
|
| | | m_PreloadDict.Add(currentCategory, true);
|
| | | }
|
| | | GoTreasureFromHeader(_index);
|
| | | Preloading = false;
|
| | | }));
|
| | | preloadCoroutine = StartCoroutine(Co_PreLoad(currentCategory, () =>
|
| | | {
|
| | | if (!m_PreloadDict.ContainsKey(currentCategory))
|
| | | {
|
| | | m_PreloadDict.Add(currentCategory, true);
|
| | | }
|
| | | GoTreasureFromHeader(_index);
|
| | | Preloading = false;
|
| | | preloadCoroutine = null;
|
| | | }));
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | public void Goto(int _index, bool _force = false)
|
| | | {
|
| | | var _list = m_Treasures[currentCategory];
|
| | | if (_index < 0 || _index >= _list.Count)
|
| | | {
|
| | | _index = 0;
|
| | | }
|
| | | jumpTreasure = _list[_index].treasureId;
|
| | | if (!_force && _index == presentSelectIndex)
|
| | | {
|
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI { |
| | | |
| | | public class CheckDisplay:MonoBehaviour {
|
| | | public static event Action EndOfFlashing;
|
| | | [SerializeField] Image m_Image1;
|
| | | [SerializeField] Image m_Image2;
|
| | | [SerializeField] Image m_Image3;
|
| | |
| | | [SerializeField] Image m_Image6;
|
| | | [SerializeField] Image m_Image7;
|
| | | [SerializeField] Image m_Image8;
|
| | | [SerializeField] Image m_Image9; |
| | | |
| | | [SerializeField] Image m_Image9;
|
| | | [Header("闪烁时间")]
|
| | | public float FlashingTime = 2f; |
| | | private float _time=0; |
| | | bool IsBool = false; |
| | | private void OnEnable()
|
| | | {
|
| | | IsBool = false;
|
| | | _time = 0;
|
| | | } |
| | | private void LateUpdate()
|
| | | {
|
| | | if (IsBool)
|
| | | {
|
| | | _time += Time.deltaTime;
|
| | | if (FlashingTime < _time)
|
| | | {
|
| | | CloseAll();
|
| | | if (EndOfFlashing != null)
|
| | | {
|
| | | EndOfFlashing();
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | } |
| | | public void CloseAll()
|
| | | {
|
| | | m_Image1.gameObject.SetActive(false);
|
| | |
| | | m_Image7.gameObject.SetActive(false);
|
| | | m_Image8.gameObject.SetActive(false);
|
| | | m_Image9.gameObject.SetActive(false);
|
| | | IsBool = false;
|
| | | _time = 0;
|
| | | } |
| | | |
| | | public void ShowSelected(int Index)
|
| | |
| | | case 9:
|
| | | m_Image9.gameObject.SetActive(true);
|
| | | break;
|
| | |
|
| | | }
|
| | |
|
| | | IsBool = true;
|
| | | } |
| | | } |
| | | |
| | |
| | | using DG.Tweening; |
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI { |
| | | |
| | | public class RotatePointer:MonoBehaviour {
|
| | | namespace Snxxz.UI
|
| | | { |
| | | public class RotatePointer : MonoBehaviour
|
| | | {
|
| | | public bool _isRotate = false;//是否旋转
|
| | | public float Speed = 2000;//旋转速度
|
| | | private float Speed = 2000;//旋转速度
|
| | | public float Angle = 0; // 这个是设置停止的角度
|
| | | private float Acceleration = 0;//加速度
|
| | | private float _time;
|
| | |
| | | [Header("加速减速时间")]
|
| | | public float SpeedTime = 1;
|
| | | [Header("最小速度")]
|
| | | public float MinSpeed= 400;
|
| | | public float MinSpeed = 400;
|
| | | [Header("最大速度")]
|
| | | public float MaxSpeed = 800;
|
| | | WheelOfFortuneModel wheelOfFortuneModel { get { return ModelCenter.Instance.GetModel<WheelOfFortuneModel>(); } }
|
| | |
| | | }
|
| | | private void OnEnable()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | |
| | | }
|
| | | private Sequence sequence;
|
| | | void Update()
|
| | | {
|
| | |
|
| | | if (!_isRotate)
|
| | | {
|
| | | |
| | | if (-Angle != transform.eulerAngles.z) |
| | | { |
| | | if (Math.Abs((360 - Angle) - transform.eulerAngles.z) > 0.2 && Angle - transform.eulerAngles.z != 0) |
| | | {
|
| | | transform.DOPause();
|
| | | sequence.Kill();
|
| | | transform.localRotation = Quaternion.Euler(0, 0, -Angle);
|
| | | m_CheckDisplay.ShowSelected(wheelOfFortuneModel.Lattice);
|
| | | if (IsButtonShow != null)
|
| | | {
|
| | | IsButtonShow(true);
|
| | | }
|
| | | _time = 0;
|
| | | IsRotateBool = false;
|
| | | } |
| | | _isRotate = false;
|
| | | }
|
| | | return; //不旋转结束
|
| | | }
|
| | | |
| | |
|
| | | if (IsRotateBool)
|
| | | {
|
| | |
|
| | | _time += Time.deltaTime;
|
| | |
|
| | | if (_time < SpeedTime)//匀加速
|
| | | {
|
| | | Speed = MinSpeed + Acceleration * _time;
|
| | |
| | | {
|
| | | //结束,使用DoTween旋转到结束角度,耗时1秒
|
| | | //这里有个360,使用来防止指针回转的,如果不加这个360,你会看到指针倒退
|
| | | Sequence sequence = DOTween.Sequence();
|
| | | sequence = DOTween.Sequence();
|
| | | sequence.SetAutoKill(false);
|
| | | sequence.Append(transform.DORotate(new Vector3(0, 0, -(360 + Angle)), 2f, RotateMode.FastBeyond360));
|
| | | sequence.AppendCallback(()=> |
| | | sequence.AppendCallback(() =>
|
| | | {
|
| | | _isRotate = false; // 设置不旋转
|
| | | if (IsButtonShow != null)
|
| | |
| | | IsButtonShow(true);
|
| | | }
|
| | | m_CheckDisplay.ShowSelected(wheelOfFortuneModel.Lattice);
|
| | | }); |
| | | });
|
| | | IsRotateBool = false;
|
| | | }
|
| | | // DebugEx.LogError(transform.eulerAngles.z);
|
| | | } |
| | | }
|
| | | }
|
| | |
|
| | | //外部调用,初始化时间和打开旋转
|
| | | //外部调用,初始化时间和打开旋转,设置停止角度
|
| | | public void SetTime(bool _bool)
|
| | | {
|
| | | _time =0; |
| | | _time = 0; |
| | | Angle = wheelOfFortuneModel.AngleSave; |
| | | if (_bool)
|
| | | {
|
| | |
| | | IsRotateBool = true;
|
| | | _isRotate = true;
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | private void TweenOver()
|
| | | {
|
| | | |
| | | }
|
| | | //外部调用,设置停止角度 |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, October 09, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class UIEffectFly:MonoBehaviour {
|
| | | [SerializeField] Transform m_tran1;
|
| | | [SerializeField] Transform m_tran2;
|
| | | [SerializeField] Transform m_tran3;
|
| | | [SerializeField] Transform m_tran4;
|
| | | [SerializeField] Transform m_tran5;
|
| | | [SerializeField] Transform m_tran6;
|
| | | [SerializeField] Transform m_tran7;
|
| | | [SerializeField] Transform m_tran8;
|
| | | [SerializeField] Transform m_tran9; |
| | | |
| | | [SerializeField] Transform m_endTran;
|
| | |
|
| | | [Header("需要生成的个数")]
|
| | | public int NUMBER = 5;
|
| | | [Header("移动的时间")]
|
| | | public float SPEED = 2f;
|
| | | [Header("需要进行延迟的时间")]
|
| | | public float LOADTIME = 0.1f; |
| | | public void StartFly(int Inedx)
|
| | | {
|
| | | switch (Inedx)
|
| | | {
|
| | | case 1:
|
| | | GetVector3Pos(m_tran1.position, m_endTran.position);
|
| | | break;
|
| | | case 2:
|
| | | GetVector3Pos(m_tran2.position, m_endTran.position);
|
| | | break;
|
| | | case 3:
|
| | | GetVector3Pos(m_tran3.position, m_endTran.position);
|
| | | break;
|
| | | case 4:
|
| | | GetVector3Pos(m_tran4.position, m_endTran.position);
|
| | | break;
|
| | | case 5:
|
| | | GetVector3Pos(m_tran5.position, m_endTran.position);
|
| | | break;
|
| | | case 6:
|
| | | GetVector3Pos(m_tran6.position, m_endTran.position);
|
| | | break;
|
| | | case 7:
|
| | | GetVector3Pos(m_tran7.position, m_endTran.position);
|
| | | break;
|
| | | case 8:
|
| | | GetVector3Pos(m_tran8.position, m_endTran.position);
|
| | | break;
|
| | | case 9:
|
| | | GetVector3Pos(m_tran9.position, m_endTran.position);
|
| | | break;
|
| | | }
|
| | |
|
| | | } |
| | | |
| | | private void GetVector3Pos(Vector3 StartVec,Vector3 endVec)
|
| | | {
|
| | | var direction = Vector3.Normalize(StartVec - endVec);
|
| | | var normal = new Vector3(-direction.y, direction.x, 0);
|
| | | var distance = Vector3.Distance(StartVec, endVec);
|
| | | int Type = 0;
|
| | | int Type1 = 0;
|
| | | for (int i = 0; i < NUMBER; i++)
|
| | | {
|
| | | var pivot = StartVec + normal * UnityEngine.Random.Range(-distance, distance) * 0.7f + direction * distance * 0.4f;
|
| | | var effect = EffectMgr.Instance.PlayUIEffect(5134,2500, this.transform, true);
|
| | | effect.transform.position = StartVec;
|
| | | var bezierMove = effect.AddMissingComponent<BezierMove>();
|
| | | bezierMove.duration = (SPEED - i * LOADTIME);
|
| | | Type += 1;
|
| | | bezierMove.Begin(StartVec, pivot, endVec, () =>
|
| | | {
|
| | | Type1 += 1;
|
| | | effect.Stop();
|
| | | DestroyObject(bezierMove);
|
| | | if (Type == Type1)
|
| | | {
|
| | | // OnComplet();
|
| | | }
|
| | |
|
| | | });
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from Core/GameEngine/Model/Config/BlastFurnaceLVConfig.cs.meta
copy to System/Vip/VipInvest/UIEffectFly.cs.meta
| File was copied from Core/GameEngine/Model/Config/BlastFurnaceLVConfig.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1bbbc87171e60f949bb6b7572c73fa38 |
| | | timeCreated: 1515213620 |
| | | licenseType: Pro |
| | | guid: cd341680a37e9b14d92099dbcb899a44 |
| | | timeCreated: 1539072327 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | var BindJadewheel = Config.Instance.Get<FuncConfigConfig>("BindJadeWheelCfg"); |
| | | NeedJade = int.Parse(BindJadewheel.Numerical1); |
| | | AngleList = JsonMapper.ToObject<double[][]>(BindJadewheel.Numerical5); |
| | | for (int i = 0; i < AngleList.Length; i++) |
| | | { |
| | | if (AngleDic.Count <= 0) |
| | | { |
| | | int Type = i + 1; |
| | | AngleClass angleClass = new AngleClass(); |
| | | angleClass.AngleStart = (float)AngleList[i][0]; |
| | | angleClass.AngleEnd = (float)AngleList[i][1]; |
| | | AngleDic.Add(Type, angleClass); |
| | | } |
| | | } |
| | | if (AngleDic.Count <= 0)
|
| | | {
|
| | | for (int i = 0; i < AngleList.Length; i++)
|
| | | {
|
| | | int Type = i + 1;
|
| | | AngleClass angleClass = new AngleClass();
|
| | | angleClass.AngleStart = (float)AngleList[i][0];
|
| | | angleClass.AngleEnd = (float)AngleList[i][1];
|
| | | AngleDic.Add(Type, angleClass);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | public override void UnInit() |
| | |
| | | { |
| | | Lattice = Info.Index; |
| | | Number = Info.Cnt; |
| | | if (IsOk) |
| | | if (IsOk && Info.Index!=0) |
| | | { |
| | | if (AngleDic.ContainsKey(Lattice)) |
| | | { |
| | | |
| | | float flo = UnityEngine.Random.Range(AngleDic[Lattice].AngleStart + 0.05f, AngleDic[Lattice].AngleEnd - 0.05f); |
| | | float flo = UnityEngine.Random.Range(AngleDic[Lattice].AngleStart + 1f, AngleDic[Lattice].AngleEnd - 1f);
|
| | | flo = (float)Math.Round((double)flo, 2); |
| | | if (flo > 360f) |
| | | { |
| | | flo = flo - 360f; |
| | |
| | | } |
| | | RedPoint(); |
| | | }
|
| | |
|
| | | } |
| | | public void StartTheDraw()//开始抽奖 |
| | | { |
| | |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | |
| | | public class WheelOfFortuneWin : Window |
| | | { |
| | | [SerializeField] Button m_LotteryBtn;
|
| | | [SerializeField] ImageEx m_LotteryImage;
|
| | | [SerializeField] RotatePointer m_RotatePointer; |
| | | [SerializeField] Toggle m_Toggle; |
| | | [SerializeField] Button m_CloseBtn;
|
| | | [SerializeField] Toggle m_Toggle;
|
| | | [SerializeField] CheckDisplay m_CheckDisplay;
|
| | | [SerializeField] Text Money1_Text;
|
| | | [SerializeField] Text Money2_Text;
|
| | | [SerializeField] Text m_Text_remainingTimes;
|
| | | [SerializeField] Text m_Text_remainingTimes;//剩余转动次数
|
| | | [SerializeField] Text m_Text_VIPuP;//VIP提升转动次数
|
| | | [SerializeField] Text m_GO;
|
| | | [SerializeField] Button m_PromotionBtn; |
| | | [SerializeField] RotationTween m_RotationTween; |
| | | [SerializeField] GameObject m_RequiredConsumption;
|
| | | [SerializeField] Text m_NeedMoney_Text; |
| | | [SerializeField] UIEffect m_UIEffect_1; |
| | | [Header("滚动时间")]
|
| | | public float RollingTime = 1f; |
| | | public float RollingTime = 1f; |
| | | VipModel m_Vipmodel;
|
| | | VipModel vipmodel { get { return m_Vipmodel ?? (m_Vipmodel = ModelCenter.Instance.GetModel<VipModel>()); } } |
| | | WheelOfFortuneModel wheelOfFortuneModel { get { return ModelCenter.Instance.GetModel<WheelOfFortuneModel>(); } }
|
| | |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | { |
| | | FairyJade = (int)UIHelper.GetMoneyCnt(2);
|
| | | Money1_Text.text = FairyJade.ToString();
|
| | | Money2_Text.text = UIHelper.GetMoneyCnt(1).ToString();
|
| | | m_NeedMoney_Text.text = wheelOfFortuneModel.NeedJade.ToString();
|
| | | m_RotatePointer.Init();
|
| | | IsLottery();//判断是否拥有次数 |
| | | } |
| | | |
| | | m_LotteryBtn.interactable = true;
|
| | | m_RequiredConsumption.SetActive(true);
|
| | | m_LotteryImage.gray = false;
|
| | | TextGo();
|
| | | IncreaseInFrequency();//次数提升
|
| | | RemainingTimes();//剩余次数 |
| | | }
|
| | | protected override void OnActived()
|
| | | {
|
| | | Money1_Text.transform.localRotation = Quaternion.Euler(0, 0, 0);
|
| | | m_RotationTween.enabled = false;
|
| | | }
|
| | | protected override void OnAfterOpen() |
| | | { |
| | | wheelOfFortuneModel.WheelOfFortuneUpdate += WheelOfFortuneUpdate; |
| | | RotatePointer.IsButtonShow += IsButtonShow; |
| | | RotatePointer.IsButtonShow += IsButtonShow;
|
| | | CheckDisplay.EndOfFlashing += EndOfFlashing; |
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418) |
| | | if (wheelOfFortuneModel.redPointStre1.state == RedPointState.Simple)
|
| | | {
|
| | | int GetDayOfYear = DateTime.Now.DayOfYear;
|
| | |
| | | protected override void OnPreClose() |
| | | {
|
| | | wheelOfFortuneModel.WheelOfFortuneUpdate -= WheelOfFortuneUpdate;
|
| | | RotatePointer.IsButtonShow -= IsButtonShow; |
| | | RotatePointer.IsButtonShow -= IsButtonShow;
|
| | | CheckDisplay.EndOfFlashing -= EndOfFlashing; |
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//数据的刷新(h0418) |
| | | }
|
| | |
|
| | | private void Updatefighting(PlayerDataRefresh obj)
|
| | | {
|
| | | if (obj == PlayerDataRefresh.VIPLv)
|
| | | {
|
| | | TextGo();
|
| | | RemainingTimes();//剩余次数
|
| | | IncreaseInFrequency();//次数提升
|
| | | }
|
| | | if (obj == PlayerDataRefresh.Gold)
|
| | | {
|
| | | Money2_Text.text = UIHelper.GetMoneyCnt(1).ToString();
|
| | | }
|
| | | }
|
| | |
|
| | | private void EndOfFlashing()
|
| | | {
|
| | | TiedJadeChange();
|
| | | m_UIEffect_1.Play();
|
| | | }
|
| | |
|
| | | private void WheelOfFortuneUpdate(float Angel)
|
| | | {
|
| | | m_LotteryBtn.interactable = false;
|
| | | m_RequiredConsumption.SetActive(false);
|
| | | m_LotteryImage.gray = true;
|
| | | m_RotatePointer.SetTime(m_Toggle.isOn);
|
| | | IsLottery();
|
| | | TextGo();
|
| | | RemainingTimes();//剩余次数
|
| | | IncreaseInFrequency();//次数提升
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose() |
| | |
| | | |
| | | private void OnClickButton()
|
| | | {
|
| | | m_CheckDisplay.CloseAll();
|
| | | wheelOfFortuneModel.StartTheDraw();//开始抽奖
|
| | | m_RotatePointer.SetTime(m_Toggle.isOn); |
| | | int LotteryNumber = vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.BindJadeWheel);
|
| | | if (LotteryNumber <= wheelOfFortuneModel.Number)
|
| | | {
|
| | | LackOfVIP(); //VIP 不足
|
| | | return;
|
| | | }
|
| | | else if (LotteryNumber > wheelOfFortuneModel.Number && (int)UIHelper.GetMoneyCnt(1) < wheelOfFortuneModel.NeedJade)
|
| | | {
|
| | | LackFairyJade();//仙玉不足
|
| | | return;
|
| | | }
|
| | | else if (LotteryNumber > wheelOfFortuneModel.Number && (int)UIHelper.GetMoneyCnt(1) >= wheelOfFortuneModel.NeedJade)
|
| | | {
|
| | | m_CheckDisplay.CloseAll();
|
| | | FairyJade = (int)UIHelper.GetMoneyCnt(2);
|
| | | Money1_Text.text = FairyJade.ToString();
|
| | | wheelOfFortuneModel.StartTheDraw();//开始抽奖
|
| | | }
|
| | | } |
| | | private void OnClickToggle(bool _bool)
|
| | | {
|
| | |
| | | {
|
| | | m_RotatePointer._isRotate = true;
|
| | | }
|
| | |
|
| | | }
|
| | | private void OnClickPromotionBtn()
|
| | | { |
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc4);
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv >= 10)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc1);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc4);
|
| | | }
|
| | | |
| | | }
|
| | | private void IsButtonShow(bool _bool)//是否可点击旋转
|
| | | {
|
| | | m_LotteryBtn.interactable = _bool;
|
| | | } |
| | | |
| | | private void IsLottery()
|
| | | {
|
| | | int LotteryNumber = vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.BindJadeWheel);
|
| | | if (LotteryNumber > wheelOfFortuneModel.Number)
|
| | | {
|
| | | remainingTimes = LotteryNumber - wheelOfFortuneModel.Number;
|
| | | m_LotteryBtn.interactable = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_LotteryBtn.interactable = false;
|
| | | }
|
| | | m_RequiredConsumption.SetActive(_bool);
|
| | | m_LotteryImage.gray = !_bool;
|
| | | } |
| | | private Sequence mScoreSequence; |
| | | private void TiedJadeChange()//绑玉变化
|
| | | {
|
| | | m_RotationTween.enabled = true;
|
| | | mScoreSequence = DOTween.Sequence();
|
| | | mScoreSequence.SetAutoKill(false);
|
| | | mScoreSequence.Append(DOTween.To(delegate(float value) |
| | | mScoreSequence.Append(DOTween.To(delegate (float value)
|
| | | {
|
| | | var temp = Math.Floor(value);
|
| | | Money1_Text.text = temp + "";
|
| | | }, FairyJade,(int)UIHelper.GetMoneyCnt(2), RollingTime));
|
| | | }, FairyJade, (int)UIHelper.GetMoneyCnt(2), RollingTime));
|
| | | mScoreSequence.AppendCallback(() =>
|
| | | {
|
| | | Money1_Text.transform.localRotation = Quaternion.Euler(0, 0, 0);
|
| | | m_RotationTween.enabled = false;
|
| | |
|
| | | });
|
| | | FairyJade = (int)UIHelper.GetMoneyCnt(2);
|
| | | } |
| | | |
| | | private void LackOfVIP()//VIP 不足
|
| | | {
|
| | | string str = Language.Get("Turntable_2");
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), str, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc4);
|
| | | }
|
| | | });
|
| | |
|
| | | } |
| | | private void LackFairyJade()//仙玉不足
|
| | | {
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GoldErr");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | } |
| | | |
| | | private void RemainingTimes()//剩余次数
|
| | | {
|
| | | int LotteryNumber = vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.BindJadeWheel);
|
| | | if (LotteryNumber > wheelOfFortuneModel.Number)
|
| | | {
|
| | | m_Text_remainingTimes.text =(LotteryNumber - wheelOfFortuneModel.Number).ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Text_remainingTimes.text = 0.ToString();
|
| | | }
|
| | |
|
| | | } |
| | | |
| | | |
| | | private void IncreaseInFrequency()//次数提升
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv >= 10)
|
| | | {
|
| | | m_Text_VIPuP.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Text_VIPuP.gameObject.SetActive(true);
|
| | | }
|
| | | int LotteryNumber = vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.BindJadeWheel);
|
| | | for (int i = 0; i <= 10; i++)
|
| | | {
|
| | | var VipConfig = VipPrivilegeConfig.GetVipPrivilegeData(VipPrivilegeType.BindJadeWheel, i);
|
| | | if (VipConfig != 0 && VipConfig > LotteryNumber)
|
| | | {
|
| | | int type = i;
|
| | | int number = VipConfig - LotteryNumber;
|
| | | m_Text_VIPuP.text = string.Format(Language.Get("Turntable_1"), type, Number(number));
|
| | | return;
|
| | | }
|
| | | }
|
| | | } |
| | | private string Number(int number)
|
| | | {
|
| | | string Str = string.Empty;
|
| | | switch (number)
|
| | | {
|
| | | case 1:
|
| | | Str = Language.Get("Num_CHS_1");
|
| | | return Str;
|
| | | case 2:
|
| | | Str = Language.Get("Num_CHS_2");
|
| | | return Str;
|
| | | case 3:
|
| | | Str = Language.Get("Num_CHS_3");
|
| | | return Str;
|
| | | case 4:
|
| | | Str = Language.Get("Num_CHS_4");
|
| | | return Str;
|
| | | case 5:
|
| | | Str = Language.Get("Num_CHS_5");
|
| | | return Str;
|
| | | case 6:
|
| | | Str = Language.Get("Num_CHS_6");
|
| | | return Str;
|
| | | case 7:
|
| | | Str = Language.Get("Num_CHS_7");
|
| | | return Str;
|
| | | case 8:
|
| | | Str = Language.Get("Num_CHS_8");
|
| | | return Str;
|
| | | case 9:
|
| | | Str = Language.Get("Num_CHS_9");
|
| | | return Str;
|
| | | case 10:
|
| | | Str = Language.Get("Num_CHS_10");
|
| | | return Str;
|
| | | }
|
| | | return Str;
|
| | | } |
| | | |
| | | private void TextGo()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv >= 10)
|
| | | {
|
| | | m_GO.text = Language.Get("Turntable_4");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_GO.text = Language.Get("Turntable_3");
|
| | | }
|
| | | } |
| | | #endregion |
| | |
|
| | | } |
| | |
| | | tables["accid"] = SDKUtility.Instance.FreePlatformInfo.account;
|
| | | tables["sid"] = ServerListCenter.Instance.currentServer.region_flag.ToString();
|
| | | tables["pushurl"] = ServerListCenter.Instance.currentServer.region_domain;
|
| | | tables["spid"] = VersionConfig.Get().SpID;
|
| | | HttpRequest.Instance.RequestHttpGet(StringUtility.Contact(exchangeUrl, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType, 1, null);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | Btn_InSeven.gameObject.SetActive(true);
|
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen(144))
|
| | | {
|
| | | m_TurntableBtn.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TurntableBtn.gameObject.SetActive(false);
|
| | | }
|
| | | CheckOperationOpen();
|
| | |
|
| | |
|
| | |
| | | List<string> closeAllIgnoreWindows = new List<string>() {
|
| | | "MessageWin", "NewBieWin", "NewItemGetWin", "AttributePromoteShowWin" ,"DungeonBeginCoolDownWin","DungeonFightWin","StatusTipWin"
|
| | | ,"ScrollTipWin","MarqueeWin","ExperienceOpenWin","TrumpetWin","BattlePrepareCoolDownWin","DungeonGradeWin","BattleHintWin",
|
| | | "TreasureDungeonMissionHintWin","FairyGrabBossHintWin","DungeonFairyFeastHintWin","PetAndMountPushWin",
|
| | | "TreasureDungeonMissionHintWin","FairyGrabBossHintWin","DungeonFairyFeastHintWin","PetAndMountPushWin","UpgradeWin",
|
| | | };
|
| | |
|
| | | UIRoot m_UIRoot;
|
| | |
| | | case JumpUIType.WelfareFunc2:
|
| | | case JumpUIType.WelfareFunc3:
|
| | | case JumpUIType.WelfareFunc2Type2:
|
| | | case JumpUIType.BindGoldWheel:
|
| | | SetJumpLogic<WelfareWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.SystemSettingFunc1:
|
| | |
| | | break;
|
| | | case JumpUIType.DogzFunc1Type1:
|
| | | case JumpUIType.DogzFunc1Type2:
|
| | | case JumpUIType.DogzFunc2Type1:
|
| | | case JumpUIType.DogzFunc2Type2:
|
| | | SetJumpLogic<DogzWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.FaBaoSoul_BenYuan:
|
| | |
| | | CeremonyOutof = 247, //仙界盛典绝版降临界面
|
| | | DogzFunc1Type1 = 248, //神兽界面
|
| | | DogzFunc1Type2 = 249, //神兽界面
|
| | | DogzFunc2Type1 = 250, //神兽强化界面
|
| | | DogzFunc2Type2 = 251, //神兽强化界面
|
| | | BindGoldWheel = 252, //绑玉转盘界面
|
| | | DhszTs = 1001,//定海神针功法提升界面
|
| | | HyqTs = 1002,//皓月枪功法提升界面
|
| | | GyzTs = 1003,//鬼牙刃功法提升界面
|
| | |
| | | }
|
| | |
|
| | | public bool itemBind { get; private set; }
|
| | | public int itemQuality { get; private set; }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | |
| | |
|
| | | public void SetItem(Item _item)
|
| | | {
|
| | | SetItem(_item.id, _item.count, _item.bind);
|
| | | SetItem(_item.id, _item.count, _item.bind, _item.quality);
|
| | | }
|
| | |
|
| | | public void SetItem(int _id, int _count, bool _bind = false)
|
| | | public void SetItem(int _id, int _count, bool _bind = false, int _quality = 0)
|
| | | {
|
| | | itemId = _id;
|
| | | itemCount = _count;
|
| | | itemBind = _bind;
|
| | | itemQuality = _quality;
|
| | | DisplayBaseInfo();
|
| | | DisplayCount();
|
| | | }
|
| | |
| | | if (backGround != null)
|
| | | {
|
| | | backGround.gameObject.SetActive(true);
|
| | | backGround.SetItemBackGround(itemInfo.ItemColor);
|
| | |
|
| | | backGround.SetItemBackGround(itemQuality != 0 ? itemQuality : itemInfo.ItemColor);
|
| | | }
|
| | |
|
| | | if (m_Stars != null)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (m_Bind!=null)
|
| | | if (m_Bind != null)
|
| | | {
|
| | | m_Bind.gameObject.SetActive(itemBind);
|
| | | }
|
| | |
| | | var animator = model.GetComponent<Animator>();
|
| | | if (animator != null)
|
| | | {
|
| | | var suffix = AnimatorControllerLoader.controllerUISuffix;
|
| | | var animatorController = AnimatorControllerLoader.LoadMobController(suffix, config.MODE);
|
| | | if (animatorController != null)
|
| | | {
|
| | | animator.runtimeAnimatorController = animatorController;
|
| | | }
|
| | |
|
| | | var isDance = false;
|
| | | if (config.NPCType == (int)E_NpcType.Func)
|
| | | {
|
| | | var clipInfos = animator.runtimeAnimatorController.animationClips;
|
| | | foreach (var item in clipInfos)
|
| | | {
|
| | | if (item.name == "Idle2")
|
| | | {
|
| | | isDance = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | animator.enabled = true;
|
| | | animator.SetInteger(GAStaticDefine.Param_Action, GAStaticDefine.Act_Idle);
|
| | | animator.Play(GAStaticDefine.State_IdleHash);
|
| | | if (isDance)
|
| | | {
|
| | | animator.Play(GAStaticDefine.State_Dance);
|
| | | }
|
| | | else
|
| | | {
|
| | | animator.SetInteger(GAStaticDefine.Param_Action, GAStaticDefine.Act_Idle);
|
| | | animator.Play(GAStaticDefine.State_IdleHash);
|
| | | }
|
| | | }
|
| | |
|
| | | LayerUtility.SetLayer(model, LayerUtility.Monster, true);
|
| | |
| | | BossHomeAwardLimit = 27,
|
| | | DemonJarDouble = 28,
|
| | | BindJadeWheel=30,
|
| | | PrayForDrug = 31,
|
| | | }
|
| | |
|
| | |
|
| | |
| | | Def_IudetSuiteLV = 30, //套装等级
|
| | | Def_IudetDogzEquipPlus = 31, // 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | Def_IudetHasOpenCnt = 32, // 物品累积开启次数
|
| | | Def_IudetItemDecompound = 33, //合成物品拆解返还物品列表 [装备ID,材料1ID,个数,是否绑定,材料2ID,个数,是否绑定,...]
|
| | | Def_IudetCreateItemLoginDay = 34, //创建物品时的登录天数
|
| | | Def_IudetLastOpenItemLoginDay = 36, //上一次开启物品时的登录天数
|
| | | Def_IudetRuneLV = 38, // 符印等级
|
| | |
| | | {
|
| | | makeUse, //使用
|
| | | putOn, //穿上
|
| | | dismantle, //拆解合成装备
|
| | | split, //拆分
|
| | | putAway,//上架
|
| | | inlay, //镶嵌
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | int attrValue = _propertyDict[_key];
|
| | | float attrValue = _propertyDict[_key];
|
| | | int fightParm = GetFightPowerParmByAttrId(_key);
|
| | | if(_key == 11)
|
| | | {
|
| | |
| | | attrValue = attrValue * fightParm;
|
| | | }
|
| | | }
|
| | | Equation.Instance.AddKeyValue(cfg.Parameter,attrValue);
|
| | | Equation.Instance.AddKeyValue(cfg.Parameter, attrValue);
|
| | | }
|
| | | }
|
| | |
|