Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, November 20, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class TaskPowerConfig : ConfigBase { |
| | | |
| | | public int ID { get ; private set ; }
|
| | | public int Power { get ; private set ; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return ID.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | Power=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5f48ae41a24844d43a22a9f19e91e541 |
| | | timeCreated: 1542680646 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | AddAsyncTask<TreasureDungeonConfig>();
|
| | | AddAsyncTask<LoadingBackGroundConfig>();
|
| | | AddAsyncTask<IceLodeStarAwardConfig>();
|
| | |
|
| | | AddAsyncTask<TaskPowerConfig>();
|
| | | while (!AllCompleted())
|
| | | {
|
| | | var completedCount = 0;
|
| | |
| | |
|
| | | public void UnloadAssetBundle(string assetBundleName, bool unloadAllLoadedObjects, bool includeDependenice)
|
| | | {
|
| | |
|
| | | #if UNITY_5
|
| | | assetBundleName = assetBundleName.ToLower();
|
| | | #endif
|
| | |
| | |
|
| | | public void UnloadAsset(string assetBundleName, string assetName)
|
| | | {
|
| | | #if UNITY_5
|
| | | assetBundleName = assetBundleName.ToLower();
|
| | | #endif
|
| | | string _assembleName = StringUtility.Contact(assetBundleName, "@", assetName);
|
| | |
|
| | | if (JudgeExistAsset(assetBundleName, assetName) == false)
|
| | |
| | | public uint bubbleState { get; private set; }
|
| | | public void UpdateBubbleState(HA717_tagMCChatBubbleBoxState package)
|
| | | {
|
| | | List<int> list = null;
|
| | | if (serverInited)
|
| | | {
|
| | | list = new List<int>();
|
| | | foreach (var id in chatBubbles.Keys)
|
| | | {
|
| | | if (!IsBubbleGot(id))
|
| | | {
|
| | | list.Add(id);
|
| | | }
|
| | | }
|
| | | }
|
| | | bubbleState = package.BoxState;
|
| | | if (serverInited)
|
| | | {
|
| | | if (list != null)
|
| | | {
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | if (IsBubbleGot(list[i]))
|
| | | {
|
| | | SendUseBubble(list[i]);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | if (chatBubbleStateRefresh != null)
|
| | | {
|
| | | chatBubbleStateRefresh();
|
| | |
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
|
| | | vipModel.OnVipGiftEvent += OnVipGiftEvent;
|
| | | model.chatBubbleStateRefresh += ChatBubbleStateRefresh;
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
|
| | | vipModel.OnVipGiftEvent -= OnVipGiftEvent;
|
| | | model.chatBubbleStateRefresh -= ChatBubbleStateRefresh;
|
| | | }
|
| | |
|
| | | private void ChatBubbleStateRefresh()
|
| | | {
|
| | | DisplayState();
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
|
| | |
| | | using TableConfig;
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | | using System.Text.RegularExpressions;
|
| | | //关于飞鞋任务
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
| | | var taskinfo = Config.Instance.Get<TASKINFOConfig>(str);
|
| | | if (taskinfo != null)
|
| | | {
|
| | | m_ContentText.text = taskinfo.show_writing;
|
| | | var taskPower = Config.Instance.Get<TaskPowerConfig>(TaskID);
|
| | | string StrText= taskinfo.show_writing;
|
| | | if (taskPower != null)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.FightPoint >= taskPower.Power)
|
| | | {
|
| | | StrText = StrText.Replace("<color=#fff4cd>", "<color=#109d06>");
|
| | | }
|
| | | else
|
| | | {
|
| | | StrText = StrText.Replace("<color=#fff4cd>", "<color=#fa0101>");
|
| | | }
|
| | | m_ContentText.text = StrText;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContentText.text = StrText;
|
| | | }
|
| | | |
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | private void Updatefighting(PlayerDataRefresh obj)//等级刷新
|
| | | {
|
| | |
|
| | | if (obj == PlayerDataRefresh.FightPower)
|
| | | {
|
| | | foreach (var key in taskmodel.allMissionDict.Keys)
|
| | | {
|
| | | var TaskPower = Config.Instance.Get<TaskPowerConfig>(key);
|
| | | if (TaskPower != null)
|
| | | {
|
| | | int leng = Content.childCount;
|
| | | for (int i = 0; i < leng; i++)
|
| | | {
|
| | | GameObject childObj = Content.GetChild(i).gameObject;
|
| | | TaskType childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
|
| | | if (childObj.activeSelf && childObjTaskType.TaskID == key)
|
| | | {
|
| | | childObj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(key);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | private void CardLevelChangeEvent(int taskID)//卡级状态改变
|
| | | {
|
| | |
| | | }
|
| | | void TaskToAdd(int MissionID, int MissionState, int DiscriptionIndex)//添加任务
|
| | | {
|
| | | if (MissionID == 2000 || MissionID == 3000 || MissionState == 3 || MissionState==0)
|
| | | if (MissionID == 2000 || MissionID == 3000 || MissionState == 3 || MissionState == 0)
|
| | | {
|
| | | return;
|
| | | }
|