IEnumerator GoToMaingame() { yield return(new WaitForSeconds(3)); UIGame.SetActive(true); UILoader.SetActive(false); }
public TrinityPlugin() { _instance = this; UILoader.Preload(); PluginManager.OnPluginsReloaded += PluginManager_OnPluginsReloaded; InstallRoutine(); }
private void Close() { UILoader.GetUIState <RichTextBox>().Visible = false; RichTextBox.SetData(null, "", ""); Main.player[Main.myPlayer].talkNPC = -1; textState = 0; }
public override bool NewRightClick(int i, int j) { var tile = (Tile)Framing.GetTileSafely(i, j).Clone(); if (CanOpen(Main.LocalPlayer) && tile.frameX < 32) { for (int x = 0; x < 2; x++) { for (int y = 0; y < 4; y++) { int realX = x + i - tile.frameX / 18; int realY = y + j - tile.frameY / 18; Framing.GetTileSafely(realX, realY).frameX += 36; } } Loot[] smallLoot = new Loot[5]; List <Loot> types = Helper.RandomizeList(SmallLootPool); for (int k = 0; k < 5; k++) { smallLoot[k] = types[k]; } UILoader.GetUIState <LootUI>().SetItems(GoldLootPool[Main.rand.Next(GoldLootPool.Count)], smallLoot); UILoader.GetUIState <LootUI>().Visible = true; return(true); } return(false); }
protected override IEnumerator Load() { string bundleName = AssetBundlesUtility.GetUICharacterResourcesBundleName(); AssetBundleLoadRequest bundleLoadRequest = AssetManager.LoadAssetBundle(bundleName); while (!bundleLoadRequest.get_isDone()) { yield return(null); } if (AssetManagerError.op_Implicit(bundleLoadRequest.get_error()) != 0) { Log.Error($"Error while loading bundle '{bundleName}' error={bundleLoadRequest.get_error()}", 26, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\PlayerUI\\PlayerUIMainState.cs"); yield break; } UILoader <PlayerIconRoot> loader = new UILoader <PlayerIconRoot>(this, "PlayerLayerUI", "core/scenes/ui/player", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; yield return(m_ui.LoadAssets()); m_ui.get_gameObject().SetActive(true); m_ui.Initialise(this); m_ui.LoadVisual(); }
protected override IEnumerator Load() { m_modifications = new WeaponAndDeckModifications(); m_modifications.Setup(); this.LoadAssetBundle(AssetBundlesUtility.GetUIAnimatedCharacterResourcesBundleName()); this.LoadAssetBundle("core/ui/characters/companions"); string bundleName = AssetBundlesUtility.GetUICharacterResourcesBundleName(); AssetBundleLoadRequest bundleLoadRequest = AssetManager.LoadAssetBundle(bundleName); while (!bundleLoadRequest.get_isDone()) { yield return(null); } if (AssetManagerError.op_Implicit(bundleLoadRequest.get_error()) != 0) { Log.Error($"Error while loading bundle '{bundleName}' error={bundleLoadRequest.get_error()}", 48, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\PlayerUI\\DeckMainState.cs"); yield break; } UILoader <DeckUIRoot> loader = new UILoader <DeckUIRoot>(this, "PlayerLayer_DeckCanvas", "core/scenes/ui/deck", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; yield return(m_ui.LoadAssets()); m_ui.get_gameObject().SetActive(true); m_ui.Initialise(m_modifications); }
public static Window CreateWindow() { try { var filename = Path.Combine(FileManager.PluginPath, "UI", "TVars.xaml"); if (_window == null) { _window = new Window(); } _window.DataContext = new TVarsViewModel(); string content = File.ReadAllText(filename); UserControl userControl = UILoader.LoadAndTransformXamlFile <UserControl>(filename); _window.Content = userControl; _window.Height = 620; _window.Width = 600; _window.MinHeight = 580; _window.MinWidth = 600; _window.Title = "Trinity Variables"; _window.Closed += Window_Closed; } catch (Exception ex) { Logger.LogNormal("Unable to open Trinity Variables: {0}", ex.ToString()); } return(_window); }
public override void RightClick(Player player) { UpdateBagSlots(); item.stack++; ChefBagUI.openBag = this; UILoader.GetUIState <ChefBagUI>().OnInitialize(); }
public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers) { for (int k = 0; k < UILoader.UIStates.Count; k++) { var state = UILoader.UIStates[k]; UILoader.AddLayer(layers, UILoader.UserInterfaces[k], state, state.InsertionIndex(layers), state.Visible, state.Scale); } }
protected override IEnumerator Load() { UILoader <FightEndedUI> loader = new UILoader <FightEndedUI>(FightState.instance, this, GetSceneName(m_end), "core/scenes/ui/fight", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; }
public Plugin() { _instance = this; Logger.Enricher.AddOrUpdate(Name, () => new ScalarValue(Version)); UILoader.Preload(); PluginManager.OnPluginsReloaded += PluginManager_OnPluginsReloaded; InstallRoutine(); }
protected override IEnumerator Load() { UILoader <ParametersUI> loader = new UILoader <ParametersUI>(this, "ParametersUI", "core/scenes/ui/option"); yield return(loader.Load()); m_ui = loader.ui; }
private void Bless() { UILoader.GetUIState <RichTextBox>().Visible = false; RichTextBox.SetData(null, "", ""); Main.player[Main.myPlayer].talkNPC = -1; Main.LocalPlayer.AddBuff(BuffType <SpikeImmuneBuff>(), 3600); //TODO: this may need manual sync later? not sure (Remember this is really being called from a UI) }
/// <summary> 播放特效 </summary> public void playEffect(string effectPath, Vector2 pos) { GameObject effect = UILoader.LoadUIEffect(effectPath); Transform UILayer = UILayer_middle; effect.transform.SetParent(UILayer); effect.transform.localScale = Vector3.one; effect.transform.localPosition = new Vector3(pos.x, pos.y, 0); }
protected override IEnumerator Load() { UILoader <CommonUI> loader = new UILoader <CommonUI>(this, "CommonUI", "core/scenes/ui/examples", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); }
protected override IEnumerator Load() { string sceneName = (m_reason == FightStatusEndReason.Win) ? "FightEndedWinMatchUI" : "FightEndedDiedUI"; UILoader <BaseOpenCloseUI> loader = new UILoader <BaseOpenCloseUI>(this, sceneName, "core/scenes/ui/fight", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; }
protected override IEnumerator Load() { UILoader <MatchMakingUI> loader = new UILoader <MatchMakingUI>(this, "MatchmakingUI", "core/scenes/ui/matchmaking", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); }
protected override IEnumerator Load() { UILoader <LoginUIDemo> loader = new UILoader <LoginUIDemo>(this, "LoginUIDemo", "demo/scenes/ui/login", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(false); }
protected override IEnumerator Load() { UILoader <EndGameStatsUIDemo> loader = new UILoader <EndGameStatsUIDemo>(FightState.instance, this, "EndGameStats", "demo/scenes/ui/fight", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; yield return(m_ui.Init(m_endResult, m_gameStatistics, m_fightTime)); }
protected override IEnumerator Load() { UILoader <LoginUI> loader = new UILoader <LoginUI>(this, "LoginUI", "core/scenes/ui/login"); yield return(loader.Load()); m_ui = loader.ui; m_ui.SetParams(PlayerPreferences.lastLogin, PlayerPreferences.lastPassword, PlayerPreferences.lastServer); }
public ConfigWindow(int heroId) { Height = 580; Width = 700; try { _mainControl = UILoader.LoadAndTransformXamlFile <UserControl>(Path.Combine(FileUtils.PluginPath, "UI", "Config.xaml")); } catch (Exception) { Logger.Error("Couldn't find the file {0}", Path.Combine(FileUtils.PluginPath, "UI", "Config.xaml")); return; } Content = _mainControl; //Title = "Adventurer Config for " + ZetaDia.Service.Hero.Name + " - " + ZetaDia.Service.Hero.Class; Title = "Adventurer SettingsStorage"; ResizeMode = ResizeMode.NoResize; //Top = Application.Current.MainWindow.Top + (Application.Current.MainWindow.Height - Height) / 2; //Left = Application.Current.MainWindow.Left + (Application.Current.MainWindow.Width - Width) / 2; if (Top < 0) { Top = 0; } _saveButton = LogicalTreeHelper.FindLogicalNode(_mainControl, "SaveButton") as Button; _saveButton.Click += SaveButton_Click; _cancelButton = LogicalTreeHelper.FindLogicalNode(_mainControl, "CancelButton") as Button; _cancelButton.Click += CancelButton_Click; _gemPriorityUp = LogicalTreeHelper.FindLogicalNode(_mainControl, "GemPriorityUp") as Button; _gemPriorityUp.Click += GemPriorityUp_Click; _gemPriorityDown = LogicalTreeHelper.FindLogicalNode(_mainControl, "GemPriorityDown") as Button; _gemPriorityDown.Click += GemPriorityDown_Click; _gemPriorityList = LogicalTreeHelper.FindLogicalNode(_mainControl, "GemPriorityList") as ListBox; _prioritizeEquippedGems = LogicalTreeHelper.FindLogicalNode(_mainControl, "GreaterRiftPrioritizeEquipedGems") as CheckBox; _prioritizeEquippedGems.Click += PrioritizeEquippedGems_Click; _greaterRiftLevel = LogicalTreeHelper.FindLogicalNode(_mainControl, "GreaterRiftLevel") as ComboBox; _greaterRiftLevel.SelectionChanged += GreaterRiftLevel_SelectionChanged; _bountyAct1 = LogicalTreeHelper.FindLogicalNode(_mainControl, "BountyAct1") as CheckBox; _bountyAct2 = LogicalTreeHelper.FindLogicalNode(_mainControl, "BountyAct2") as CheckBox; _bountyAct3 = LogicalTreeHelper.FindLogicalNode(_mainControl, "BountyAct3") as CheckBox; _bountyAct4 = LogicalTreeHelper.FindLogicalNode(_mainControl, "BountyAct4") as CheckBox; _bountyAct5 = LogicalTreeHelper.FindLogicalNode(_mainControl, "BountyAct5") as CheckBox; _bountyPrioritizeBonusAct = LogicalTreeHelper.FindLogicalNode(_mainControl, "BountyPrioritizeBonusAct") as CheckBox; _pluginSettings = PluginSettings.Current; DataContext = _pluginSettings; BattleNetHeroId = heroId; }
protected override IEnumerator Load() { UILoader <GodSelectionRoot> loader = new UILoader <GodSelectionRoot>(this, "GodSelectionUI", "core/scenes/ui/player", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.Initialise(); m_ui.get_gameObject().SetActive(true); }
protected override IEnumerator Load() { UILoader <NicknameRequestUI> loader = new UILoader <NicknameRequestUI>(this, "NicknameRequestUI", "core/scenes/ui/login", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); m_ui.OnNicknameRequest += OnNicknameRequest; }
protected override IEnumerator Load() { UILoader <UIZaapPVPSelection> loader = new UILoader <UIZaapPVPSelection>(this, "UIZaap_PVP", "core/scenes/maps/havre_maps", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); yield return(m_ui.LoadAssets()); }
protected override IEnumerator Load() { UILoader <TransitionUI> loader = new UILoader <TransitionUI>(this, "TransitionUI", "core/scenes/ui/transition", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); yield return(m_ui.OpenCoroutine()); }
public override void StartModule(int param, object data = null) { if (m_FourView == null) { m_FourView = UILoader.LoadUI <FourView>("UI/FourView"); } m_FourView.Init((string)data); m_FourView.m_Accomplish = Accomplish; UI.Instance.addChild(m_FourView); }
protected override IEnumerator Load() { UILoader <ProfileUIRoot> loader = new UILoader <ProfileUIRoot>(this, "PlayerLayer_ProfilCanvas", "core/scenes/ui/deck", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); m_ui.Initialise(); }
protected override IEnumerator Load() { UILoader <PopupInfoUI> loader = new UILoader <PopupInfoUI>(this, "PopupInfoUI", "core/scenes/ui/popup", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.Initialize(m_data); m_ui.get_gameObject().SetActive(true); yield return(m_ui.OpenCoroutine()); }
public override string GetChat() { textState = 0; UILoader.GetUIState <RichTextBox>().Visible = true; RichTextBox.ClearButtons(); SetData(); RichTextBox.AddButton("[]Next", Debug); return(""); }
public void zzBtnClicked() { if (!string.IsNullOrEmpty(SimpleData)) { UILoader.Show <string>(PanelName, SimpleData); } else { UILoader.Show(PanelName); } }