123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814 |
- using UnityEngine;
- using UnityEngine.UI;
- using System;
- using System.Xml;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using Random = UnityEngine.Random;
- public class Sign
- {
- #region 变量
- public int Coin
- {
- get
- {
- if (RoundBuff.Equal(-1))
- {
- return Coin_;
- }
- else
- {
- return (int)(Coin_*RoundBuff*ManaSign.SignRound);
- }
- }
- set { Coin_ = value; }
- }
- public int Diamond
- {
- get
- {
- if (RoundBuff.Equal(-1))
- {
- return Diamond_;
- }
- else
- {
- return (int)(Diamond_ * RoundBuff * ManaSign.SignRound);
- }
- }
- set { Diamond_ = value; }
- }
- public int Coin_;
- public int Diamond_;
- public float RoundBuff;
- public bool IsLottery;
- public Text Lab1;
- public Text Lab2;
- public Image Icon;
- public Image Mark;
- public Vector2 OriginSize;
- public List<int> FlowerList = new List<int>();
- #endregion
- public Sign(int index, Transform tra, XmlAttributeCollection attribute)
- {
- Dictionary<string, Transform> dic = new Dictionary<string, Transform>();
- Auxiliary.CompileDic(tra, dic);
- Lab1 = dic["Lab1"].GetComponent<Text>();
- Lab2 = dic["Lab2"].GetComponent<Text>();
- Icon = dic["Icon1"].GetComponent<Image>();
- Mark = dic["Icon2"].GetComponent<Image>();
- OriginSize = Icon.rectTransform.sizeDelta;
- Lab2.text = index.ToString();
- Coin = Auxiliary.IntParse(attribute[4].Value, 0);
- IsLottery = Auxiliary.BoolParse(attribute[1].Value, false);
- Diamond = Auxiliary.IntParse(attribute[3].Value, 0);
- FlowerList = Auxiliary.IntListParse(',', attribute[2].Value, new List<int>());
- RoundBuff = Auxiliary.FloatParse(attribute[5].Value, -1);
- SetUI();
- }
- public void Get()
- {
- if (IsLottery)
- {
- Lottery.EnterAnimation();
- return;
- }
- ManaAudio.PlayClip(Clip.CurrentClip);
- Mark.SetActive(true);
- ResetSign();
- ManaReso.SetActive("Bb_Get", false);
- ManaReso.SetActive("Bb_Rotate", true);
- ManaReso.SetActive("Bb_Confirm", true);
- if (FlowerList.Valid())
- {
- for (int i = 0; i < FlowerList.Count; i++)
- {
- FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[FlowerList[i]];
- if (flowerInfo.Unlock == false)
- {
- ManaReso.SetText("Bb_InfoLabA", flowerInfo.Name);
- ManaReso.SetActive("Bb_IconA", true);
- ManaReso.SetSprite("Bb_IconA0", flowerInfo.Icon);
-
- ManaReso.Get<Image>("Bb_IconA0").Resize(true, 0.65f, 0.65f);
- flowerInfo.Unlock = true;
- return;
- }
- }
- }
- if (Diamond > 0)
- {
- ManaReso.SetText("Bb_InfoLabB", Diamond.ToString());
- ManaReso.SetSprite("Bb_IconB", ManaReso.LoadSprite("钻石", Folder.UI));
- ManaReso.SetActive("Bb_IconB", true);
- ManaCenter.AddDiamond(Diamond, StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.Checkin);
- }
- else if (Coin > 0)
- {
- ManaReso.SetText("Bb_InfoLabB", Coin.ToString());
- ManaReso.SetSprite("Bb_IconB", ManaReso.LoadSprite("金币", Folder.UI));
- ManaReso.SetActive("Bb_IconB", true);
- ManaCenter.AddCoin(Coin, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.Checkin);
- }
- else
- {
- throw new Exception();
- }
- }
- public void SetUI()
- {
- if (IsLottery)
- {
- Icon.sprite = ManaReso.LoadSprite("礼包", Folder.Atlas);
- Icon.Resize(true, 0.3f, 0.3f);
- return;
- }
- if (FlowerList.Valid())
- {
- for (int i = 0; i < FlowerList.Count; i++)
- {
- FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[FlowerList[i]];
- if (flowerInfo.Unlock == false)
- {
- Icon.sprite = flowerInfo.Icon;
- Icon.Resize(true, 0.15f, 0.15f);
- return;
- }
- }
- }
-
- if (Diamond > 0)
- {
- Icon.sprite = ManaReso.LoadSprite("钻石", Folder.UI);
- Icon.Resize(false, OriginSize);
- Lab1.text = Diamond.ToString();
- }
- else if (Coin > 0)
- {
- Icon.sprite = ManaReso.LoadSprite("金币", Folder.UI);
- Icon.Resize(false, OriginSize);
- Lab1.text = Coin.ToString();
- }
- }
- public static void ResetSign()
- {
- ManaSign.SignTime = ManaServer.Time;
- ManaSign.SignIndex++;
- if (ManaSign.SignIndex == 22)
- {
- ManaSign.SignIndex = 1;
- ManaSign.SignRound++;
- ManaReso.Get("B_SignIn").GetTweenCG().AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- foreach (var kv in ManaSign.SignDic)
- {
- kv.Value.SetUI();
- kv.Value.Mark.SetActive(false);
- }
- }
- );
- }
- }
- }
- public class Lottery
- {
- #region Var
- public int PosIndex;
- public int Type;
- public int Value;
- public Text Lab;
- public Image Icon1;
- public Image Icon2;
- public Button Button;
- public Transform BK;
- public Transform Item;
- public static List<int> TempTypeList = new List<int>();
- public static List<int> TempValueList = new List<int>();
- public static List<Lottery> TempLotteryList = new List<Lottery>();
- public static List<int> TypeList = new List<int>();
- public static List<float> RateList = new List<float>();
- public static List<Vector3> PosList = new List<Vector3>();
- public static List<List<int>> LeftBorderDList = new List<List<int>>();
- public static List<List<int>> RightBorderDList = new List<List<int>>();
- #endregion
- public static void Configure(List<XmlAttributeCollection> attributeList)
- {
- PosList.Add(ManaReso.Get("Bc_LotteryItem1").position);
- PosList.Add(ManaReso.Get("Bc_LotteryItem2").position);
- PosList.Add(ManaReso.Get("Bc_LotteryItem3").position);
- for (int i = 0; i < attributeList.Count; i++)
- {
- RateList.Add((float) Auxiliary.FmlParse(attributeList[i][2].Value));
- TypeList.Add((int) Auxiliary.FmlParse(attributeList[i][1].Value));
- List<string> leftBorderStrList = Auxiliary.StringListParse(',', attributeList[i][3].Value, null);
- List<string> rightBorderStrList = Auxiliary.StringListParse(',', attributeList[i][4].Value, null);
- List<int> leftBorderList = new List<int>();
- List<int> rightBorderList = new List<int>();
- for (int j = 0; j < leftBorderStrList.Count; j++)
- {
- leftBorderList.Add((int)Auxiliary.FmlParse(leftBorderStrList[j], "l", ManaCenter.Level.ToString()));
- rightBorderList.Add((int)Auxiliary.FmlParse(rightBorderStrList[j], "l", ManaCenter.Level.ToString()));
- }
- LeftBorderDList.Add(leftBorderList);
- RightBorderDList.Add(rightBorderList);
- }
- }
- public static Lottery CreateLottery(int type, int posIndex, Transform lotteryItem)
- {
- Lottery lottery = new Lottery();
- lottery.Type = type;
- lottery.Value = Random.Range(LeftBorderDList[0][0], RightBorderDList[0][0] + 1);
- if (lottery.Type == 3)
- {
- #region
- bool allUnlock = true;
- for (int j = 0; j < LeftBorderDList[type - 1].Count; j++)
- {
- for (int k = LeftBorderDList[type - 1][j]; k < RightBorderDList[type - 1][j] + 1; k++)
- {
- if (!ManaGarden.FlowerInfoDic[k].Unlock && !TempValueList.Contains(k))
- {
- allUnlock = false;
- goto exit;
- }
- }
- }
- exit :
- if (allUnlock)
- {
- int index = Random.Range(0, LeftBorderDList[type - 1].Count);
- lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
- FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[lottery.Value];
- lottery.Value = flowerInfo.UnlockAmt/5;
- if (flowerInfo.UnlockCur == Current.Coin)
- {
- lottery.Type = 1;
- }
- else if (flowerInfo.UnlockCur == Current.Diamond)
- {
- lottery.Type = 2;
- }
- }
- else
- {
- int anticrush = 0;
- do
- {
- if (anticrush++ > 10000)
- {
- throw new Exception();
- }
- int index = Random.Range(0, LeftBorderDList[type - 1].Count);
- lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
- } while (ManaGarden.FlowerInfoDic[lottery.Value].Unlock || TempValueList.Contains(lottery.Value));
- TempValueList.Add(lottery.Value);
- }
- #endregion
- }
- else if (lottery.Type == 4)
- {
- #region
- bool allBought = true;
- for (int j = 0; j < LeftBorderDList[type - 1].Count; j++)
- {
- for (int k = LeftBorderDList[type - 1][j]; k < RightBorderDList[type - 1][j] + 1; k++)
- {
- if (!ManaPlayer.CloseUnitDic[k].Bought && !TempValueList.Contains(k))
- {
- allBought = false;
- goto exit;
- }
- }
- }
- exit :
- if (allBought)
- {
- int index = Random.Range(0, LeftBorderDList[type - 1].Count);
- lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
- CloseUnit closeUnit = ManaPlayer.CloseUnitDic[lottery.Value];
- lottery.Value = (int) closeUnit.BuyAmt/5;
- if (closeUnit.BuyCurrent == Current.Coin)
- {
- lottery.Type = 1;
- }
- else if (closeUnit.BuyCurrent == Current.Diamond)
- {
- lottery.Type = 2;
- }
- }
- else
- {
- int anticrush = 0;
- do
- {
- if (anticrush++ > 10000)
- {
- throw new Exception();
- }
- int index = Random.Range(0, LeftBorderDList[type - 1].Count);
- lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
- } while (ManaPlayer.CloseUnitDic[lottery.Value].Bought || TempValueList.Contains(lottery.Value));
- TempValueList.Add(lottery.Value);
- }
- #endregion
- }
- else
- {
- int index = Random.Range(0, LeftBorderDList[type - 1].Count);
- lottery.Value = Random.Range(LeftBorderDList[type - 1][index], RightBorderDList[type - 1][index] + 1);
- }
- lottery.PosIndex = posIndex;
- lottery.Item = lotteryItem;
- lottery.BK = lotteryItem.GetChild(0);
- lottery.Icon1 = lotteryItem.GetChild(1).GetChild(0).GetComponent<Image>();
- lottery.Icon2 = lotteryItem.GetChild(1).GetChild(1).GetComponent<Image>();
- lottery.Lab = lotteryItem.GetChild(1).GetChild(2).GetComponent<Text>();
- lottery.Button = lotteryItem.GetChild(1).GetChild(3).GetComponent<Button>();
- lottery.BK.SetActive(false);
- if (lottery.Type == 1)
- {
- lottery.Icon1.SetActive(false);
- lottery.Icon2.sprite = ManaReso.LoadSprite("金币", Folder.UI);
- lottery.Icon2.Resize(true, 1, 1);
- lottery.Icon2.transform.localPosition = new Vector3(0, 7.5f, 0);
- lottery.Lab.SetActive(true);
- lottery.Lab.text = lottery.Value.ToString();
- }
- else if (lottery.Type == 2)
- {
- lottery.Icon1.SetActive(false);
- lottery.Icon2.sprite = ManaReso.LoadSprite("钻石", Folder.UI);
- lottery.Icon2.Resize(true, 1, 1);
- lottery.Icon2.transform.localPosition = new Vector3(0, 7.5f, 0);
- lottery.Lab.SetActive(true);
- lottery.Lab.text = lottery.Value.ToString();
- }
- else if (lottery.Type == 3)
- {
- lottery.Icon1.SetActive(false);
- lottery.Icon2.sprite = ManaGarden.FlowerInfoDic[lottery.Value].Icon;
- lottery.Icon2.Resize(true, 0.25f, 0.25f);
- lottery.Icon2.transform.localPosition = new Vector3();
- lottery.Lab.SetActive(false);
- }
- else if (lottery.Type == 4)
- {
- CloseUnit closeUnit = ManaPlayer.CloseUnitDic[lottery.Value];
- float newSize = closeUnit.PixelSize/closeUnit.Sprites[0].rect.width;
- lottery.Icon2.sprite = closeUnit.Sprites[0];
- lottery.Icon2.Resize(true, newSize, newSize);
- lottery.Icon2.transform.localPosition = new Vector2(0, closeUnit.IconOffset);
- lottery.Lab.SetActive(false);
- if (closeUnit.Sprites.Length > 1)
- {
- lottery.Icon1.SetActive(true);
- lottery.Icon1.sprite = closeUnit.Sprites[1];
- lottery.Icon1.Resize(true, newSize, newSize);
- lottery.Icon1.transform.localPosition = new Vector2(0, closeUnit.IconOffset) + closeUnit.IconOffset1*newSize;
- }
- else
- {
- lottery.Icon1.SetActive(false);
- }
- }
- lottery.Button.onClick = new Button.ButtonClickedEvent();
- lottery.Button.onClick.AddListener(() => { OnClick(posIndex); });
- return lottery;
- }
- public static void EnterAnimation()
- {
- ManaReso.Get("Bc_Lottery").TweenForCG();
- ManaReso.Get("Ba_Notice0").TweenBacCG();
- float random = Random.Range(0f, 1f);
- for (int i = 0; i < RateList.Count; i++)
- {
- if (random <= RateList.MySum(f => f, i + 1))
- {
- TempTypeList.Add(TypeList[i]);
- TempTypeList.AddRange(TypeList.Random(2, true, false, type => !TempTypeList.Contains(type)));
- break;
- }
- }
- TempLotteryList.Add(CreateLottery(TempTypeList[0], 0, ManaReso.Get("Bc_LotteryItem1")));
- TempLotteryList.Add(CreateLottery(TempTypeList[1], 1, ManaReso.Get("Bc_LotteryItem2")));
- TempLotteryList.Add(CreateLottery(TempTypeList[2], 2, ManaReso.Get("Bc_LotteryItem3")));
- List<Vector3> posList = PosList.Disturb();
- TempLotteryList[0].Item.position = posList[0];
- TempLotteryList[1].Item.position = posList[1];
- TempLotteryList[2].Item.position = posList[2];
- Button button1 = ManaReso.Get<Button>("Bc_LotteryBack1");
- Button button2 = ManaReso.Get<Button>("Bc_LotteryBack2");
- Button button3 = ManaReso.Get<Button>("Bc_LotteryBack3");
- button1.interactable = false;
- button2.interactable = false;
- button3.interactable = false;
- Auxiliary.Instance.DelayCall
- (
- () =>
- {
- ManaReso.Get("Bc_LotteryItem1").Move2D(PosList[1], 0.25f, false, Curve.EaseOutQuad);
- ManaReso.Get("Bc_LotteryItem2").Move2D(PosList[1], 0.25f, false, Curve.EaseOutQuad);
- ManaReso.Get("Bc_LotteryItem3").Move2D(PosList[1], 0.25f, false, Curve.EaseOutQuad);
- },
- 1f
- );
- Auxiliary.Instance.DelayCall
- (
- () =>
- {
- ManaReso.Get("Bc_LotteryItem1").TweenForEuler();
- ManaReso.Get("Bc_LotteryItem2").TweenForEuler();
- ManaReso.Get("Bc_LotteryItem3").TweenForEuler();
- },
- 1.5f
- );
- Auxiliary.Instance.DelayCall
- (
- () =>
- {
- button1.interactable = true;
- button2.interactable = true;
- button3.interactable = true;
- ManaReso.Get("Bc_LotteryItem1").Move2D(PosList[0], 0.25f, false, Curve.EaseOutQuad);
- ManaReso.Get("Bc_LotteryItem2").Move2D(PosList[1], 0.25f, false, Curve.EaseOutQuad);
- ManaReso.Get("Bc_LotteryItem3").Move2D(PosList[2], 0.25f, false, Curve.EaseOutQuad);
- },
- 2f
- );
- Auxiliary.Instance.DelayCall
- (
- () =>
- {
- ManaReso.Get("Bc_Lab").TweenForCG();
- ManaReso.SetText("Bc_Lab", Language.GetStr("UI", "Bc_Lab"));
- },
- 2.5f
- );
- }
- public static void EndAnimation()
- {
- TempTypeList = new List<int>();
- TempValueList = new List<int>();
- TempLotteryList = new List<Lottery>();
- ManaReso.Get("Bc_Lab").TweenBacCG();
- ManaReso.Get("Bc_Confirm").TweenBacCG();
- ManaReso.Get("Ba_Notice0").TweenForCG();
- ManaReso.Get("B_SignIn").TweenBacCG();
- ManaReso.Get("Ba_Notice").TweenBacCG();
- ManaReso.Get("Bb_SignIn").TweenBacCG();
- ManaReso.Get("Bc_Lottery").TweenBacCG();
- ManaAudio.PlayClip(Clip.BtnClip);
- }
- public static void OnClick(int index)
- {
- ManaAudio.PlayClip(Clip.CurrentClip);
- ManaReso.Get<Button>("Bc_LotteryBack1").interactable = false;
- ManaReso.Get<Button>("Bc_LotteryBack2").interactable = false;
- ManaReso.Get<Button>("Bc_LotteryBack3").interactable = false;
- TempLotteryList[0].Item.TweenBacEuler();
- TempLotteryList[0].BK.SetActive(true);
- TempLotteryList[0].GetAward();
- List<Vector3> posList = new List<Vector3>(PosList);
- posList.Remove(PosList[index]);
- posList = posList.Disturb();
- TempLotteryList[0].Item.position = PosList[index];
- TempLotteryList[1].Item.position = posList[0];
- TempLotteryList[2].Item.position = posList[1];
- Auxiliary.Instance.DelayCall
- (
- () =>
- {
- ManaReso.Get("Bc_Confirm").TweenForCG();
- ManaReso.Get("Bc_LotteryItem1").TweenBacEuler();
- ManaReso.Get("Bc_LotteryItem2").TweenBacEuler();
- ManaReso.Get("Bc_LotteryItem3").TweenBacEuler();
- },
- 1f
- );
- }
- public void GetAward()
- {
- Sign.ResetSign();
- BK.SetActive(true);
- if (Type == 1)
- {
- ManaCenter.AddCoin(Value, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.Checkin);
- ManaReso.SetText("Bc_Lab", Language.GetStr("UI", "Bc_Lab1") + Language.GetStr("Common", "Coin") + Value);
- }
- else if (Type == 2)
- {
- ManaCenter.AddDiamond(Value, StaticsManager.ItemID.获得钻石, StaticsManager.ConsumeModule.Checkin);
- ManaReso.SetText("Bc_Lab", Language.GetStr("UI", "Bc_Lab1") + Language.GetStr("Common", "Diamond") + Value);
- }
- else if (Type == 3)
- {
- ManaGarden.FlowerInfoDic[Value].Unlock = true;
- ManaReso.SetText("Bc_Lab", Language.GetStr("UI", "Bc_Lab1") + ManaGarden.FlowerInfoDic[Value].Name);
- }
- else if (Type == 4)
- {
- ManaPlayer.CloseUnitDic[Value].Unlock();
- ManaPlayer.BoughtCloseList.UniqueAdd(Value);
- ManaReso.SetText("Bc_Lab", Language.GetStr("UI", "Bc_Lab1") + ManaPlayer.CloseUnitDic[Value].Name);
- }
- }
- }
- public class ManaSign : Regist
- {
- #region 变量
- public static int SignIndex;
- public static int SignRound;
- public static DateTime SignTime;
- public static Dictionary<int, Sign> SignDic = new Dictionary<int, Sign>();
- #endregion
- public static bool ShowOfflineReward()
- {
- if (ShowOfflineIncomReward())
- {
- return true;
- }
- if (ShowMailReward())
- {
- return true;
- }
- if (ShowSignReward())
- {
- return true;
- }
- return false;
- }
- public static bool ShowOfflineIncomReward()
- {
- if (ManaCenter.OfflineLock)
- {
- if (!ManaTutorial.TutorialA)
- {
- ManaReso.Get("C_Group").TweenBacCG();
- ManaReso.Get("B_SignIn").TweenForCG();
- ManaReso.Get("Ba_Notice").TweenForCG();
- return true;
- }
- }
- return false;
- }
- public static bool ShowMailReward()
- {
- ManaServer.DecodeMailXml(ManaServer.MailXml);
- if (ManaServer.MailRewardList.Count > 0)
- {
- if (!ManaTutorial.TutorialA)
- {
- ManaServer.GetMailReward();
- ManaReso.Get("C_Group").TweenBacCG();
- ManaReso.Get("B_SignIn").TweenForCG();
- ManaReso.Get("Bd_Mail0").TweenForCG();
- return true;
- }
- }
- return false;
- }
- public static bool ShowSignReward()
- {
- if (!ManaTutorial.TutorialA && ManaData.GetPlayerBool("QuitFlag") && ManaServer.Connect)
- {
- int daySpan = ManaServer.Time.Day - ManaSign.SignTime.Day;
- int yearSpan = ManaServer.Time.Year - ManaSign.SignTime.Year;
- int monthSpan = ManaServer.Time.Month - ManaSign.SignTime.Month;
- if (daySpan >= 1 || yearSpan >= 1 || monthSpan >= 1)
- {
- ManaReso.Get("B_SignIn").TweenForCG();
- ManaReso.Get("Bb_SignIn").TweenForCG();
- return true;
- }
- }
- return false;
- }
- public static void GetSignReward()
- {
- SignDic[SignIndex].Get();
- ManaCenter.SignAmt++;
- }
- public override void RegistValueB()
- {
- SignTime = DateTime.Parse(ManaData.GetPlayerString("SignTime"));
- SignIndex = ManaData.GetPlayerInt("SignIndex");
- SignRound = ManaData.GetPlayerInt("SignRound");
- Transform par = ManaReso.Get("Bb_Grid");
- List<XmlAttributeCollection> attributeList = ManaData.GetSignConfig();
- for (int i = 0; i < attributeList.Count; i++)
- {
- Transform tra = ManaReso.Get("SignItem", Folder.UI, false, par, false, ObjType.SignItem);
- SignDic.Add(i + 1, new Sign(i + 1, tra, attributeList[i]));
- }
- for (int i = 1; i < SignIndex; i++)
- {
- SignDic[i].Mark.SetActive(true);
- }
- Lottery.Configure(ManaData.GetLotteryConfig());
- }
- }
- #region DebugList
- //签到的循环与存档
- #endregion
|