//初始化显示地图ui void InstMapUI() { playerInfo = PlayerInfo.GetPlayerInfo(); mineText.text = playerInfo.MineCount.ToString(); moneyText.text = playerInfo.Money.ToString(); bool ishit = false; ishit = eventmanager.CheckUnCompleteEvent() || ishit; ishit = eventmanager.CheckEventList(ChatEventManager.ChatEvent.EventTypeList.InMap, false) || ishit; ishit = eventmanager.CheckEventList(ChatEventManager.ChatEvent.EventTypeList.Mines, false) || ishit; ishit = eventmanager.CheckEventList(ChatEventManager.ChatEvent.EventTypeList.Golds, false) || ishit; if (ishit) { eventmanager.StartStory(); } }
// Use this for initialization void Start() { _bagUI = Resources.Load <GameObject>("Prefab/BagUI"); Money = transform.Find("/ToolsKit/Canvas/PlayerInfo/glodBoard/Text").GetComponent <Text>(); Mine = transform.Find("/ToolsKit/Canvas/PlayerInfo/mineBoard/Text").GetComponent <Text>(); //获取事件控制器 eventmanager = transform.Find("/ToolsKit/EventManager").GetComponent <ChatEventManager>(); questManager = transform.Find("/ToolsKit/QuestManager").GetComponent <QuestManager>(); UpdateShopGoodsData(); InitShopGoods(); UpdateShopMoney(); EventTriggerListener.Get(GameObject.Find("Canvas/Button (2)")).onClick = OpenSpecialItemBag; EventTriggerListener.Get(GameObject.Find("Canvas/Button (3)")).onClick = OpenSpecialItemBagAll; EventTriggerListener.Get(GameObject.Find("Canvas/Button (4)")).onClick = PlayerInfo.ClearCompleteEvents; //增加进入地图次数 PlayerInfo.AddSenceInfo(0); bool ishit = false; ishit = eventmanager.CheckUnCompleteEvent() || ishit; ishit = eventmanager.CheckEventList(ChatEventManager.ChatEvent.EventTypeList.InShop, false) || ishit; ishit = eventmanager.CheckEventList(ChatEventManager.ChatEvent.EventTypeList.SellGoods, false) || ishit; if (ishit) { eventmanager.StartStory(); } else { eventmanager.PreCheckEventList(0); questManager.PreCheckQuest(0); questManager.IsArriveWaitingCheckPoint(0); } }