Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | |
|
| | | File.Copy(fromPath, toPath, true);
|
| | | }
|
| | |
|
| | | LocalSave.SetString("BuiltInAssetCopyCompleted_IOS", VersionConfig.Get().version);
|
| | | }
|
| | | }
|
| | |
|
| | | LocalSave.SetString("BuiltInAssetCopyCompleted_IOS", VersionConfig.Get().version);
|
| | | #endif
|
| | |
|
| | | if (!AssetSource.builtInFromEditor)
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, September 17, 2018 |
| | | // [ Date ]: Tuesday, October 30, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public partial class FunctionForecastConfig : ConfigBase { |
| | | |
| | | public int FuncId { get ; private set ; }
|
| | | public string Award { get ; private set; } |
| | | public string FuncName { get ; private set; }
|
| | | public int OpenLevel { get ; private set ; }
|
| | | public string Describe { get ; private set; }
|
| | |
| | | { |
| | | FuncId=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
| | |
|
| | | FuncName = rawContents[1].Trim();
|
| | | Award = rawContents[1].Trim();
|
| | |
|
| | | OpenLevel=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | FuncName = rawContents[2].Trim();
|
| | |
|
| | | Describe = rawContents[3].Trim();
|
| | | OpenLevel=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; |
| | |
|
| | | FuncIconKey = rawContents[4].Trim();
|
| | | Describe = rawContents[4].Trim();
|
| | |
|
| | | DetailDescribe = rawContents[5].Trim();
|
| | | FuncIconKey = rawContents[5].Trim();
|
| | |
|
| | | OpenDescribe = rawContents[6].Trim();
|
| | | DetailDescribe = rawContents[6].Trim();
|
| | |
|
| | | Icon = rawContents[7].Trim();
|
| | | OpenDescribe = rawContents[7].Trim();
|
| | |
|
| | | Content = rawContents[8].Trim();
|
| | | Icon = rawContents[8].Trim();
|
| | |
|
| | | DisplayLevel=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; |
| | | Content = rawContents[9].Trim();
|
| | |
|
| | | Display=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0; |
| | | DisplayLevel=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0; |
| | |
|
| | | RedPointLV=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; |
| | | Display=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; |
| | |
|
| | | RedPointPercentage=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; |
| | | RedPointLV=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; |
| | |
|
| | | FrameLevel=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; |
| | | RedPointPercentage=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; |
| | |
|
| | | OpenNumber=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0; |
| | | FrameLevel=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0; |
| | | |
| | | OpenNumber=IsNumeric(rawContents[15]) ? int.Parse(rawContents[15]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bced258647f0fa940b752dd56e6a27e0 |
| | | timeCreated: 1537175111 |
| | | timeCreated: 1540903620 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public static RoleEquipStarsConfig GetEquipStarsModel(int stars)
|
| | | {
|
| | | RoleEquipStarsConfig item = null;
|
| | | tagEquipStarsModelDict.TryGetValue(stars, out item);
|
| | | List<int> starlist = tagEquipStarsModelDict.Keys.ToList();
|
| | | if(starlist != null)
|
| | | {
|
| | | for (int i = starlist.Count - 1; i > -1; i--)
|
| | | {
|
| | | if(stars >= starlist[i])
|
| | | {
|
| | | tagEquipStarsModelDict.TryGetValue(starlist[i], out item);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | return item;
|
| | | }
|
| | |
|
| | | public static int GetActiveStars(int stars)
|
| | | {
|
| | | int activeStars = 0;
|
| | | List<int> starlist = tagEquipStarsModelDict.Keys.ToList();
|
| | | if (starlist != null)
|
| | | {
|
| | | for (int i = starlist.Count - 1; i > -1; i--)
|
| | | {
|
| | | if (stars >= starlist[i])
|
| | | {
|
| | | activeStars = starlist[i];
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | return activeStars;
|
| | | }
|
| | | #endregion
|
| | | }
|
| | |
|
| | |
| | | worldBossModel.wearyValue = info.KillCnt;
|
| | | worldBossModel.extraBossWearyValue = info.ItemAddCnt;
|
| | | break;
|
| | | case 1:
|
| | | bossHomeModel.wearyValue = info.KillCnt;
|
| | | break;
|
| | | case 2:
|
| | | dogzDungeonModel.wearyValue = info.KillCnt;
|
| | | break;
|
| | |
| | | socialRed.count = 0;
|
| | | }
|
| | | }
|
| | |
|
| | | public RedPointState GetSocialChatRedpoint(ChatInfoType type)
|
| | | {
|
| | | if (chatSocialRedpoints.ContainsKey(type))
|
| | | {
|
| | | return chatSocialRedpoints[type].state;
|
| | | }
|
| | | return RedPointState.None;
|
| | | }
|
| | | #endregion
|
| | | }
|
| | | public struct ChatExtraData
|
| | |
| | | [CreateAssetMenu(menuName = "Config/VersionConfig")]
|
| | | public class VersionConfig : ScriptableObject
|
| | | {
|
| | | public const string VERSION_ALTERNATIVE = "99.99.99";
|
| | | public const string VERSION_ALTERNATIVE = "0.0.0";
|
| | |
|
| | | [SerializeField] public string m_AppId = string.Empty;
|
| | | public string appId { get { return m_AppId; } }
|
| | |
| | | {
|
| | | case 11:
|
| | | return Math.Max(dailyQuestOpenTime.DayTimes, GetDailyQuestCompletedTimes(_dailyQuestId));
|
| | | case 16:
|
| | | return ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.BossHomeAwardLimit);
|
| | | default:
|
| | | return dailyQuestOpenTime.DayReKind > 0 ? dailyQuestOpenTime.DayTimes : dailyQuestOpenTime.WeekTimes;
|
| | | }
|
| | |
| | | {
|
| | | switch ((DailyQuestType)_dailyQuestId)
|
| | | {
|
| | | case DailyQuestType.BossHome:
|
| | | return ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.BossHomeAwardLimit) > 0;
|
| | | case DailyQuestType.PersonalBoss:
|
| | | return ModelCenter.Instance.GetModel<DungeonModel>().GetTotalTimes(PersonalBossModel.PERSONALBOSS_MAPID) > 0;
|
| | | default:
|
| | |
| | |
|
| | | m_CoinInspire.gameObject.SetActive(coinInspireConfig != null);
|
| | |
|
| | | coinInspire = coinInspireConfig == null ? false : true;
|
| | | coinInspire = IsCoinInspireLimit() ? false : true;
|
| | | fairyInspire = !coinInspire;
|
| | |
|
| | | Display();
|
| | |
| | | CloseImmediately();
|
| | | return;
|
| | | }
|
| | |
|
| | | if (IsCoinInspireLimit() && coinInspire)
|
| | | {
|
| | | coinInspire = false;
|
| | | fairyInspire = !coinInspire;
|
| | | }
|
| | |
|
| | | DisplayCost();
|
| | | UpdateInspireType();
|
| | | }
|
| | |
|
| | | private void CoinInspire()
|
| | | {
|
| | | if (!coinInspire)
|
| | | if (!coinInspire && IsCoinInspireLimit())
|
| | | {
|
| | | if (model.GetDungeonInspireLevel(3) >= coinInspireConfig.InspireCount)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("Xjmj_CopperInspireFull");
|
| | | return;
|
| | | }
|
| | | coinInspire = true;
|
| | | fairyInspire = false;
|
| | | SysNotifyMgr.Instance.ShowTip("Xjmj_CopperInspireFull");
|
| | | return;
|
| | | }
|
| | | else
|
| | | {
|
| | | coinInspire = false;
|
| | | }
|
| | | coinInspire = true;
|
| | | fairyInspire = !coinInspire;
|
| | | UpdateInspireType();
|
| | | }
|
| | |
|
| | | private void FairyInspire()
|
| | | {
|
| | | if (coinInspireConfig == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | fairyInspire = true;
|
| | | coinInspire = false;
|
| | | fairyInspire = !fairyInspire;
|
| | | UpdateInspireType();
|
| | | }
|
| | |
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | bool IsCoinInspireLimit()
|
| | | {
|
| | | if (coinInspireConfig != null)
|
| | | {
|
| | | return model.GetDungeonInspireLevel(3) >= coinInspireConfig.InspireCount;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | private void UpdateInspireType()
|
| | | {
|
| | | var level = model.GetDungeonInspireLevel();
|
| | | m_InspireLevel.text = level == 0 ? Language.Get("FairyLand_Func4")
|
| | | : Language.Get("HaveInspired", StringUtility.Contact("<color=#109d06>", |
| | | : Language.Get("HaveInspired", StringUtility.Contact("<color=#109d06>",
|
| | | level * model.GetDungeonInspireUpper(PlayerDatas.Instance.baseData.MapID), "%</color>"));
|
| | | m_CoinInspireCheck.gameObject.SetActive(coinInspire);
|
| | | m_FairyInspireCheck.gameObject.SetActive(fairyInspire);
|
| | |
| | | {
|
| | | [SerializeField] Button m_CallMember;
|
| | | [SerializeField] Text m_Timer;
|
| | | [SerializeField] UIEffect m_Effect;
|
| | | [SerializeField] RotationTween m_Tween;
|
| | |
|
| | | long lastTick = 0;
|
| | |
|
| | |
| | | GlobalTimeEvent.Instance.secondEvent += DisplayTimer;
|
| | | Display();
|
| | | DisplayTimer();
|
| | | DisplayEffect();
|
| | | }
|
| | |
|
| | | public void UnInit()
|
| | |
| | | void Display()
|
| | | {
|
| | | m_CallMember.gameObject.SetActive(CheckCallMember());
|
| | | DisplayEffect();
|
| | | }
|
| | |
|
| | | bool CheckCallMember()
|
| | |
| | | if (seconds <= 0 && m_Timer.gameObject.activeSelf)
|
| | | {
|
| | | m_Timer.gameObject.SetActive(false);
|
| | | DisplayEffect();
|
| | | }
|
| | | else if (seconds > 0)
|
| | | {
|
| | | if (!m_Timer.gameObject.activeSelf)
|
| | | {
|
| | | m_Timer.gameObject.SetActive(true);
|
| | | DisplayEffect();
|
| | | }
|
| | | m_Timer.text = StringUtility.Contact(seconds, Language.Get("RealmWin_Bewrite_35"));
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayEffect()
|
| | | {
|
| | | var ticks = DateTime.Now.Ticks - lastTick;
|
| | | var ts = new TimeSpan(ticks < 0 ? 0 : ticks);
|
| | | var seconds = (int)(model.callMemberSeconds - ts.TotalSeconds);
|
| | | if (seconds > 0 || !m_CallMember.gameObject.activeInHierarchy)
|
| | | {
|
| | | if (m_Effect.IsPlaying)
|
| | | {
|
| | | m_Effect.StopImediatly();
|
| | | }
|
| | | if (m_Tween.enabled)
|
| | | {
|
| | | m_Tween.enabled = false;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!m_Effect.IsPlaying)
|
| | | {
|
| | | m_Effect.Play();
|
| | | }
|
| | | if (!m_Tween.enabled)
|
| | | {
|
| | | m_Tween.enabled = true;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | |
| | | #endregion
|
| | | private bool OnGetDynamicSize(ScrollerDataType type, int index, out float height)
|
| | | {
|
| | | if (fairyLeagueModel.fairyLeagueGroupId == 5 && index == fairyLeagueModel.GetBattleFirstPlayer())
|
| | | if (fairyLeagueModel.fairyLeagueGroupId == 5 &&
|
| | | (index == fairyLeagueModel.GetBattleWinFirstPlayer()
|
| | | || index == fairyLeagueModel.GetBattleDefeatFirstPlayer()))
|
| | | {
|
| | | height = m_FirstRankCellSize;
|
| | | }
|
| | |
| | | /// <summary>
|
| | | /// key----世界等级
|
| | | /// </summary>
|
| | | public Dictionary<int, List<AwardItem>> finalWarAwardDict = new Dictionary<int, List<AwardItem>>();
|
| | | public Dictionary<int, List<AwardItem>> finalWarChampionAwardDict = new Dictionary<int, List<AwardItem>>();
|
| | | public Dictionary<int, List<AwardItem>> finalWarWinAwardDict = new Dictionary<int, List<AwardItem>>();
|
| | | public Dictionary<int, List<AwardItem>> finalWarChampionWinAwardDict = new Dictionary<int, List<AwardItem>>();
|
| | | public Dictionary<int, List<AwardItem>> finalWarDefeatAwardDict = new Dictionary<int, List<AwardItem>>();
|
| | | public Dictionary<int, List<AwardItem>> finalWarChampionDefeatAwardDict = new Dictionary<int, List<AwardItem>>();
|
| | | private Dictionary<int, float> crystalRateDict = new Dictionary<int, float>();
|
| | | readonly List<int> fairyLeagueStateValues = new List<int>() { 11, 12, 13, 21, 22, 23 };
|
| | | FairyLeagueWeekTime fairyLeagueWeekTime = new FairyLeagueWeekTime();
|
| | |
| | | {
|
| | | var _worldLv = int.Parse(match.Groups[1].Value);
|
| | | List<AwardItem> _list = ParseAward(StringUtility.Contact('[', match.Groups[2].Value, ']'));
|
| | | finalWarAwardDict.Add(_worldLv, _list);
|
| | | finalWarWinAwardDict.Add(_worldLv, _list);
|
| | | }
|
| | | }
|
| | | if (_regex.IsMatch(cfg.Numerical2))
|
| | | {
|
| | | foreach (Match match in _regex.Matches(cfg.Numerical2))
|
| | | {
|
| | | var _worldLv = int.Parse(match.Groups[1].Value);
|
| | | List<AwardItem> _list = ParseAward(StringUtility.Contact('[', match.Groups[2].Value, ']'));
|
| | | finalWarDefeatAwardDict.Add(_worldLv, _list);
|
| | | }
|
| | | }
|
| | | cfg = Config.Instance.Get<FuncConfigConfig>("FamilyMatchSRankOneReward");
|
| | |
| | | {
|
| | | var _worldLv = int.Parse(match.Groups[1].Value);
|
| | | List<AwardItem> _list = ParseAward(StringUtility.Contact('[', match.Groups[2].Value, ']'));
|
| | | finalWarChampionAwardDict.Add(_worldLv, _list);
|
| | | finalWarChampionWinAwardDict.Add(_worldLv, _list);
|
| | | }
|
| | | }
|
| | | if (_regex.IsMatch(cfg.Numerical2))
|
| | | {
|
| | | foreach (Match match in _regex.Matches(cfg.Numerical2))
|
| | | {
|
| | | var _worldLv = int.Parse(match.Groups[1].Value);
|
| | | List<AwardItem> _list = ParseAward(StringUtility.Contact('[', match.Groups[2].Value, ']'));
|
| | | finalWarChampionDefeatAwardDict.Add(_worldLv, _list);
|
| | | }
|
| | | }
|
| | | cfg = Config.Instance.Get<FuncConfigConfig>("FamilyMatchPersonalScore");
|
| | |
| | | return _camp == FairyCampType.Blue ? "FlagBlue" : "FlagRed";
|
| | | }
|
| | |
|
| | | public int GetBattleFirstPlayer()
|
| | | public int GetBattleWinFirstPlayer()
|
| | | {
|
| | | if (fairyLeagueResults.Count == 0)
|
| | | {
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetBattleDefeatFirstPlayer()
|
| | | {
|
| | | if (fairyLeagueResults.Count == 0)
|
| | | {
|
| | | return -1;
|
| | | }
|
| | | for (int i = 0; i < fairyLeagueResults.Count; i++)
|
| | | {
|
| | | if (!fairyLeagueResults[i].IsWin)
|
| | | {
|
| | | return i;
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | #region 前16名仙盟列表
|
| | | List<PlayerFairyData.FairyData> frontFairyList = new List<PlayerFairyData.FairyData>();
|
| | | public event Action frontFairyUpdate;
|
| | |
| | | m_RankTxt.gameObject.SetActive(_index > 2);
|
| | | m_RankImg.gameObject.SetActive(_index < 3);
|
| | | m_RankBG.SetSprite(_index % 2 == 0 ? "RankList_SingleBottom" : "RankList_QuanTouMing");
|
| | | m_FirstRankSign.gameObject.SetActive(_index == model.GetBattleFirstPlayer());
|
| | | if (_index < 3)
|
| | | {
|
| | | m_RankImg.SetSprite(_index == 0 ? "Rank_First" : _index == 1 ? "Rank_Second" : "Rank_Third");
|
| | |
| | | var _count = (int)Mathf.Max(_item.count * (_item.isPer == 1 ? ((float)_per / 100) : 1), 1);
|
| | | m_IntegralAward.Init(_item.id, _count, _item.bind);
|
| | | m_IntegralAward.itemCnt.text = StringUtility.Contact("X", _count);
|
| | | m_ContainChampion.gameObject.SetActive(model.fairyLeagueGroupId == 5 && _index == model.GetBattleFirstPlayer());
|
| | | m_ChampionAwardBtn.onClick.RemoveAllListeners();
|
| | | if (model.fairyLeagueGroupId == 5 && _index == model.GetBattleFirstPlayer())
|
| | | bool winChampion = _index == model.GetBattleWinFirstPlayer();
|
| | | bool defeatChampion = _index == model.GetBattleDefeatFirstPlayer();
|
| | | m_FirstRankSign.gameObject.SetActive(winChampion || defeatChampion);
|
| | | if (winChampion || defeatChampion)
|
| | | {
|
| | | var _dict = (model.fairyLeagueSession == 1 && model.fairyLeagueHelp.fairyWarEnter.IsFinalMatch == 1) ?
|
| | | model.finalWarChampionAwardDict : model.finalWarAwardDict;
|
| | | if (_dict != null)
|
| | | m_FirstRankSign.SetSprite(winChampion ? "UnionMatchNo1" : "UnionMatchNo2");
|
| | | m_FirstRankSign.SetNativeSize();
|
| | | }
|
| | | m_ContainChampion.gameObject.SetActive(model.fairyLeagueGroupId == 5 && (winChampion || defeatChampion));
|
| | | m_ChampionAwardBtn.onClick.RemoveAllListeners();
|
| | | if (model.fairyLeagueGroupId == 5 && (winChampion || defeatChampion))
|
| | | {
|
| | | Dictionary<int, List<AwardItem>> _dict = null;
|
| | | if (winChampion)
|
| | | {
|
| | | _dict = (model.fairyLeagueSession == 1 && model.fairyLeagueHelp.fairyWarEnter.IsFinalMatch == 1) ?
|
| | | model.finalWarChampionWinAwardDict : model.finalWarWinAwardDict;
|
| | | }
|
| | | else
|
| | | {
|
| | | _dict = (model.fairyLeagueSession == 1 && model.fairyLeagueHelp.fairyWarEnter.IsFinalMatch == 1) ?
|
| | | model.finalWarChampionDefeatAwardDict : model.finalWarDefeatAwardDict;
|
| | | }
|
| | | if (_dict != null && _dict.Count > 0)
|
| | | {
|
| | | _rankKey = UIHelper.GetIntervalAward(_dict.Keys, (int)PlayerDatas.Instance.worldLv);
|
| | | var _Award = _dict[_rankKey][0];
|
| | |
| | | public class BossHomeModel : Model, IMapInitOk
|
| | | {
|
| | | public const int BOSSHOME_MAPID = 31020;
|
| | | public const int BOSSHOME_REDPOINT = 76002;
|
| | |
|
| | | int m_SelectedFloor = 0;
|
| | | public int selectedFloor {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | int m_WearyValue = 0;
|
| | | public int wearyValue {
|
| | | get { return m_WearyValue; }
|
| | | set {
|
| | | m_WearyValue = value;
|
| | | UpdateRedpoint();
|
| | | if (bossWearyValueChangeEvent != null)
|
| | | {
|
| | | bossWearyValueChangeEvent();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public event Action<int> bossHomeFloorSelectedEvent;
|
| | | public event Action<int> bossSelectedEvent;
|
| | | public event Action bossWearyValueChangeEvent;
|
| | |
|
| | | public Redpoint bossHomeRedpoint = new Redpoint(FindPreciousModel.FINDPRECIOUS_REDPOINTID, BOSSHOME_REDPOINT);
|
| | | Dictionary<int, BossHomeData> bossHomes = new Dictionary<int, BossHomeData>();
|
| | | Dictionary<int, int> vipLackFloorCost = new Dictionary<int, int>();
|
| | | List<int> sortedBosses = new List<int>();
|
| | |
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | | PlayerDatas.Instance.PlayerDataRefreshEvent += OnPlayerDataChange;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshEvent -= OnPlayerDataChange;
|
| | | }
|
| | |
|
| | | public bool TryGetBossHomeData(int _layer, out BossHomeData _data)
|
| | |
| | | {
|
| | | return 0;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnPlayerDataChange(PlayerDataRefresh _type, int _value)
|
| | | {
|
| | | if (_type == PlayerDataRefresh.VIPLv)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void UpdateRedpoint()
|
| | | {
|
| | | var count = vipModel.GetVipPrivilegeCnt(VipPrivilegeType.BossHomeAwardLimit) - m_WearyValue;
|
| | | bossHomeRedpoint.count = count;
|
| | | bossHomeRedpoint.state = count > 0 ? RedPointState.Quantity : RedPointState.None;
|
| | | }
|
| | |
|
| | | private void ParseConfig()
|
| | |
| | | [SerializeField] Button m_KillRecord;
|
| | | [SerializeField] Transform m_SurpassLevel;
|
| | | [SerializeField] ToggleButton m_Subscribe;
|
| | | [SerializeField] TextEx m_WearyValue;
|
| | |
|
| | | BossHomeModel model { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
|
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | |
| | | model.selectedFloor = model.GetRecommendFloor();
|
| | | m_FloorGroup.Init();
|
| | | m_Vip.text = StringUtility.Contact("V", model.GetFloorVipRequirement(model.selectedFloor));
|
| | |
|
| | | var wearyValueLimit = vipModel.GetVipPrivilegeCnt(VipPrivilegeType.BossHomeAwardLimit);
|
| | | m_WearyValue.text = StringUtility.Contact(model.wearyValue, "/", wearyValueLimit);
|
| | | m_WearyValue.colorType = model.wearyValue >= wearyValueLimit ? TextColType.Red : TextColType.DarkGreen;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | private void UpdateRedpoint(int _redpointId)
|
| | | {
|
| | | if (_redpointId == WorldBossModel.WORLDBOSS_REDPOINT ||
|
| | | _redpointId == BossHomeModel.BOSSHOME_REDPOINT ||
|
| | | _redpointId == PersonalBossModel.PERSONAL_REDPOINTID)
|
| | | {
|
| | | var worldBossRedpointCount = worldBossModel.worldBossRedPoint.count;
|
| | | var bossHomeRedpointCount = bossHomeModel.bossHomeRedpoint.count;
|
| | | var personalBossRedpointCount = personalBossModel.personalRedpoint.count;
|
| | | var totalCount = worldBossRedpointCount + bossHomeRedpointCount + personalBossRedpointCount;
|
| | | var totalCount = worldBossRedpointCount + personalBossRedpointCount;
|
| | | findPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
|
| | | findPreciousRedpoint.count = totalCount;
|
| | | }
|
| New file |
| | |
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class SocialModel : Model,IBeforePlayerDataInitialize,IPlayerLoginOk
|
| | | {
|
| | | FriendsModel friendsModel { get { return ModelCenter.Instance.GetModel<FriendsModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | selectType = SocialType.Union;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | |
| | | }
|
| | | public SocialType selectType { get; private set;}
|
| | | public void SetDefaultSelectTitle()
|
| | | {
|
| | | if(friendsModel.redpointSocial.state != RedPointState.None)
|
| | | {
|
| | | selectType = SocialType.XianYuan;
|
| | | }
|
| | | else if(ChatCtrl.Inst.GetSocialChatRedpoint(ChatInfoType.Team) != RedPointState.None)
|
| | | {
|
| | | selectType = SocialType.Team;
|
| | | }
|
| | | else if (ChatCtrl.Inst.GetSocialChatRedpoint(ChatInfoType.Fairy) != RedPointState.None)
|
| | | {
|
| | | selectType = SocialType.Union;
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateSelectTitle(SocialType type)
|
| | | {
|
| | | selectType = type;
|
| | | }
|
| | | //与functionOrder对应
|
| | | public enum SocialType
|
| | | {
|
| | | Union = 0, //仙盟
|
| | | XianYuan = 1, //仙缘
|
| | | Team = 2, //队伍
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: dc71c46225ba0ad48bb31bc4b4fee117 |
| | | timeCreated: 1540881971 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | [SerializeField] GameObject friendTipsObj;
|
| | | [SerializeField] ChatSendComponent m_ChatSend;
|
| | |
|
| | | SocialModel socialModel { get { return ModelCenter.Instance.GetModel<SocialModel>(); } }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | socialModel.SetDefaultSelectTitle();
|
| | | m_ChatSend.parent = this;
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | if(!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | functionOrder = (int)socialModel.selectType;
|
| | | }
|
| | | btnGroup.TriggerByOrder(functionOrder);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void ClickXianYuanBtn()
|
| | | {
|
| | | socialModel.UpdateSelectTitle(SocialModel.SocialType.XianYuan);
|
| | | CloseChild();
|
| | | friendTipsObj.SetActive(true);
|
| | | functionOrder = xianyuanBtn.order;
|
| | |
| | |
|
| | | private void TeamChat()
|
| | | {
|
| | | socialModel.UpdateSelectTitle(SocialModel.SocialType.Team);
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<TeamChatWin>();
|
| | | functionOrder = m_TeamChat.order;
|
| | |
| | |
|
| | | private void FairyChat()
|
| | | {
|
| | | socialModel.UpdateSelectTitle(SocialModel.SocialType.Union);
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<FairyChatWin>();
|
| | | functionOrder = m_FairyChat.order;
|
| | |
| | | {
|
| | | int type = info.ActiveInfo[i].Type;
|
| | | int cnt = (int)info.ActiveInfo[i].Cnt;
|
| | | if(type == 1)
|
| | | {
|
| | | cnt = RoleEquipStarsConfig.GetActiveStars(cnt);
|
| | | }
|
| | | if(!equipAttrActiveDict.ContainsKey(type))
|
| | | {
|
| | | equipAttrActiveDict.Add(type,cnt);
|
| | |
| | |
|
| | | curSumStarText.text = Language.Get("KnapS124").Replace("{0}", _curStarsCount.ToString());
|
| | | int activeCnt = GetActiveStarsAttr();
|
| | | int serverActiveCnt = playerPack.GetActiveCntByType(1);
|
| | | StringBuilder attrStr = new StringBuilder();
|
| | | if (activeStarsConfig != null)
|
| | | {
|
| | |
| | | }
|
| | | nextAttrText.text = attrStr.ToString();
|
| | | nextEffectText.text = Language.Get("BagWin_NextText_1",Language.Get("KnapS144"));
|
| | | if (activeCnt < serverActiveCnt)
|
| | | if (_curStarsCount >= nextActiveStarsConfig.countNeed)
|
| | | {
|
| | | RefreshActiveBtnUI(false);
|
| | | nextEffectText.text = Language.Get("BagWin_NextText_1", Language.Get("KnapS143"));
|
| | | nextActiveCnt = nextActiveStarsConfig.countNeed;
|
| | | RefreshActiveBtnUI(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (_curStarsCount >= nextActiveStarsConfig.countNeed)
|
| | | {
|
| | | nextActiveCnt = nextActiveStarsConfig.countNeed;
|
| | | RefreshActiveBtnUI(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | RefreshActiveBtnUI(false);
|
| | | |
| | | }
|
| | | RefreshActiveBtnUI(false);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | {
|
| | | activeStarsConfig = null;
|
| | | nextActiveStarsConfig = null;
|
| | | int cnt = playerPack.GetActiveCntByType(1);
|
| | | int activeCnt = playerPack.GetActiveCntByType(1);
|
| | | List<int> starslist = RoleEquipStarsConfig.GetEquipStarsCntlist();
|
| | | int activeCnt = cnt;
|
| | | if (starslist == null || starslist.Count < 1) return activeCnt;
|
| | |
|
| | |
|
| | | if (cnt > _curStarsCount)
|
| | | {
|
| | | for (int i = starslist.Count - 1; i > -1; i--)
|
| | | {
|
| | | if(i== 0 && starslist[i] > _curStarsCount)
|
| | | {
|
| | | activeCnt = 0;
|
| | | break;
|
| | | }
|
| | | if (starslist[i] <= _curStarsCount)
|
| | | {
|
| | | activeCnt = starslist[i];
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (activeCnt < starslist[0])
|
| | | if (_curStarsCount < starslist[0])
|
| | | {
|
| | | activeStarsConfig = null;
|
| | | nextActiveStarsConfig = RoleEquipStarsConfig.GetEquipStarsModel(starslist[0]);
|
| | |
| | | int nextActiveStars = 0;
|
| | | for (int i = 0; i < starslist.Count; i++)
|
| | | {
|
| | | if(starslist[i] == activeCnt)
|
| | | if(starslist[i] > activeCnt)
|
| | | {
|
| | | if(i < starslist.Count - 1)
|
| | | {
|
| | | nextActiveStars = starslist[i + 1];
|
| | | }
|
| | | nextActiveStars = starslist[i];
|
| | | break;
|
| | | }
|
| | | }
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, October 30, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | using EnhancedUI.EnhancedScroller; |
| | | |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class FeatureNotice2Win : Window |
| | | {
|
| | |
|
| | | [SerializeField] ScrollerController m_ScrollerController; |
| | | [SerializeField] Button m_CloseButton; |
| | | [SerializeField] FeatureNoticeTip m_FeatureNoticeTip; |
| | | [SerializeField] ScaleTween m_ScaleTween;
|
| | | FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
|
| | | private bool IsJump = false; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | {
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_CloseButton.AddListener(OnClickBtn); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | UnopenedFirst();
|
| | | m_ScaleTween.SetStartState();
|
| | | IsJump = WindowJumpMgr.Instance.IsJumpState;
|
| | | m_FeatureNoticeTip.Init();
|
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | {
|
| | | if (!IsJump)//是否经历跳转打开
|
| | | {
|
| | | m_ScaleTween.Play(false, IsOpen);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ScaleTween.SetEndState();
|
| | | } |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | |
|
| | | private void OnClickBtn()
|
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)//是否经历跳
|
| | | {
|
| | | m_FeatureNoticeTip.FeatureNoticeTipObj.SetActive(true);
|
| | | m_ScaleTween.Play(true, IsClose);
|
| | | }
|
| | | else
|
| | | {
|
| | | Close();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < featureNoticeModel.FunctionList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, featureNoticeModel.FunctionList[i].FuncId);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int funcId = cell.index;
|
| | | Transform Tran = cell.transform;
|
| | | GameObject Tran1 = Tran.Find("FeaturesTypeOne").gameObject;
|
| | | GameObject Tran2 = Tran.Find("FeaturesTypeTwo").gameObject;
|
| | | if (funcId == featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | |
| | | Tran1.SetActive(false);
|
| | | Tran2.SetActive(true);
|
| | | FeaturesType3 featuresType3 = Tran2.GetComponent<FeaturesType3>();
|
| | | featuresType3.GetTheFeatureID(funcId);
|
| | | return;
|
| | | }
|
| | | else
|
| | | {
|
| | | Tran1.SetActive(true);
|
| | | Tran2.SetActive(false);
|
| | | FeaturesType3 featuresType3 = Tran1.GetComponent<FeaturesType3>();
|
| | | featuresType3.GetTheFeatureID(funcId);
|
| | | return;
|
| | | }
|
| | |
|
| | | }
|
| | | private void IsOpen()
|
| | | {
|
| | | m_FeatureNoticeTip.FeatureNoticeTipObj.SetActive(false);
|
| | | }
|
| | | private void IsClose()
|
| | | {
|
| | | Close();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | |
|
| | | private void UnopenedFirst()
|
| | | {
|
| | | var configs = Config.Instance.GetAllValues<FunctionForecastConfig>();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | int openTag = config.FuncId;
|
| | | if (!FuncOpen.Instance.IsFuncOpen(openTag))
|
| | | {
|
| | | featureNoticeModel.FunctionForecastIndex = config.OpenNumber;
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion |
| | |
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b0f88c388c36a6942b7d00ae54cbfd11 |
| | | timeCreated: 1540882386 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | public class FeatureNoticeModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>();
|
| | | public Dictionary<int, ImpactRankModel.RankAwardItem> DicAwardItem = new Dictionary<int, ImpactRankModel.RankAwardItem>();//奖励物品
|
| | | private const int Redpoint_key1 = 38;
|
| | | public Redpoint redPointStre1 = new Redpoint(Redpoint_key1);
|
| | | private int OpenFuncId = 0;
|
| | |
| | | public override void Init()
|
| | | {
|
| | | AddList();
|
| | | AddAwardItem();
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void AddAwardItem()
|
| | | {
|
| | | if (DicAwardItem.Count <= 0)
|
| | | {
|
| | | var configs = Config.Instance.GetAllKeys<FunctionForecastConfig>();
|
| | | foreach (var key in configs)
|
| | | {
|
| | | var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(key);
|
| | | if (!DicAwardItem.ContainsKey(functionForecastConfig.FuncId) && functionForecastConfig.Display==1)
|
| | | {
|
| | | ImpactRankModel.RankAwardItem _award = new ImpactRankModel.RankAwardItem();
|
| | | if (functionForecastConfig.Award == string.Empty)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var _jsonData = LitJson.JsonMapper.ToObject(functionForecastConfig.Award);
|
| | | foreach (string _key in _jsonData.Keys)
|
| | | {
|
| | | var _job = int.Parse(key);
|
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[_key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | _award.Add(_job, new AwardItem()
|
| | | {
|
| | | item = new Item(_itemArray[j][0], _itemArray[j][1]),
|
| | | isBind = 1,
|
| | | });
|
| | | }
|
| | | }
|
| | | DicAwardItem.Add(functionForecastConfig.FuncId, _award);
|
| | | }
|
| | | }
|
| | | // DebugEx.LogError(DicAwardItem);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void RedDotStatus()
|
| | | {
|
| | | for (int i = 0; i < FunctionList.Count; i++)
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, October 30, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI { |
| | | //功能预告第三部 |
| | | |
| | | public class FeaturesType3:MonoBehaviour { |
| | | [SerializeField] ImageEx m_Image_Selected;//底板 |
| | | [SerializeField] ImageEx m_Img_Circle;//Icon框 |
| | | [SerializeField] ImageEx m_FeaturesTypeIcon;//Icon |
| | | [SerializeField] Text m_FunctionName;//功能名 |
| | | [SerializeField] Text m_FunctionalLevel;//功能等级 |
| | | [SerializeField] Text m_Content;//内容
|
| | | FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } } |
| | | public void GetTheFeatureID(int funcId)
|
| | | {
|
| | | var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcId);
|
| | | if (functionForecastConfig == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString() + Language.Get("Z1041");
|
| | | bool Type = false;
|
| | | int NeedLv = 0;
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | Type = true;
|
| | | NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen(funcId) && Type && NeedLv > playerLv)
|
| | | {
|
| | | m_FunctionName.text = "?";
|
| | | m_FeaturesTypeIcon.SetSprite("UnKnowIcon");
|
| | | m_Content.text= string.Format(Language.Get("YGFuncLevel"), NeedLv, PlayerDatas.Instance.baseData.LV, NeedLv);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_FunctionName.text = functionForecastConfig.FuncName;
|
| | | m_FeaturesTypeIcon.SetSprite(functionForecastConfig.FuncIconKey);
|
| | | m_Content.text = functionForecastConfig.Content;
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.LV >= functionForecastConfig.DisplayLevel)
|
| | | {
|
| | | m_FunctionalLevel.color = new Color32(141, 220, 17, 255);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_FunctionalLevel.color = new Color32(255, 244, 205, 255);
|
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen(funcId))
|
| | | {
|
| | | m_Image_Selected.gray = false;
|
| | | m_Img_Circle.gray = false;
|
| | | m_FeaturesTypeIcon.gray = false;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Image_Selected.gray = true;
|
| | | m_Img_Circle.gray = true;
|
| | | m_FeaturesTypeIcon.gray = true;
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 724340e684b4c0a469bfb9b4a362747a |
| | | timeCreated: 1540887239 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | case UseEnvironment.Task:
|
| | | m_ContentText.ExcuteHref(1);
|
| | | break;
|
| | | case UseEnvironment.FairyGrabBoss:
|
| | | case UseEnvironment.LocalMap:
|
| | | if (confirmCallBack != null)
|
| | | {
|
| | |
| | | {
|
| | | Task,
|
| | | LocalMap,
|
| | | FairyGrabBoss,
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | void FunctionIconBtn()//面板开启
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<FeatureNoticeWin>();
|
| | | WindowCenter.Instance.Open<FeatureNotice2Win>();
|
| | | // WindowCenter.Instance.Open<ZXWTestWin>();
|
| | | }
|
| | | }
|
| | |
| | | show = !GeneralDefine.worldBossNoRebornRemindMaps.Contains(mapId);
|
| | | break;
|
| | | case FindPreciousType.BossHome:
|
| | | killable = bossHomeModel.wearyValue < vipModel.GetVipPrivilegeCnt(VipPrivilegeType.BossHomeAwardLimit);
|
| | | killable = true;
|
| | | show = !GeneralDefine.bossHomeNoRebornRemindMaps.Contains(mapId);
|
| | | break;
|
| | | case FindPreciousType.ElderGodArea:
|
| | |
| | | [SerializeField] Button m_SendRedbagBtn;
|
| | | [SerializeField] Button WishingAwardImg;
|
| | | [SerializeField] Button m_GotoFairyGrabBoss;
|
| | | [SerializeField] Button m_FlyToFairyGrabBoss;
|
| | |
|
| | | [SerializeField] Transform m_EffectTask;//任务完成特效播放位置
|
| | | private int m_CollectNPCID;
|
| | |
| | | m_SendRedbagBtn.AddListener(SendRedpacketBtn);
|
| | | WishingAwardImg.AddListener(ClickWishAward);
|
| | | m_GotoFairyGrabBoss.AddListener(GotoFairyGrabBoss);
|
| | | m_FlyToFairyGrabBoss.AddListener(FlyToFairyGrabBoss);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void FlyToFairyGrabBoss()
|
| | | {
|
| | | if (fairyGrabBossModel.cacheGotoBossId != 0)
|
| | | {
|
| | | var error = 0;
|
| | | if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
|
| | | {
|
| | | var bossInfoConfig = Config.Instance.Get<BossInfoConfig>(fairyGrabBossModel.cacheGotoBossId);
|
| | | var flyItemCount = ModelCenter.Instance.GetModel<PlayerPackModel>().GetItemCountByID(PackType.rptItem, GeneralDefine.flyBootItemId);
|
| | | var freeFly = ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.FreeTransfer) > 0;
|
| | | if (bossInfoConfig != null)
|
| | | {
|
| | | if (freeFly || flyItemCount > 0)
|
| | | {
|
| | | MapTransferUtility.Instance.MissionFlyTo(bossInfoConfig.MapID, fairyGrabBossModel.cacheGotoBossId);
|
| | | }
|
| | | else
|
| | | {
|
| | | FlyShoseConfirmwin.useEnvironment = FlyShoseConfirmwin.UseEnvironment.FairyGrabBoss;
|
| | | FlyShoseConfirmwin.confirmCallBack = FlyShoesUseCallback;
|
| | | WindowCenter.Instance.Open<FlyShoseConfirmwin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | fairyGrabBossModel.DisplayErrorTip(error);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void FlyShoesUseCallback()
|
| | | {
|
| | | switch (FlyShoseConfirmwin.useEnvironment)
|
| | | {
|
| | | case FlyShoseConfirmwin.UseEnvironment.FairyGrabBoss:
|
| | | if (fairyGrabBossModel.cacheGotoBossId != 0)
|
| | | {
|
| | | var error = 0;
|
| | | if (fairyGrabBossModel.TestEnterDungeon(fairyGrabBossModel.cacheGotoBossId, out error))
|
| | | {
|
| | | var bossInfoConfig = Config.Instance.Get<BossInfoConfig>(fairyGrabBossModel.cacheGotoBossId);
|
| | | if (bossInfoConfig != null)
|
| | | {
|
| | | MapTransferUtility.Instance.MissionFlyTo(bossInfoConfig.MapID, fairyGrabBossModel.cacheGotoBossId);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | fairyGrabBossModel.DisplayErrorTip(error);
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | [SerializeField] List<WishItemCell> wishingCells = new List<WishItemCell>();
|
| | | [SerializeField] GameObject activityOpenObj;
|
| | | [SerializeField] GameObject activityCloseObj;
|
| | | [SerializeField] GameObject maskObj;
|
| | | [Header("动画控制")]
|
| | | [SerializeField] RectTransform handImg;
|
| | | [SerializeField] CanvasGroup handAlpha;
|
| | |
| | | handAlpha.DOKill();
|
| | | handImg.DOKill();
|
| | | wishingModel.isClick = true;
|
| | | maskObj.SetActive(false);
|
| | | }
|
| | |
|
| | | private void UpdateHandMove()
|
| | |
| | |
|
| | | private void PlayHandMovePos()
|
| | | {
|
| | | maskObj.SetActive(true);
|
| | | playTimes = 0;
|
| | | handAlpha.DORestart();
|
| | | handImg.DORestart();
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | maskObj.SetActive(false);
|
| | | handImg.gameObject.SetActive(false);
|
| | | wishingModel.isClick = true;
|
| | | }
|
| | |
| | | public event Action OnAutoUseXpEvent;
|
| | | public bool AutoUseXp()
|
| | | {
|
| | | return QuickSetting.Instance.GetQuickSettingBool(QuickSetting.QuickSettingType.AutoUseXp, 0, false);
|
| | | return QuickSetting.Instance.GetQuickSettingBool(QuickSetting.QuickSettingType.AutoUseXp, 0, true);
|
| | | }
|
| | |
|
| | | public void SetAutoUseXp(bool _auto)
|
| | |
| | | switch (m_Treasure.id)
|
| | | {
|
| | | case 104:
|
| | | SnxxzGame.Instance.StartCoroutine(Co_SkillGuide());
|
| | | //SnxxzGame.Instance.StartCoroutine(Co_SkillGuide());
|
| | | return;
|
| | | case 105:
|
| | | NewBieCenter.Instance.StartNewBieGuide(49);
|
| | |
| | | RegisterModel<FairyFeastModel>();
|
| | | RegisterModel<WishingPoolModel>();
|
| | | RegisterModel<RolePointModel>();
|
| | | RegisterModel<SocialModel>();
|
| | | inited = true;
|
| | | }
|
| | |
|
| | |
| | | |
| | | private void OnOkBtn() |
| | | { |
| | | CheckValue(); |
| | | onConfirm.Invoke(true); |
| | | if (deActiveConfirm) gameObject.SetActive(false); |
| | | if (deActiveConfirm)
|
| | | {
|
| | | gameObject.SetActive(false);
|
| | | } |
| | | } |
| | | |
| | | private void OnClickNum(uint index) |
| | |
| | | { |
| | | uint _value = m_RealIntValue * 10 + index; |
| | | m_RealIntValue = _value; |
| | | if (max > 0 && _value > max) _value = max; |
| | | if (min > 0 && _value < min) _value = min; |
| | | if (_value == m_IntValue) return; |
| | | if (max > 0 && _value > max)
|
| | | {
|
| | | _value = max;
|
| | | } |
| | | var maxlength = LengthOf(max); |
| | | var length = LengthOf(_value); |
| | | if (min > 0 && _value < min && (!displayOutValue || (max > 0 && length == maxlength)))
|
| | | {
|
| | | _value = min;
|
| | | } |
| | | if (_value == m_IntValue)
|
| | | {
|
| | | return;
|
| | | } |
| | | m_IntValue = _value; |
| | | } |
| | | m_Value.Length = 0; |
| | |
| | | } |
| | | break; |
| | | case NumKeyBoardType.Password: |
| | | if (limit != 0 && m_Value.Length >= limit) return; |
| | | if (limit != 0 && m_Value.Length >= limit)
|
| | | {
|
| | | return;
|
| | | } |
| | | m_Value.Append(index); |
| | | SetTargetTextValue(); |
| | | break; |
| | | } |
| | | m_OnValueChange.Invoke(); |
| | | } |
| | | |
| | | private void CheckValue()
|
| | | {
|
| | | if (type == NumKeyBoardType.Math)
|
| | | {
|
| | | var value = 0;
|
| | | int.TryParse(Value,out value);
|
| | | if (max > 0 && value > max)
|
| | | {
|
| | | Value = max.ToString();
|
| | | }
|
| | | if (min > 0 && value < min)
|
| | | {
|
| | | Value = min.ToString();
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | void SetTargetTextValue() |
| | |
| | | targetText.text = Value; |
| | | } |
| | | } |
| | | |
| | | static int LengthOf(uint value)
|
| | | {
|
| | | for (int i = 0; i <= 10; i++)
|
| | | {
|
| | | if (value / (ulong)Mathf.Pow(10, i) < 1)
|
| | | {
|
| | | return i;
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | } |
| | | } |
| | | public enum NumKeyBoardType |
| | | { |
| | |
| | | #if UNITY_EDITOR
|
| | | WindowCenter.Instance.Open<ExitGameWin>();
|
| | | #elif UNITY_ANDROID
|
| | | if (VersionUtility.Instance.IsMaoErGame())
|
| | | {
|
| | | WindowCenter.Instance.Open<ExitGameWin>();
|
| | | }
|
| | | #endif
|
| | | }
|
| | | }
|
| | |
| | | FairyDaimondGift = 23,
|
| | | MarketPutawayPwd = 24,
|
| | | DemonJar = 25,
|
| | | BossHomeAwardLimit = 27,
|
| | | DemonJarDouble = 28,
|
| | | BindJadeWheel=30,
|
| | | PrayForDrug = 31,
|