public void DestroySpecialHUD() { _currentMinigameHUD = MinigameHUD.None; if (!FF9StateSystem.MobilePlatform) { return; } Destroy(_currentMinigameHUDGameObject); }
public virtual void SetHUD(MinigameHUD minigameHUD) { MinigameHUD = minigameHUD; }
public float GetDuration() => MinigameHUD.GetDuration();
public static void CloseSpecialHUD(MinigameHUD HUDType) { Boolean flag = false; switch (HUDType) { case MinigameHUD.Chanbara: flag = UIManager.Field.IsDisplayChanbaraHUD(); break; case MinigameHUD.Auction: flag = UIManager.Field.IsDisplayAuctionHUD(); break; case MinigameHUD.MogTutorial: flag = UIManager.Field.IsDisplayTutorialHUD(); break; case MinigameHUD.JumpingRope: flag = UIManager.Field.IsDisplayJumpRopeHUD(); break; case MinigameHUD.Telescope: flag = UIManager.Field.IsDisplayTelescopeHUD(); break; case MinigameHUD.RacingHippaul: flag = UIManager.Field.IsDisplayRacingHippaulHUD(); break; case MinigameHUD.SwingACage: flag = UIManager.Field.IsDisplaySwingACageHUD(); break; case MinigameHUD.GetTheKey: flag = UIManager.Field.IsDisplayGetTheKeyHUD(); break; case MinigameHUD.ChocoHot: flag = UIManager.Field.IsDisplayChocoHot(); break; case MinigameHUD.ChocoHotInstruction: flag = UIManager.Field.IsDisplayChocoHotInstruction(); break; case MinigameHUD.PandoniumElevator: flag = UIManager.Field.IsDisplayPandoniumElevator(); break; } Boolean isEnable = HUDType != MinigameHUD.Telescope && HUDType != MinigameHUD.ChocoHot && PersistenSingleton <EventEngine> .Instance.GetUserControl(); if (flag) { EventHUD.CurrentHUD = MinigameHUD.None; UIManager.Field.DestroySpecialHUD(); PersistenSingleton <UIManager> .Instance.SetPlayerControlEnable(isEnable, (Action)null); } else if (!FF9StateSystem.MobilePlatform) { EventHUD.CurrentHUD = MinigameHUD.None; } }
public static void CheckSpecialHUDFromMesId(Int32 mesId, Boolean open) { EventEngine instance = PersistenSingleton <EventEngine> .Instance; if (instance == (UnityEngine.Object)null) { return; } if (instance.gMode == 1) { Boolean flag = false; MinigameHUD hudtype = MinigameHUD.None; if (FF9TextTool.FieldZoneId == 2) { flag = (mesId == 35); if (flag && !open) { EventService.OpenBasicControlTutorial(); return; } } else if (FF9TextTool.FieldZoneId == 7) { flag = (mesId == 113); if (flag) { hudtype = MinigameHUD.JumpingRope; } } else if (FF9TextTool.FieldZoneId == 22) { String currentLanguage = FF9StateSystem.Settings.CurrentLanguage; switch (currentLanguage) { case "Japanese": case "Italian": flag = (mesId == 402); break; case "English(US)": case "English(UK)": flag = (mesId == 401); break; case "French": case "German": flag = (mesId == 400); break; case "Spanish": flag = (mesId == 395); break; } if (flag) { hudtype = MinigameHUD.Telescope; } } else if (FF9TextTool.FieldZoneId == 23) { String currentLanguage = FF9StateSystem.Settings.CurrentLanguage; switch (currentLanguage) { case "Japanese": case "French": flag = (mesId == 153); goto IL_21A; case "Italian": flag = (mesId == 148); goto IL_21A; } flag = (mesId == 133); IL_21A: if (flag) { hudtype = MinigameHUD.Auction; } } else if (FF9TextTool.FieldZoneId == 33) { flag = (mesId == 233); if (!flag) { flag = (mesId == 246); } if (flag) { if (mesId == 233 && !open) { open = true; } else if (mesId == 246 && open) { open = false; } } if (flag) { hudtype = MinigameHUD.JumpingRope; } } else if (FF9TextTool.FieldZoneId == 70 || FF9TextTool.FieldZoneId == 741) { String currentLanguage = FF9StateSystem.Settings.CurrentLanguage; switch (currentLanguage) { case "English(US)": case "English(UK)": flag = (mesId == 203); goto IL_324; } flag = (mesId == 204); IL_324: if (flag) { hudtype = MinigameHUD.Auction; } } else if (FF9TextTool.FieldZoneId == 71) { String currentLanguage = FF9StateSystem.Settings.CurrentLanguage; switch (currentLanguage) { case "English(US)": case "English(UK)": flag = (mesId == 216); goto IL_3BB; } flag = (mesId == 217); IL_3BB: if (flag) { hudtype = MinigameHUD.MogTutorial; } } else if (FF9TextTool.FieldZoneId == 90) { if (open) { flag = (mesId == 147 || mesId == 148); } else { flag = (mesId == 148); } if (flag) { hudtype = MinigameHUD.RacingHippaul; } } else if (FF9TextTool.FieldZoneId == 166) { flag = (mesId == 105); if (flag) { hudtype = MinigameHUD.Auction; } } else if (FF9TextTool.FieldZoneId == 358) { String currentLanguage = FF9StateSystem.Settings.CurrentLanguage; switch (currentLanguage) { case "Japanese": case "French": flag = (mesId == 873); goto IL_51C; case "Spanish": flag = (mesId == 858); goto IL_51C; case "German": flag = (mesId == 874); goto IL_51C; case "Italian": flag = (mesId == 888); goto IL_51C; } flag = (mesId == 860); IL_51C: if (flag) { hudtype = MinigameHUD.Auction; } } else if (FF9TextTool.FieldZoneId == 740) { flag = (mesId == 249); if (!flag) { flag = (mesId == 250); } if (flag) { if (mesId == 249 && !open) { open = true; } else if (mesId == 250 && open) { open = false; } } if (flag) { hudtype = MinigameHUD.GetTheKey; } } else if (FF9TextTool.FieldZoneId == 945) { flag = (mesId == 34); if (!flag) { flag = (mesId == 35); } if (flag) { hudtype = MinigameHUD.ChocoHotInstruction; if (!open) { open = true; } } else { String currentLanguage = FF9StateSystem.Settings.CurrentLanguage; if (currentLanguage == "Japanese") { flag = (mesId == 250); goto IL_639; } flag = (mesId == 251); IL_639: if (flag) { hudtype = MinigameHUD.Auction; } } } else if (FF9TextTool.FieldZoneId == 946) { String currentLanguage = FF9StateSystem.Settings.CurrentLanguage; switch (currentLanguage) { case "English(US)": case "English(UK)": flag = (mesId == 250 || mesId == 251); if (!flag) { flag = (mesId == 264); } if (flag) { if ((mesId == 250 || mesId == 251) && !open) { open = true; } else if (mesId == 264 && open) { open = false; } } goto IL_789; } flag = (mesId == 257 || mesId == 258); if (!flag) { flag = (mesId == 271); } if (flag) { if ((mesId == 257 || mesId == 258) && !open) { open = true; } else if (mesId == 271 && open) { open = false; } } IL_789: if (flag) { hudtype = MinigameHUD.JumpingRope; } } if (flag) { if (open) { EventHUD.OpenSpecialHUD(hudtype); } else { EventHUD.CloseSpecialHUD(hudtype); } } } }
public void DisplaySpecialHUD(MinigameHUD minigameHUD) { if (!FF9StateSystem.MobilePlatform) { return; } _currentMinigameHUD = minigameHUD; switch (minigameHUD) { case MinigameHUD.Chanbara: if (_chanbaraHUDPrefab == null) { _chanbaraHUDPrefab = Resources.Load("EmbeddedAsset/UI/Prefabs/Chanbara HUD Container") as GameObject; } _currentMinigameHUDGameObject = NGUITools.AddChild(MinigameHUDContainer, _chanbaraHUDPrefab); break; case MinigameHUD.Auction: case MinigameHUD.PandoniumElevator: if (_auctionHUDPrefab == null) { _auctionHUDPrefab = Resources.Load("EmbeddedAsset/UI/Prefabs/Auction HUD Container") as GameObject; } _currentMinigameHUDGameObject = NGUITools.AddChild(MinigameHUDContainer, _auctionHUDPrefab); if (minigameHUD == MinigameHUD.PandoniumElevator) { _currentMinigameHUDGameObject.transform.GetChild(0).gameObject.SetActive(false); _currentMinigameHUDGameObject.transform.GetChild(2).gameObject.SetActive(false); } StartCoroutine(SetAuctionHUDDepth(_currentMinigameHUDGameObject)); break; case MinigameHUD.MogTutorial: if (_mogTutorialHUDPrefab == null) { _mogTutorialHUDPrefab = Resources.Load("EmbeddedAsset/UI/Prefabs/Mognet Tutorial HUD Container") as GameObject; } _currentMinigameHUDGameObject = NGUITools.AddChild(MinigameHUDContainer, _mogTutorialHUDPrefab); break; case MinigameHUD.JumpingRope: case MinigameHUD.Telescope: case MinigameHUD.GetTheKey: case MinigameHUD.ChocoHot: if (_jumpingRopeHUDPrefab == null) { _jumpingRopeHUDPrefab = Resources.Load("EmbeddedAsset/UI/Prefabs/Jumping Rope HUD Container") as GameObject; } _currentMinigameHUDGameObject = NGUITools.AddChild(MinigameHUDContainer, _jumpingRopeHUDPrefab); if (_currentMinigameHUD == MinigameHUD.ChocoHot) { Transform child = _currentMinigameHUDGameObject.transform.GetChild(0); child.GetComponent <OnScreenButton>().KeyCommand = Control.Special; UISprite component1 = child.GetComponent <UISprite>(); UIButton component2 = child.GetComponent <UIButton>(); component1.spriteName = "button_chocobo_dig_idle"; component2.normalSprite = component1.spriteName; component2.pressedSprite = "button_chocobo_dig_act"; } break; case MinigameHUD.RacingHippaul: if (_racingHippaulHUDPrefab == null) { _racingHippaulHUDPrefab = Resources.Load("EmbeddedAsset/UI/Prefabs/Racing Hippaul HUD Container") as GameObject; } _currentMinigameHUDGameObject = NGUITools.AddChild(MinigameHUDContainer, _racingHippaulHUDPrefab); if (FF9StateSystem.Settings.CurrentLanguage == "Japanese") { _currentMinigameHUDGameObject.transform.GetChild(1).GetComponent <EventButton>().KeyCommand = Control.Confirm; } break; case MinigameHUD.SwingACage: if (_swingACageHUDPrefab == null) { _swingACageHUDPrefab = Resources.Load("EmbeddedAsset/UI/Prefabs/Swing a Cage HUD Container") as GameObject; } _currentMinigameHUDGameObject = NGUITools.AddChild(MinigameHUDContainer, _swingACageHUDPrefab); break; case MinigameHUD.ChocoHotInstruction: if (_chocoHotInstructionHUDGameObject == null) { _chocoHotInstructionHUDGameObject = Resources.Load("EmbeddedAsset/UI/Prefabs/Choco Hot Instruction HUD Container") as GameObject; } _currentMinigameHUDGameObject = NGUITools.AddChild(MinigameHUDContainer, _chocoHotInstructionHUDGameObject); _currentMinigameHUDGameObject.GetComponent <UIPanel>().depth = Dialog.DialogAdditionalRaiseDepth + Dialog.DialogMaximumDepth - Convert.ToInt32(Dialog.WindowID.ID0) * 2 + 2; break; } if (!(_currentMinigameHUDGameObject != null)) { return; } UIWidget component3 = _currentMinigameHUDGameObject.GetComponent <UIWidget>(); Int32 num = Singleton <DialogManager> .Instance.Widget.depth + 1; if (component3 != null) { component3.depth = num++; } foreach (Component component in _currentMinigameHUDGameObject.transform) { UIWidget widget = component.GetComponent <UIWidget>(); if (widget != null) { widget.depth = num; } } }
public static UInt32 ReadInput() { UInt32 num = 0u; if (!EventInput.isProcessingInput) { EventInput.ResetWorldTriggerButton(); return(num); } Int32 fldMapNo = (Int32)FF9StateSystem.Common.FF9.fldMapNo; Int32 gMode = PersistenSingleton <EventEngine> .Instance.gMode; Boolean isKeyboardOrJoystickInput = EventInput.IsKeyboardOrJoystickInput; if (Singleton <BubbleUI> .Instance.IsActive) { if (gMode == 1) { if (fldMapNo == 1420 && EventInput.CheckLadderFlag()) { num = EventInput.ProcessInput(false, false); } else { num = EventInput.ProcessInput(false, true); } } else if (gMode == 3) { if (FF9StateSystem.MobilePlatform) { num = EventInput.ProcessInput(false, isKeyboardOrJoystickInput); EventInput.GetWorldTriggerButton(ref num); } else { num = EventInput.ProcessInput(false, true); } } } else if (EventHUD.CurrentHUD != MinigameHUD.None) { MinigameHUD currentHUD = EventHUD.CurrentHUD; if (currentHUD != MinigameHUD.Chanbara) { if (currentHUD != MinigameHUD.RacingHippaul) { num = EventInput.ProcessInput(false, true); } else { num = EventInput.ProcessInput(false, false); } } else { num = EventInput.ProcessInput(true, true); num &= EventInput.ChanbaraMask; if (FF9StateSystem.MobilePlatform) { if ((num & 8u) > 0u) { EventInput.IsNeedAddStartSignal = true; } else if (EventInput.addStartSignal > 0) { num |= 8u; EventInput.addStartSignal--; EventInput.InputLog("Extra Start"); } } } } else if (fldMapNo == 606) { if (EventHUD.CurrentHUD == MinigameHUD.Telescope) { num = EventInput.ProcessInput(false, true); } } else if (fldMapNo == 2204 && TimerUI.Enable) { num = EventInput.ProcessInput(false, false); } else if (fldMapNo == 1607) { num = EventInput.ProcessInput(false, false); } else if (fldMapNo == 1420) { num = EventInput.ProcessInput(false, true); } else if (fldMapNo == 1422) { num = EventInput.ProcessInput(false, true); } else { Dialog mognetDialog = Singleton <DialogManager> .Instance.GetMognetDialog(); if (mognetDialog != (UnityEngine.Object)null) { if (mognetDialog.IsChoiceReady) { num = EventInput.ProcessInput(false, true); } } else if (FF9StateSystem.MobilePlatform) { num = EventInput.ProcessInput(false, isKeyboardOrJoystickInput); if (isKeyboardOrJoystickInput) { UIManager.Input.ResetTriggerEvent(); } EventInput.GetWorldTriggerButton(ref num); } else { num = EventInput.ProcessInput(false, true); } } num |= EventInput.eventButtonInput; if (EventInput.isDialogConfirm) { num |= EventInput.ConfirmMask; EventInput.isDialogConfirm = false; } if (HonoBehaviorSystem.Instance.IsFastForwardModeActive()) { if (FF9StateSystem.MobilePlatform) { if (fldMapNo == 909 || fldMapNo == 1909) { num = EventInput.FastForwardProcess(gMode, fldMapNo, num); } } else { num = EventInput.FastForwardProcess(gMode, fldMapNo, num); } } num &= ~EventInput.PSXCntlPadMask[0]; if (FF9StateSystem.MobilePlatform && gMode == 3 && EventCollision.IsRidingChocobo()) { if ((num & 524288u) > 0u || (num & 32768u) > 0u) { EventInput.isPressedDig = true; } else if ((num & 16777216u) > 0u || (num & 4096u) > 0u) { EventInput.isPressedDig = false; } else if ((num & EventInput.Lx) > 0u || (num & 16384u) > 0u) { EventInput.isPressedDig = false; } else if ((num & 1u) > 0u || (num & 1u) > 0u) { EventInput.isPressedDig = false; } } if (gMode == 3 && EventEngineUtils.IsMogCalled(PersistenSingleton <EventEngine> .Instance)) { ff9.w_isMogActive = true; } if (gMode == 3 && EMinigame.CheckBeachMinigame() && EventCollision.IsWorldTrigger() && (num & CancelMask) > 0u) { num &= ~CancelMask; EventInput.InputLog("Remove cancel mask for <SQEX> #2893"); } EventInput.eventButtonInput = 0u; EventInput.ResetWorldTriggerButton(); return(num); }
public void DisplaySpecialHUD(MinigameHUD minigameHUD) { if (FF9StateSystem.MobilePlatform) { this.currentMinigameHUD = minigameHUD; switch (minigameHUD) { case MinigameHUD.Chanbara: if (this.chanbaraHUDPrefab == null) { this.chanbaraHUDPrefab = (Resources.Load("EmbeddedAsset/UI/Prefabs/Chanbara HUD Container") as GameObject); } this.currentMinigameHUDGameObject = NGUITools.AddChild(this.MinigameHUDContainer, this.chanbaraHUDPrefab); break; case MinigameHUD.Auction: case MinigameHUD.PandoniumElevator: if (this.auctionHUDPrefab == null) { this.auctionHUDPrefab = (Resources.Load("EmbeddedAsset/UI/Prefabs/Auction HUD Container") as GameObject); } this.currentMinigameHUDGameObject = NGUITools.AddChild(this.MinigameHUDContainer, this.auctionHUDPrefab); if (minigameHUD == MinigameHUD.PandoniumElevator) { this.currentMinigameHUDGameObject.transform.GetChild(0).gameObject.SetActive(false); this.currentMinigameHUDGameObject.transform.GetChild(2).gameObject.SetActive(false); } base.StartCoroutine(this.SetAuctionHUDDepth(this.currentMinigameHUDGameObject)); break; case MinigameHUD.MogTutorial: if (this.mogTutorialHUDPrefab == null) { this.mogTutorialHUDPrefab = (Resources.Load("EmbeddedAsset/UI/Prefabs/Mognet Tutorial HUD Container") as GameObject); } this.currentMinigameHUDGameObject = NGUITools.AddChild(this.MinigameHUDContainer, this.mogTutorialHUDPrefab); break; case MinigameHUD.JumpingRope: case MinigameHUD.Telescope: case MinigameHUD.GetTheKey: case MinigameHUD.ChocoHot: { if (this.jumpingRopeHUDPrefab == null) { this.jumpingRopeHUDPrefab = (Resources.Load("EmbeddedAsset/UI/Prefabs/Jumping Rope HUD Container") as GameObject); } this.currentMinigameHUDGameObject = NGUITools.AddChild(this.MinigameHUDContainer, this.jumpingRopeHUDPrefab); MinigameHUD minigameHUD2 = this.currentMinigameHUD; if (minigameHUD2 == MinigameHUD.ChocoHot) { Transform child = this.currentMinigameHUDGameObject.transform.GetChild(0); child.GetComponent <OnScreenButton> ().KeyCommand = Control.Special; UISprite component = child.GetComponent <UISprite> (); UIButton component2 = child.GetComponent <UIButton> (); component.spriteName = "button_chocobo_dig_idle"; component2.normalSprite = component.spriteName; component2.pressedSprite = "button_chocobo_dig_act"; } break; } case MinigameHUD.RacingHippaul: if (this.racingHippaulHUDPrefab == null) { this.racingHippaulHUDPrefab = (Resources.Load("EmbeddedAsset/UI/Prefabs/Racing Hippaul HUD Container") as GameObject); } this.currentMinigameHUDGameObject = NGUITools.AddChild(this.MinigameHUDContainer, this.racingHippaulHUDPrefab); if (FF9StateSystem.Settings.CurrentLanguage == "Japanese") { this.currentMinigameHUDGameObject.transform.GetChild(1).GetComponent <EventButton> ().KeyCommand = Control.Confirm; } break; case MinigameHUD.SwingACage: if (this.swingACageHUDPrefab == null) { this.swingACageHUDPrefab = (Resources.Load("EmbeddedAsset/UI/Prefabs/Swing a Cage HUD Container") as GameObject); } this.currentMinigameHUDGameObject = NGUITools.AddChild(this.MinigameHUDContainer, this.swingACageHUDPrefab); break; case MinigameHUD.ChocoHotInstruction: if (this.chocoHotInstructionHUDGameObject == null) { this.chocoHotInstructionHUDGameObject = (Resources.Load("EmbeddedAsset/UI/Prefabs/Choco Hot Instruction HUD Container") as GameObject); } this.currentMinigameHUDGameObject = NGUITools.AddChild(this.MinigameHUDContainer, this.chocoHotInstructionHUDGameObject); this.currentMinigameHUDGameObject.GetComponent <UIPanel> ().depth = (int)(Dialog.DialogAdditionalRaiseDepth + Dialog.DialogMaximumDepth) - Convert.ToInt32(Dialog.WindowID.ID0) * 2 + 2; break; } if (this.currentMinigameHUDGameObject != null) { UIWidget component3 = this.currentMinigameHUDGameObject.GetComponent <UIWidget> (); int depth = Singleton <DialogManager> .Instance.Widget.depth + 1; if (component3 != null) { component3.depth = depth++; } foreach (object obj in this.currentMinigameHUDGameObject.transform) { Transform transform = (Transform)obj; component3 = transform.GetComponent <UIWidget> (); if (component3 != null) { component3.depth = depth; } } } } }