void Start() { if (!DataManager.Instance.isLoaded) { return; } Instance = this; _dateLastRefreshed = DateTime.MinValue; string refreshCostStr = GlobalProps.SHOP_REFRESH_KEY_COST.GetString(); REFRESH_COST = CurrencyManager.ParseToCost(refreshCostStr); txtRefreshCost.text = "REFRESH FOR " + REFRESH_COST.amount; UpdateSortedInventoryItems(); Btn_ShowStoreBuyMenu(); }
public void initUI() { UIObjectFactory.SetPackageItemExtension("ui://UIMain/MonsterCard", typeof(MonsterCardComponent)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/TowerPanel", typeof(TowerPanel)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/RolePanel", typeof(RolePanel)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/MemoPanel", typeof(MemoPanel)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/MemoWindow", typeof(MemoInternalWindow)); //UIObjectFactory.SetPackageItemExtension("ui://UIMain/MemoWindow", typeof(MemoInternalWindow)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/BranchItem", typeof(SelectionBranch)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/ComponentView", typeof(ComponentView)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/TowerViewInList", typeof(GButton)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/NewItem", typeof(NewItem)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/EnterBattlePanel", typeof(EnterBattlePanel)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/MemoItem", typeof(MemoItem)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/PotionSmall", typeof(PotionSmall)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/ScarSmall", typeof(ScarSmallIcon)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/TowerPropertyDetail", typeof(TowerPropertyAfter)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/TowerDamageItem", typeof(TowerDamageItem)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/TowerSkillItem", typeof(TowerSkillItem)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/AccesoryView", typeof(AccesoryView)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/PropertyCompareLine", typeof(PropertyCompareLine)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/PropertyModify", typeof(PropertyModify)); UIObjectFactory.SetPackageItemExtension("ui://UIMain/Hint", typeof(HintComponent)); //UIObjectFactory.SetPackageItemExtension("ui://UIMain/AccesoryView", typeof(AccesoryView)); _main = GameObject.Find("UIPanel").GetComponent <UIPanel> ().ui; initEncounterDetail(); monsterContianer = _main.GetChild("monsters").asCom; hpTextView = _main.GetChild("hp").asTextField; moneyTextView = _main.GetChild("money").asTextField; sanTextView = _main.GetChild("san").asTextField; levelTextView = _main.GetChild("level").asTextField; showdetailButton = _main.GetChild("detail_button").asGraph; //showdetailButton.url="detail"; showdetailButton.onClick.Add(delegate(EventContext context) { if (!GRoot.inst.touchable) { Debug.Log("不能点"); } eMenu.Show(); if (PlayerData.getInstance().guideStage == 12) { GuideManager.getInstance().showGuideTowerTab(); PlayerData.getInstance().guideStage = 13; } }); _enterBattle = _main.GetChild("enterBattle").asLoader; _enterBattle.onTouchEnd.Add(delegate() { if (PlayerData.getInstance().chasingEnemies.Count > 0) { clickEnterBattleButton(); } }); _mask = _main.GetChild("mask").asGraph; // for (int i = 0; i < 3; i++) { // addMonster ("9"); // } //detailPanel.TweenFade (0,2); sbManager = new SelectionBranchManager(); eMenu = new ExploreMenu(); popupWindow = UIPackage.CreateObject("UIMain", "PopupConfirmWindow").asCom; unlockThingWindow = new UnlockThingWindow(); shopPanel = new ShopInterface(); exploreFinishWindow = new ExploreFinishWindow(); enterBattlePanel = new EnterBattlePanel(); getItemManager = new GetItemManager(); itemDetailAmplifier = new ItemDetailAmplifier(); }
void Awake() { _dialogueController = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <DialogueController> (); _shopInterface = GetComponent <ShopInterface>(); _inventoryInterface = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <InventoryInterface>(); }