using System; using System.Collections; using System.Collections.Generic; using DarkTonic.MasterAudio; using PixelCrushers.DialogueSystem; using TMPro; using UnityEngine; using UnityEngine.UI; // Token: 0x020000AF RID: 175 public class HUD : MonoBehaviour { // Token: 0x06000FDF RID: 4063 RVA: 0x00132220 File Offset: 0x00130420 private void Awake() { this.canvas.enabled = true; this.windowsCanvas.enabled = true; this.feedCanvas.enabled = true; this.SwitchController(false); } // Token: 0x06000FE0 RID: 4064 RVA: 0x00132250 File Offset: 0x00130450 private void Start() { Links.x.hudControl = this; this.itemInfo.gameObject.SetActive(false); this.party = Links.x.party; this.portraitOrder = Links.x.portraitOrder; this.hudAnimator.enabled = false; this.hudState = true; this.attackTimerAnimator.gameObject.SetActive(true); this.demoMessage.SetActive(false); this.demoIntroAnimator.gameObject.SetActive(false); this.badgeControllerText.SetActive(false); this.skipIntro.SetActive(false); this.ClosePinnedNote(); this.tipsMenu.SetActive(false); this.boroCard.gameObject.SetActive(false); this.JoyBox(false); foreach (Windows windows in this.windows) { windows.GetStartPositions(); } this.startStaminaColor = this.stamina.color; for (int i = 0; i < this.dockButtons.Count; i++) { } Links.x.gameCard.gameObject.SetActive(true); Links.x.itemCard.gameObject.SetActive(true); this.groupHud = false; for (int j = 0; j < this.portraits.Count; j++) { this.portraits[j].gameObject.SetActive(false); } this.sheepPedestal.SetActive(false); Links.x.keyboardScript.gameObject.SetActive(false); this.SetModalWindowState(true, false); Links.x.inspectTextAnimator.gameObject.SetActive(false); this.ToggleAttackTimer(false); this.CloseMenuSwitcher(); if (this.tutorial) { this.tutorial.SetActive(false); } this.hidingHud = false; this.ClearRally(); Links.x.pocketWheel.rallyWheel.SetActive(false); Links.x.pocketWheel.rallyText.SetActive(false); } // Token: 0x06000FE1 RID: 4065 RVA: 0x00132480 File Offset: 0x00130680 public void JoyBox(bool state) { if (Links.x.mk) { state = false; } this.joyRT.gameObject.SetActive(state); } // Token: 0x06000FE2 RID: 4066 RVA: 0x001324A4 File Offset: 0x001306A4 public void JoyBoxIcon(bool state, bool mainMenu, string type) { if (!mainMenu) { this.joyIconMM.enabled = false; this.joyIconHolderMM.enabled = false; this.joyIcon.enabled = state; this.joyIconHolder.enabled = state; if (state) { int num = 0; if (type == "A" || type == "Pocket") { num = 0; } if (type == "Y") { num = 1; } if (type == "Joy") { num = 2; } if (type == "JoyL") { num = 3; } if (Links.x.gameplay.currentSpriteSheetAsset <= 1) { this.joyIcon.sprite = this.xboxIcons[num]; } else if (Links.x.gameplay.currentSpriteSheetAsset == 2) { this.joyIcon.sprite = this.playstationIcons[num]; } else if (Links.x.gameplay.currentSpriteSheetAsset == 3) { this.joyIcon.sprite = this.switchIcons[num]; } else if (Links.x.gameplay.currentSpriteSheetAsset == 4) { this.joyIcon.sprite = this.steamIcons[num]; } } if (type.Contains("Pocket")) { if (type == "PocketNone") { this.joyIcon.enabled = false; } this.joyBorder.enabled = false; this.joyIconHolder.enabled = false; } else { this.joyBorder.enabled = true; } if (Links.x.characterSheet.open && Links.x.inventory.repairing) { this.joyIcon.sprite = this.repairing; } if (Links.x.characterSheet.open && Links.x.inventory.mineralizing) { this.joyIcon.sprite = this.mineralizing; return; } } else { this.joyBorder.enabled = false; this.joyIcon.enabled = false; this.joyIconHolder.enabled = false; this.joyIconMM.enabled = true; this.joyIconHolderMM.enabled = true; int num2 = 0; if (Links.x.gameplay.currentSpriteSheetAsset <= 1) { this.joyIconMM.sprite = this.xboxIcons[num2]; return; } if (Links.x.gameplay.currentSpriteSheetAsset == 2) { this.joyIconMM.sprite = this.playstationIcons[num2]; return; } if (Links.x.gameplay.currentSpriteSheetAsset == 3) { this.joyIconMM.sprite = this.switchIcons[num2]; return; } if (Links.x.gameplay.currentSpriteSheetAsset == 4) { this.joyIconMM.sprite = this.steamIcons[num2]; } } } // Token: 0x06000FE3 RID: 4067 RVA: 0x00132760 File Offset: 0x00130960 public Vector3 WorldToUISpaceAnchor(Vector3 screenPos) { Vector3 vector = screenPos; vector.z = 0f; vector.x = vector.x * (Links.x.canvasRT.sizeDelta.x / (float)Screen.width) - Links.x.canvasRT.sizeDelta.x / 2f; vector.y = vector.y * (Links.x.canvasRT.sizeDelta.y / (float)Screen.height) - Links.x.canvasRT.sizeDelta.y / 2f; return vector; } // Token: 0x06000FE4 RID: 4068 RVA: 0x00132804 File Offset: 0x00130A04 public void SetJoyBox(UITriggerButton trigBtn) { if (!trigBtn) { return; } bool flag = false; if (Records.x.mainMenuOpen && !Links.x.saveLoad.open && !Links.x.options.contents1.activeSelf) { flag = true; } if (trigBtn.isSlider) { this.JoyBoxIcon(true, flag, "Joy"); } else if (trigBtn.isScrollBar) { this.JoyBoxIcon(true, flag, "JoyL"); } else if (!trigBtn.customIcon && (trigBtn.selectOnly || trigBtn.noIcon)) { this.JoyBoxIcon(false, flag, ""); } else if (trigBtn.interacting && !trigBtn.clicking && !trigBtn.customIcon) { this.JoyBoxIcon(true, flag, "Y"); } else if (trigBtn.interacting && trigBtn.clicking) { if (trigBtn.gameObject.name.Contains("Pin_")) { if (trigBtn.gameObject.GetComponent().inBox) { this.JoyBoxIcon(true, flag, "Y"); } else { this.JoyBoxIcon(true, flag, "A"); } } else { this.JoyBoxIcon(true, flag, "A"); } } else if (trigBtn.customIcon) { if (Links.x.creation) { if (trigBtn.gameObject.transform.parent.gameObject.name == "Skill Hovers") { if (Links.x.creation.HasTokenSkill(trigBtn.gameObject.name)) { this.JoyBoxIcon(true, flag, "A"); } else if (Links.x.creation.HasFreeSkillToken()) { this.JoyBoxIcon(true, flag, "A"); } else { this.JoyBoxIcon(false, flag, ""); } } if (trigBtn.gameObject.transform.parent.gameObject.name == "Stats & Skills") { if (Links.x.creation.HasTokenStat(trigBtn.gameObject.name)) { this.JoyBoxIcon(true, flag, "A"); } else if (Links.x.creation.HasFreeStatToken()) { this.JoyBoxIcon(true, flag, "A"); } else { this.JoyBoxIcon(false, flag, ""); } } if (trigBtn.gameObject.name.Contains("Archetypes Button") || trigBtn.gameObject.name.Contains("Finish")) { this.JoyBoxIcon(true, flag, "A"); } } else { string name = trigBtn.gameObject.name; if (name.Contains("Spell Song Word")) { if (Links.x.characterSheet.open) { this.JoyBoxIcon(true, flag, "A"); } else { this.JoyBoxIcon(true, flag, "Y"); } } if (name.Contains("Level Up") || name.Contains("Autocast") || name.Contains("Pin")) { this.JoyBoxIcon(true, flag, "A"); } if (trigBtn.gameObject.transform.parent) { if (trigBtn.gameObject.transform.parent.gameObject.name == "Equip Slots") { ItemEquipped component = trigBtn.gameObject.GetComponent(); if (component) { if (component.buddyItemEquipped3D) { this.JoyBoxIcon(true, flag, "A"); } else { this.JoyBoxIcon(false, flag, ""); } } else { this.JoyBoxIcon(true, flag, "A"); } } if (trigBtn.gameObject.transform.parent.gameObject.name == "Skill Hovers") { if (Links.x.characterSheet.levelUpMenu) { if (Links.x.characterSheet.levelUpMenu.HasTokens() || Links.x.characterSheet.levelUpMenu.IsToken(trigBtn.gameObject)) { this.JoyBoxIcon(true, flag, "A"); } else { this.JoyBoxIcon(false, flag, ""); } } else { this.JoyBoxIcon(false, flag, ""); } } } if (name.Contains("Aura") || name.Contains("Strength") || name.Contains("Agility") || name.Contains("Dexterity") || name.Contains("Pagan") || name.Contains("Sensory")) { if (Links.x.characterSheet.levelUpMenu) { this.JoyBoxIcon(true, flag, "A"); } else { this.JoyBoxIcon(false, flag, ""); } } if (Links.x.pocketWheel.open && trigBtn.gameObject.transform.parent.gameObject.transform.parent.gameObject.name == "Pocket") { if (trigBtn.noIcon) { this.JoyBoxIcon(true, false, "PocketNone"); } else { this.JoyBoxIcon(true, false, "Pocket"); } } } } else { this.JoyBoxIcon(true, flag, "A"); } this.JoyBounds(trigBtn.rt, trigBtn.boxOffset, false); this.JoyBox(true); } // Token: 0x06000FE5 RID: 4069 RVA: 0x00132D58 File Offset: 0x00130F58 public void SetJoyBox(RectTransform rt, Vector4 offset, bool showIcon, bool isInventoryItem) { if (showIcon) { if (Links.x.inventory.dragging && isInventoryItem) { this.JoyBoxIcon(true, false, "JoyL"); } else { this.JoyBoxIcon(true, false, "A"); } } else { this.JoyBoxIcon(false, false, ""); } this.JoyBounds(rt, offset, isInventoryItem); this.JoyBox(true); } // Token: 0x06000FE6 RID: 4070 RVA: 0x00132DB8 File Offset: 0x00130FB8 public void JoyBounds(RectTransform rt, Vector4 offset, bool isInventoryItem) { if (!rt) { return; } Vector3[] array = new Vector3[4]; rt.GetWorldCorners(array); Vector2 vector = RectTransformUtility.WorldToScreenPoint(Links.x.menuCamera, array[0]); Vector2 vector2 = RectTransformUtility.WorldToScreenPoint(Links.x.menuCamera, array[1]); Vector2 vector3 = RectTransformUtility.WorldToScreenPoint(Links.x.menuCamera, array[2]); vector = this.WorldToUISpaceAnchor(vector); vector2 = this.WorldToUISpaceAnchor(vector2); vector3 = this.WorldToUISpaceAnchor(vector3); float num = vector2.y - vector.y; float num2 = vector3.x - vector.x; Vector3 vector4 = vector; vector4.x += num2 / 2f; vector4.y += num / 2f; vector4.x += offset.x; vector4.y += offset.y; num2 += offset.z; num += offset.w; if (isInventoryItem) { num2 = Mathf.Round(num2 / 58f) * 58f; num = Mathf.Round(num / 56f) * 56f; } this.joyRT.sizeDelta = new Vector2(num2, num); this.joyRT.localPosition = vector4; } // Token: 0x06000FE7 RID: 4071 RVA: 0x00132F29 File Offset: 0x00131129 public void ToggleControllerControls(bool state) { this.turnOnForController[0].SetActive(state); } // Token: 0x06000FE8 RID: 4072 RVA: 0x00132F40 File Offset: 0x00131140 public void SwitchController(bool joystick) { foreach (GameObject gameObject in this.turnOffForController) { if (!joystick) { gameObject.SetActive(true); } else { gameObject.SetActive(false); } } foreach (GameObject gameObject2 in this.turnOnForController) { gameObject2.SetActive(joystick); } if (joystick) { Links.x.partyColliderAdventure.ToggleController(); Links.x.inspectTextAnimator.gameObject.GetComponent().anchoredPosition3D = new Vector3(100000f, 0f, -100000f); if (Links.x.inspectTextAnimator.gameObject.activeSelf) { this.ClickedInspectButton(); } } else { this.JoyBox(false); Links.x.inspectTextAnimator.gameObject.GetComponent().anchoredPosition3D = new Vector3(-10f, -10f, 0f); } if (Links.x.creation) { Links.x.creation.Controllers(joystick); } if (!joystick) { Shader.SetGlobalVector("_JoystickDirection", Links.x.gameplay.farPosition); } if (joystick) { this.pinnedNoteClose.SetActive(false); } else { this.pinnedNoteClose.SetActive(true); } Links.x.inventory.groundBag.itemLabelGrid.Controller(joystick); Links.x.fellowship.SetPortraitHotkeys(joystick); } // Token: 0x06000FE9 RID: 4073 RVA: 0x001330FC File Offset: 0x001312FC public void AddRemoveInteraction(bool state, Character nearCharacter, BreakableActions nearBreak, ChestActions nearChest, PuzzleActions nearPuzzle, DoorActions nearDoor, MapExitActions nearMap, Boat nearBoat) { bool flag = true; if (Links.x.mk) { flag = false; } if (nearCharacter) { int num = this.nearTalkCharacters.IndexOf(nearCharacter); if (num == -1 && state) { this.nearTalkCharacters.Add(nearCharacter); AnimateButton animateButton = this.SetupNearIcon(); this.nearBtnCharsUsed.Add(animateButton); InteractionIconAnimator component = animateButton.gameObject.GetComponent(); if (nearCharacter.stats.dialogueFile == "Quip") { component.animationType = InteractionIconAnimator.type.Quip; } else { component.animationType = InteractionIconAnimator.type.Talk; } component.GetSpriteList(); component.enabled = false; animateButton.gameObject.transform.GetChild(0).gameObject.GetComponent().enabled = false; if (Links.x.joy) { flag = Links.x.partyColliderAdventure.InRange(nearCharacter); } if (flag) { component.gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component.gameObject.transform.parent.transform.localScale = Vector3.zero; } } if (num > -1 && !state) { this.nearTalkCharacters.RemoveAt(num); this.nearBtns.Add(this.nearBtnCharsUsed[num]); this.nearBtnCharsUsed[num].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnCharsUsed.RemoveAt(num); } } if (nearBoat) { int num2 = this.nearBoats.IndexOf(nearBoat); if (num2 == -1 && state) { this.nearBoats.Add(nearBoat); AnimateButton animateButton2 = this.SetupNearIcon(); this.nearBtnBoatsUsed.Add(animateButton2); InteractionIconAnimator component2 = animateButton2.gameObject.GetComponent(); component2.animationType = InteractionIconAnimator.type.Use; component2.GetSpriteList(); component2.enabled = false; animateButton2.gameObject.transform.GetChild(0).gameObject.GetComponent().enabled = false; if (Links.x.joy) { flag = Links.x.partyColliderAdventure.InRange(nearBoat); } if (flag) { component2.gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component2.gameObject.transform.parent.transform.localScale = Vector3.zero; } } if (num2 > -1 && !state) { this.nearBoats.RemoveAt(num2); this.nearBtns.Add(this.nearBtnBoatsUsed[num2]); this.nearBtnBoatsUsed[num2].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnBoatsUsed.RemoveAt(num2); } } if (nearBreak) { int num3 = this.nearBreakables.IndexOf(nearBreak); if (num3 == -1 && state) { this.nearBreakables.Add(nearBreak); AnimateButton animateButton3 = this.SetupNearIcon(); this.nearBtnBreaksUsed.Add(animateButton3); InteractionIconAnimator component3 = animateButton3.gameObject.GetComponent(); if (nearBreak.resourceLocation == -1) { component3.animationType = InteractionIconAnimator.type.Kick; } else { component3.animationType = InteractionIconAnimator.type.Use; } component3.GetSpriteList(); component3.enabled = false; animateButton3.gameObject.transform.GetChild(0).gameObject.GetComponent().enabled = false; if (Links.x.joy) { flag = Links.x.partyColliderAdventure.InRange(nearBreak); } if (flag) { component3.gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component3.gameObject.transform.parent.transform.localScale = Vector3.zero; } } if (num3 > -1 && !state) { this.nearBreakables.RemoveAt(num3); this.nearBtns.Add(this.nearBtnBreaksUsed[num3]); this.nearBtnBreaksUsed[num3].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnBreaksUsed.RemoveAt(num3); } } if (nearChest) { int num4 = this.nearChests.IndexOf(nearChest); if (num4 == -1 && state) { this.nearChests.Add(nearChest); AnimateButton animateButton4 = this.SetupNearIcon(); this.nearBtnChestsUsed.Add(animateButton4); InteractionIconAnimator component4 = animateButton4.gameObject.GetComponent(); if (nearChest.chest.locked) { component4.animationType = InteractionIconAnimator.type.Unlock; } else { component4.animationType = InteractionIconAnimator.type.Use; } component4.GetSpriteList(); component4.enabled = false; animateButton4.gameObject.transform.GetChild(0).gameObject.GetComponent().enabled = false; if (Links.x.joy) { flag = Links.x.partyColliderAdventure.InRange(nearChest); } if (flag) { component4.gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component4.gameObject.transform.parent.transform.localScale = Vector3.zero; } } if (num4 > -1 && !state) { this.nearChests.RemoveAt(num4); this.nearBtns.Add(this.nearBtnChestsUsed[num4]); this.nearBtnChestsUsed[num4].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnChestsUsed.RemoveAt(num4); } } if (nearPuzzle) { int num5 = this.nearPuzzles.IndexOf(nearPuzzle); if (num5 == -1 && state) { this.nearPuzzles.Add(nearPuzzle); AnimateButton animateButton5 = this.SetupNearIcon(); this.nearBtnPuzzUsed.Add(animateButton5); InteractionIconAnimator component5 = animateButton5.gameObject.GetComponent(); component5.animationType = InteractionIconAnimator.type.Use; component5.GetSpriteList(); component5.enabled = false; animateButton5.gameObject.transform.GetChild(0).gameObject.GetComponent().enabled = false; if (Links.x.joy) { flag = Links.x.partyColliderAdventure.InRange(nearPuzzle); } if (flag) { component5.gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component5.gameObject.transform.parent.transform.localScale = Vector3.zero; } } if (num5 > -1 && !state) { this.nearPuzzles.RemoveAt(num5); this.nearBtns.Add(this.nearBtnPuzzUsed[num5]); this.nearBtnPuzzUsed[num5].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnPuzzUsed.RemoveAt(num5); } } if (nearDoor) { int num6 = this.nearDoors.IndexOf(nearDoor); if (num6 == -1 && state) { this.nearDoors.Add(nearDoor); AnimateButton animateButton6 = this.SetupNearIcon(); this.nearBtnDoorsUsed.Add(animateButton6); InteractionIconAnimator component6 = animateButton6.gameObject.GetComponent(); component6.animationType = InteractionIconAnimator.type.Unlock; if (!nearDoor.door.locked) { component6.animationType = InteractionIconAnimator.type.Lockpick; } component6.GetSpriteList(); component6.enabled = false; animateButton6.gameObject.transform.GetChild(0).gameObject.GetComponent().enabled = false; if (Links.x.joy) { flag = Links.x.partyColliderAdventure.InRange(nearDoor); } if (flag) { component6.gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component6.gameObject.transform.parent.transform.localScale = Vector3.zero; } } if (num6 > -1 && !state) { this.nearDoors.RemoveAt(num6); this.nearBtns.Add(this.nearBtnDoorsUsed[num6]); this.nearBtnDoorsUsed[num6].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnDoorsUsed.RemoveAt(num6); } } if (nearMap) { int num7 = this.nearMapExits.IndexOf(nearMap); if (num7 == -1 && state) { this.nearMapExits.Add(nearMap); AnimateButton animateButton7 = this.SetupNearIcon(); this.nearBtnExitsUsed.Add(animateButton7); InteractionIconAnimator component7 = animateButton7.gameObject.GetComponent(); component7.animationType = InteractionIconAnimator.type.Use; component7.GetSpriteList(); component7.enabled = false; animateButton7.gameObject.transform.GetChild(0).gameObject.GetComponent().enabled = false; if (Links.x.joy) { flag = Links.x.partyColliderAdventure.InRange(nearMap); } if (flag) { component7.gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component7.gameObject.transform.parent.transform.localScale = Vector3.zero; } } if (num7 > -1 && !state) { this.nearMapExits.RemoveAt(num7); this.nearBtns.Add(this.nearBtnExitsUsed[num7]); this.nearBtnExitsUsed[num7].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnExitsUsed.RemoveAt(num7); } } } // Token: 0x06000FEA RID: 4074 RVA: 0x00133B5C File Offset: 0x00131D5C public AnimateButton SetupNearIcon() { AnimateButton animateButton; if (this.nearBtns.Count > 0) { animateButton = this.nearBtns[0]; this.nearBtns.RemoveAt(0); } else { animateButton = Object.Instantiate(this.nearBtnPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity, this.interactionBtnsTransform).transform.GetChild(0).gameObject.GetComponent(); } animateButton.GetParentRT(); animateButton.gameObject.transform.parent.gameObject.SetActive(true); return animateButton; } // Token: 0x06000FEB RID: 4075 RVA: 0x00133BF6 File Offset: 0x00131DF6 public bool CharacterIsNear(Character c) { return this.nearTalkCharacters.Contains(c); } // Token: 0x06000FEC RID: 4076 RVA: 0x00133C09 File Offset: 0x00131E09 public bool BreakableIsNear(BreakableActions c) { return this.nearBreakables.Contains(c); } // Token: 0x06000FED RID: 4077 RVA: 0x00133C1C File Offset: 0x00131E1C public bool ChestIsNear(ChestActions c) { return this.nearChests.Contains(c); } // Token: 0x06000FEE RID: 4078 RVA: 0x00133C2F File Offset: 0x00131E2F public bool PuzzleIsNear(PuzzleActions c) { return this.nearPuzzles.Contains(c); } // Token: 0x06000FEF RID: 4079 RVA: 0x00133C42 File Offset: 0x00131E42 public bool DoorIsNear(DoorActions c) { return this.nearDoors.Contains(c); } // Token: 0x06000FF0 RID: 4080 RVA: 0x00133C55 File Offset: 0x00131E55 public bool ExitIsNear(MapExitActions c) { return this.nearMapExits.Contains(c); } // Token: 0x06000FF1 RID: 4081 RVA: 0x00133C68 File Offset: 0x00131E68 public bool BoatIsNear(Boat c) { return this.nearBoats.Contains(c); } // Token: 0x06000FF2 RID: 4082 RVA: 0x00133C7C File Offset: 0x00131E7C public void ClearOnReload() { for (int i = 0; i < this.nearBtnExitsUsed.Count; i++) { if (this.nearBtnExitsUsed[i]) { this.nearBtnExitsUsed[i].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtns.Add(this.nearBtnExitsUsed[i]); } } for (int j = 0; j < this.nearBtnDoorsUsed.Count; j++) { if (this.nearBtnDoorsUsed[j]) { this.nearBtnDoorsUsed[j].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtns.Add(this.nearBtnDoorsUsed[j]); } } for (int k = 0; k < this.nearBtnPuzzUsed.Count; k++) { if (this.nearBtnPuzzUsed[k]) { this.nearBtnPuzzUsed[k].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtns.Add(this.nearBtnPuzzUsed[k]); } } for (int l = 0; l < this.nearBtnChestsUsed.Count; l++) { if (this.nearBtnChestsUsed[l]) { this.nearBtnChestsUsed[l].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtns.Add(this.nearBtnChestsUsed[l]); } } for (int m = 0; m < this.nearBtnBreaksUsed.Count; m++) { if (this.nearBtnBreaksUsed[m]) { this.nearBtnBreaksUsed[m].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtns.Add(this.nearBtnBreaksUsed[m]); } } for (int n = 0; n < this.nearBtnCharsUsed.Count; n++) { if (this.nearBtnCharsUsed[n]) { this.nearBtnCharsUsed[n].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtns.Add(this.nearBtnCharsUsed[n]); } } for (int num = 0; num < this.nearBtnBoatsUsed.Count; num++) { if (this.nearBtnBoatsUsed[num]) { this.nearBtnBoatsUsed[num].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtns.Add(this.nearBtnBoatsUsed[num]); } } this.nearBtnCharsUsed.Clear(); this.nearBtnDoorsUsed.Clear(); this.nearBtnPuzzUsed.Clear(); this.nearBtnChestsUsed.Clear(); this.nearBtnBreaksUsed.Clear(); this.nearBtnBoatsUsed.Clear(); this.nearBtnExitsUsed.Clear(); this.nearTalkCharacters.Clear(); this.nearBreakables.Clear(); this.nearChests.Clear(); this.nearPuzzles.Clear(); this.nearDoors.Clear(); this.nearMapExits.Clear(); this.nearBoats.Clear(); } // Token: 0x06000FF3 RID: 4083 RVA: 0x00134004 File Offset: 0x00132204 public int ItemCardCount() { return this.nearBreakables.Count + this.nearDoors.Count + this.nearTalkCharacters.Count + this.nearChests.Count + this.nearPuzzles.Count + this.nearBoats.Count; } // Token: 0x06000FF4 RID: 4084 RVA: 0x00134058 File Offset: 0x00132258 public void NearButtonLocations() { float num = 0f; if (!Links.x.worldCamera.orthographic) { num = 1f; } bool flag = false; for (int i = 0; i < this.nearBtnExitsUsed.Count; i++) { if (!flag && this.nearBtnExitsUsed[i]) { if (this.nearMapExits[i]) { bool flag2 = false; if (Links.x.joy) { flag2 = Links.x.partyColliderAdventure.InRange(this.nearMapExits[i]); } if (flag2) { this.nearBtnExitsUsed[i].SetPositionAtWorldPoint(this.nearMapExits[i].GetIconPosition()); if (!this.nearBtnExitsUsed[i].gameObject.activeSelf) { this.nearBtnExitsUsed[i].gameObject.transform.parent.gameObject.SetActive(true); } if (this.nearBtnExitsUsed[i].transform.parent.transform.localScale.x == 0f) { this.nearBtnExitsUsed[i].gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } } else if (this.nearBtnExitsUsed[i].transform.parent.transform.localScale.x != 0f) { this.nearBtnExitsUsed[i].gameObject.transform.parent.transform.localScale = Vector3.zero; } } else { this.nearMapExits.RemoveAt(i); this.nearBtns.Add(this.nearBtnExitsUsed[i]); this.nearBtnExitsUsed[i].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnExitsUsed.RemoveAt(i); flag = true; } } } flag = false; for (int j = 0; j < this.nearBtnDoorsUsed.Count; j++) { if (!flag && this.nearBtnDoorsUsed[j]) { if (this.nearDoors[j]) { bool flag3 = false; if (Links.x.joy) { flag3 = Links.x.partyColliderAdventure.InRange(this.nearDoors[j]); } if (flag3) { this.nearBtnDoorsUsed[j].SetPositionAtWorldPoint(this.nearDoors[j].lockColliderPosition + new Vector3(0f, 1f - num, 0f)); if (!this.nearBtnDoorsUsed[j].gameObject.activeSelf) { this.nearBtnDoorsUsed[j].gameObject.transform.parent.gameObject.SetActive(true); } if (this.nearBtnDoorsUsed[j].transform.parent.transform.localScale.x == 0f) { this.nearBtnDoorsUsed[j].gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } } else if (this.nearBtnDoorsUsed[j].transform.parent.transform.localScale.x != 0f) { this.nearBtnDoorsUsed[j].gameObject.transform.parent.transform.localScale = Vector3.zero; } } else { this.nearDoors.RemoveAt(j); this.nearBtns.Add(this.nearBtnDoorsUsed[j]); this.nearBtnDoorsUsed[j].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnDoorsUsed.RemoveAt(j); flag = true; } } } flag = false; for (int k = 0; k < this.nearBtnPuzzUsed.Count; k++) { if (!flag && this.nearBtnPuzzUsed[k]) { if (this.nearPuzzles[k]) { bool flag4 = false; if (Links.x.joy) { flag4 = Links.x.partyColliderAdventure.InRange(this.nearPuzzles[k]); } if (flag4) { this.nearBtnPuzzUsed[k].SetPositionAtWorldPoint(this.nearPuzzles[k].gameObject.transform.position + new Vector3(0f, this.nearPuzzles[k].interactionPointY - num, 0f)); if (!this.nearBtnPuzzUsed[k].gameObject.activeSelf) { this.nearBtnPuzzUsed[k].gameObject.transform.parent.gameObject.SetActive(true); } if (this.nearBtnPuzzUsed[k].transform.parent.transform.localScale.x == 0f) { this.nearBtnPuzzUsed[k].gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } } else if (this.nearBtnPuzzUsed[k].transform.parent.transform.localScale.x != 0f) { this.nearBtnPuzzUsed[k].gameObject.transform.parent.transform.localScale = Vector3.zero; } } else { this.nearPuzzles.RemoveAt(k); this.nearBtns.Add(this.nearBtnPuzzUsed[k]); this.nearBtnPuzzUsed[k].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnPuzzUsed.RemoveAt(k); flag = true; } } } flag = false; for (int l = 0; l < this.nearBtnChestsUsed.Count; l++) { if (!flag && this.nearBtnChestsUsed[l]) { if (this.nearChests[l]) { bool flag5 = false; if (Links.x.joy) { flag5 = Links.x.partyColliderAdventure.InRange(this.nearChests[l]); } if (flag5) { this.nearBtnChestsUsed[l].SetPositionAtWorldPoint(this.nearChests[l].tr.position + new Vector3(0f, 1.5f - num, 0f)); if (!this.nearBtnChestsUsed[l].gameObject.activeSelf) { this.nearBtnChestsUsed[l].gameObject.transform.parent.gameObject.SetActive(true); } if (this.nearBtnChestsUsed[l].transform.parent.transform.localScale.x == 0f) { this.nearBtnChestsUsed[l].gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } } else if (this.nearBtnChestsUsed[l].transform.parent.transform.localScale.x != 0f) { this.nearBtnChestsUsed[l].gameObject.transform.parent.transform.localScale = Vector3.zero; } } else { this.nearChests.RemoveAt(l); this.nearBtns.Add(this.nearBtnChestsUsed[l]); this.nearBtnChestsUsed[l].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnChestsUsed.RemoveAt(l); flag = true; } } } flag = false; for (int m = 0; m < this.nearBtnBreaksUsed.Count; m++) { if (!flag && this.nearBtnBreaksUsed[m]) { if (this.nearBreakables[m]) { bool flag6 = false; if (Links.x.joy) { flag6 = Links.x.partyColliderAdventure.InRange(this.nearBreakables[m]); } if (flag6) { this.nearBtnBreaksUsed[m].SetPositionAtWorldPoint(this.nearBreakables[m].transform.position + new Vector3(0f, 3f - num, 0f)); if (!this.nearBtnBreaksUsed[m].gameObject.activeSelf) { this.nearBtnBreaksUsed[m].gameObject.transform.parent.gameObject.SetActive(true); } if (this.nearBtnBreaksUsed[m].transform.parent.transform.localScale.x == 0f) { this.nearBtnBreaksUsed[m].gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } } else if (this.nearBtnBreaksUsed[m].transform.parent.transform.localScale.x != 0f) { this.nearBtnBreaksUsed[m].gameObject.transform.parent.transform.localScale = Vector3.zero; } } else { this.nearBreakables.RemoveAt(m); this.nearBtns.Add(this.nearBtnBreaksUsed[m]); this.nearBtnBreaksUsed[m].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnBreaksUsed.RemoveAt(m); flag = true; } } } flag = false; for (int n = 0; n < this.nearBtnCharsUsed.Count; n++) { if (!flag && this.nearBtnCharsUsed[n]) { if (this.nearTalkCharacters[n]) { Character character = this.nearTalkCharacters[n]; bool flag7 = false; if (Links.x.joy) { flag7 = Links.x.partyColliderAdventure.InRange(character); } if (flag7) { if ((character.isBoro && Records.x.partySailing) || character.inactive || character.hasActions || character.dayNightVanishing || !character.IsSentient()) { this.AddRemoveInteraction(false, character, null, null, null, null, null, null); } else { this.nearBtnCharsUsed[n].SetPositionAtWorldPoint(this.nearTalkCharacters[n].body.GetNeck().position + new Vector3(0f, 2.1f - num, 0f)); if (!this.nearBtnCharsUsed[n].gameObject.activeSelf) { this.nearBtnCharsUsed[n].gameObject.transform.parent.gameObject.SetActive(true); } } if (this.nearBtnCharsUsed[n].transform.parent.transform.localScale.x == 0f) { this.nearBtnCharsUsed[n].gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } } else if (this.nearBtnCharsUsed[n].transform.parent.transform.localScale.x != 0f) { this.nearBtnCharsUsed[n].gameObject.transform.parent.transform.localScale = Vector3.zero; } } else { this.nearTalkCharacters.RemoveAt(n); this.nearBtns.Add(this.nearBtnCharsUsed[n]); this.nearBtnCharsUsed[n].gameObject.transform.parent.gameObject.SetActive(false); this.nearBtnCharsUsed.RemoveAt(n); flag = true; } } } flag = false; for (int num2 = 0; num2 < this.nearBtnBoatsUsed.Count; num2++) { if (!flag && this.nearBtnBoatsUsed[num2]) { bool flag8 = false; if (Links.x.joy) { flag8 = Links.x.partyColliderAdventure.InRange(this.nearBoats[num2]); } if (flag8) { this.nearBtnBoatsUsed[num2].SetPositionAtWorldPoint(this.nearBoats[num2].tr.position + new Vector3(0f, 2f - num, 0f)); if (!this.nearBtnBoatsUsed[num2].gameObject.activeSelf) { this.nearBtnBoatsUsed[num2].gameObject.transform.parent.gameObject.SetActive(true); } if (this.nearBtnBoatsUsed[num2].transform.parent.transform.localScale.x == 0f) { this.nearBtnBoatsUsed[num2].gameObject.transform.parent.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } } else if (this.nearBtnBoatsUsed[num2].transform.parent.transform.localScale.x != 0f) { this.nearBtnBoatsUsed[num2].gameObject.transform.parent.transform.localScale = Vector3.zero; } } } } // Token: 0x06000FF5 RID: 4085 RVA: 0x00134FF4 File Offset: 0x001331F4 public void HighlightBoat(bool state, Boat boat) { bool flag = false; if (!boat) { flag = true; } bool flag2 = true; if (Links.x.mk) { flag2 = false; } bool flag3 = false; if (Links.x.mk && state) { for (int i = 0; i < this.nearBoats.Count; i++) { if (this.nearBoats[i] == boat || flag) { flag3 = true; } } if (!flag3) { this.AddRemoveInteraction(state, null, null, null, null, null, null, boat); } } for (int j = 0; j < this.nearBoats.Count; j++) { if (this.nearBoats[j] == boat || flag) { AnimateButton animateButton = this.nearBtnBoatsUsed[j]; TextMeshProUGUI component = animateButton.gameObject.transform.GetChild(0).gameObject.GetComponent(); if (state) { InteractionIconAnimator component2 = animateButton.gameObject.GetComponent(); component2.enabled = true; component.enabled = Links.x.joy; if (Links.x.joy) { component.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset); component.text = ""; } component2.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { InteractionIconAnimator component3 = animateButton.gameObject.GetComponent(); component3.enabled = false; component.enabled = false; if (flag2) { component3.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component3.gameObject.transform.localScale = Vector3.zero; } } } } if (Links.x.mk && !state) { this.AddRemoveInteraction(state, null, null, null, null, null, null, boat); } } // Token: 0x06000FF6 RID: 4086 RVA: 0x00135214 File Offset: 0x00133414 public void HighlightCharacter(bool state, Character character) { bool flag = false; if (!character) { flag = true; } bool flag2 = true; if (Links.x.mk) { flag2 = false; } bool flag3 = false; if (Links.x.mk && state) { for (int i = 0; i < this.nearTalkCharacters.Count; i++) { if (this.nearTalkCharacters[i] == character || flag) { flag3 = true; } } if (!flag3) { this.AddRemoveInteraction(state, character, null, null, null, null, null, null); } } for (int j = 0; j < this.nearTalkCharacters.Count; j++) { if (this.nearTalkCharacters[j] == character || flag) { AnimateButton animateButton = this.nearBtnCharsUsed[j]; TextMeshProUGUI component = animateButton.gameObject.transform.GetChild(0).gameObject.GetComponent(); if (state && flag2) { InteractionIconAnimator component2 = animateButton.gameObject.GetComponent(); component2.enabled = true; component.enabled = Links.x.joy; if (Links.x.joy) { component.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset); component.text = ""; } component2.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { InteractionIconAnimator component3 = animateButton.gameObject.GetComponent(); component3.enabled = false; component.enabled = false; if (flag2) { component3.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component3.gameObject.transform.localScale = Vector3.zero; } } } } if (Links.x.mk && !state) { this.AddRemoveInteraction(state, character, null, null, null, null, null, null); } } // Token: 0x06000FF7 RID: 4087 RVA: 0x00135434 File Offset: 0x00133634 public void HighlightChest(bool state, ChestActions chest) { bool flag = false; if (!chest) { flag = true; } bool flag2 = true; if (Links.x.mk) { flag2 = false; } bool flag3 = false; if (Links.x.mk && state) { for (int i = 0; i < this.nearChests.Count; i++) { if (this.nearChests[i] == chest || flag) { flag3 = true; } } if (!flag3) { this.AddRemoveInteraction(state, null, null, chest, null, null, null, null); } } for (int j = 0; j < this.nearChests.Count; j++) { if (this.nearChests[j] == chest || flag) { AnimateButton animateButton = this.nearBtnChestsUsed[j]; TextMeshProUGUI component = animateButton.gameObject.transform.GetChild(0).gameObject.GetComponent(); if (state) { InteractionIconAnimator component2 = animateButton.gameObject.GetComponent(); component2.enabled = true; component.enabled = Links.x.joy; if (Links.x.joy) { component.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset); component.text = ""; } component2.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { InteractionIconAnimator component3 = animateButton.gameObject.GetComponent(); component3.enabled = false; component.enabled = false; if (flag2) { component3.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component3.gameObject.transform.localScale = Vector3.zero; } } } } if (Links.x.mk && !state) { this.AddRemoveInteraction(state, null, null, chest, null, null, null, null); } } // Token: 0x06000FF8 RID: 4088 RVA: 0x00135654 File Offset: 0x00133854 public void HighlightBreakable(bool state, BreakableActions breakable) { bool flag = false; if (!breakable) { flag = true; } bool flag2 = true; if (Links.x.mk) { flag2 = false; } bool flag3 = false; if (Links.x.mk && state) { for (int i = 0; i < this.nearBreakables.Count; i++) { if (this.nearBreakables[i] == breakable || flag) { flag3 = true; } } if (!flag3) { this.AddRemoveInteraction(state, null, breakable, null, null, null, null, null); } } for (int j = 0; j < this.nearBreakables.Count; j++) { if (this.nearBreakables[j] == breakable || flag) { AnimateButton animateButton = this.nearBtnBreaksUsed[j]; TextMeshProUGUI component = animateButton.gameObject.transform.GetChild(0).gameObject.GetComponent(); if (state && flag2) { InteractionIconAnimator component2 = animateButton.gameObject.GetComponent(); component2.enabled = true; component.enabled = Links.x.joy; if (Links.x.joy) { component.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset); component.text = ""; } component2.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { InteractionIconAnimator component3 = animateButton.gameObject.GetComponent(); component3.enabled = false; component.enabled = false; if (flag2) { component3.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component3.gameObject.transform.localScale = Vector3.zero; } } } } if (Links.x.mk && !state) { this.AddRemoveInteraction(state, null, breakable, null, null, null, null, null); } } // Token: 0x06000FF9 RID: 4089 RVA: 0x00135874 File Offset: 0x00133A74 public void HighlightDoor(bool state, DoorActions door) { bool flag = false; if (!door) { flag = true; } bool flag2 = true; if (Links.x.mk) { flag2 = false; } bool flag3 = false; if (Links.x.mk && state) { for (int i = 0; i < this.nearDoors.Count; i++) { if (this.nearDoors[i] == door || flag) { flag3 = true; } } if (!flag3) { this.AddRemoveInteraction(state, null, null, null, null, door, null, null); } } for (int j = 0; j < this.nearDoors.Count; j++) { if (this.nearDoors[j] == door || flag) { AnimateButton animateButton = this.nearBtnDoorsUsed[j]; TextMeshProUGUI component = animateButton.gameObject.transform.GetChild(0).gameObject.GetComponent(); if (state) { InteractionIconAnimator component2 = animateButton.gameObject.GetComponent(); component2.enabled = true; component.enabled = Links.x.joy; if (Links.x.joy) { component.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset); component.text = ""; } component2.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { InteractionIconAnimator component3 = animateButton.gameObject.GetComponent(); component3.enabled = false; component.enabled = false; if (flag2) { component3.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component3.gameObject.transform.localScale = Vector3.zero; } } } } if (Links.x.mk && !state) { this.AddRemoveInteraction(state, null, null, null, null, door, null, null); } } // Token: 0x06000FFA RID: 4090 RVA: 0x00135A94 File Offset: 0x00133C94 public void HighlightExit(bool state, MapExitActions exit) { bool flag = false; if (!exit) { flag = true; } bool flag2 = true; if (Links.x.mk) { flag2 = false; } bool flag3 = false; if (Links.x.mk && state) { for (int i = 0; i < this.nearMapExits.Count; i++) { if (this.nearMapExits[i] == exit || flag) { flag3 = true; } } if (!flag3) { this.AddRemoveInteraction(state, null, null, null, null, null, exit, null); } } for (int j = 0; j < this.nearMapExits.Count; j++) { if (this.nearMapExits[j] == exit || flag) { AnimateButton animateButton = this.nearBtnExitsUsed[j]; TextMeshProUGUI component = animateButton.gameObject.transform.GetChild(0).gameObject.GetComponent(); if (state && flag2) { InteractionIconAnimator component2 = animateButton.gameObject.GetComponent(); component2.enabled = true; component.enabled = Links.x.joy; if (Links.x.joy) { component.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset); component.text = ""; } component2.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { InteractionIconAnimator component3 = animateButton.gameObject.GetComponent(); component3.enabled = false; component.enabled = false; if (flag2) { component3.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component3.gameObject.transform.localScale = Vector3.zero; } } } } if (Links.x.mk && !state) { this.AddRemoveInteraction(state, null, null, null, null, null, exit, null); } } // Token: 0x06000FFB RID: 4091 RVA: 0x00135CB4 File Offset: 0x00133EB4 public void HighlightPuzzle(bool state, PuzzleActions puzzle) { bool flag = false; if (!puzzle) { flag = true; } bool flag2 = true; if (Links.x.mk) { flag2 = false; } bool flag3 = false; if (Links.x.mk && state) { for (int i = 0; i < this.nearPuzzles.Count; i++) { if (this.nearPuzzles[i] == puzzle || flag) { flag3 = true; } } if (!flag3) { this.AddRemoveInteraction(state, null, null, null, puzzle, null, null, null); } } for (int j = 0; j < this.nearPuzzles.Count; j++) { if (this.nearPuzzles[j] == puzzle || flag) { AnimateButton animateButton = this.nearBtnPuzzUsed[j]; TextMeshProUGUI component = animateButton.gameObject.transform.GetChild(0).gameObject.GetComponent(); if (state && flag2) { InteractionIconAnimator component2 = animateButton.gameObject.GetComponent(); component2.enabled = true; component.enabled = Links.x.joy; if (Links.x.joy) { component.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset); component.text = ""; } component2.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { InteractionIconAnimator component3 = animateButton.gameObject.GetComponent(); component3.enabled = false; component.enabled = false; if (flag2) { component3.gameObject.transform.localScale = new Vector3(this.iconScale, this.iconScale, this.iconScale); } else { component3.gameObject.transform.localScale = Vector3.zero; } } } } if (Links.x.mk && !state) { this.AddRemoveInteraction(state, null, null, null, puzzle, null, null, null); } } // Token: 0x06000FFC RID: 4092 RVA: 0x00135ED3 File Offset: 0x001340D3 public void RemoveAllHighlights() { this.HighlightPuzzle(false, null); this.HighlightBoat(false, null); this.HighlightChest(false, null); this.HighlightDoor(false, null); this.HighlightBreakable(false, null); this.HighlightCharacter(false, null); } // Token: 0x06000FFD RID: 4093 RVA: 0x00135F08 File Offset: 0x00134108 public void CheckIfInspecting() { if (!Links.x.inspectTextAnimator.gameObject.activeSelf) { return; } if (Records.x.inspecting) { this.ClickedInspectButton(); Records.x.inspectCamera = null; Links.x.inspectTextAnimator.Play("InspectOff"); } } // Token: 0x06000FFE RID: 4094 RVA: 0x00135F60 File Offset: 0x00134160 public void ClickedInspectButton() { if (!Links.x.inspectTextAnimator.gameObject.activeSelf) { return; } if (Records.x.inspecting) { Records.x.inspecting = false; if (!Records.x.previousView) { if (Links.x.main.desiredGraph == 0) { Records.x.previousView = Links.x.diorama.GetOutdoorView(); } else { Records.x.previousView = Links.x.diorama.GetIndoorView(); } } Links.x.diorama.ToggleSceneCameras(Records.x.previousView.isInterior, Records.x.previousView.id); Links.x.rtsCamera.ReturnOrthographicCamera(); Links.x.inspectTextAnimator.gameObject.transform.GetChild(0).gameObject.GetComponent().text = "Inspect"; return; } if (Records.x.inspectCamera) { Records.x.previousView = Links.x.diorama.activeView; Links.x.diorama.ToggleSceneCameras(Records.x.inspectCamera.isInterior, Records.x.inspectCamera.id); Links.x.rtsCamera.CopyPerspectiveCamera(Links.x.diorama.activeView.sceneCamera, null, null); Links.x.inspectTextAnimator.gameObject.transform.GetChild(0).gameObject.GetComponent().text = "Return"; Records.x.inspecting = true; } } // Token: 0x06000FFF RID: 4095 RVA: 0x00136118 File Offset: 0x00134318 public void MoveFeedAndNote() { Windows windows = this.windows[0]; Windows windows2 = this.windows[6]; windows.SetPivotLeft(); windows2.SetPivotLeft(); int num = 0; float num2 = 100000f; for (int i = 0; i < 4; i++) { float sqrMagnitude = (windows.rt.position - this.feedPositions[i].position).sqrMagnitude; if (sqrMagnitude < num2) { num2 = sqrMagnitude; num = i; } } if (num == 0 || num == 1) { float y = windows.rt.sizeDelta.y; float num3 = Mathf.Abs(this.feedPositions[0].sizeDelta.y - y); if (Mathf.Abs(this.feedPositions[1].sizeDelta.y - y) < num3) { num = 1; } } int num4 = num + 1; if (num4 == 4) { num4 = 0; } windows.rt.anchoredPosition3D = this.feedPositions[num4].anchoredPosition3D; windows.rt.sizeDelta = this.feedPositions[num4].sizeDelta; windows2.rt.anchoredPosition3D = this.feedPositions[num4 + 4].anchoredPosition3D; windows2.rt.sizeDelta = this.feedPositions[num4 + 4].sizeDelta; } // Token: 0x06001000 RID: 4096 RVA: 0x00136280 File Offset: 0x00134480 public void ToggleControllerItemsIcon(bool state) { if (Links.x.joy) { this.controllerItem1.SetActive(state); this.controllerItem2.SetActive(state); if (Links.x.pocketWheel.open) { this.controllerLeader1.SetActive(true); this.controllerLeader2.SetActive(true); return; } this.controllerLeader1.SetActive(state); this.controllerLeader2.SetActive(state); } } // Token: 0x06001001 RID: 4097 RVA: 0x001362F4 File Offset: 0x001344F4 public void SaveWindows() { string text = Records.x.openBook + "/Quests.es3"; Vector3 zero = Vector3.zero; Vector3 zero2 = Vector3.zero; bool flag = false; float num = 0f; float num2 = 0f; this.windowsPosition.Clear(); this.windowsSize.Clear(); this.windowsFull.Clear(); this.windowsCharacter.Clear(); for (int i = 0; i < this.windows.Count; i++) { this.windows[i].Save(out zero, out zero2, out flag, out num, out num2); this.windowsPosition.Add(zero2); this.windowsSize.Add(zero); Vector3 vector = new Vector3(num, num2, 0f); if (flag) { vector.z = 1f; } this.windowsFull.Add(vector); if (this.windows[i].linkedPortrait) { if (this.windows[i].linkedPortrait.character) { this.windowsCharacter.Add(this.windows[i].linkedPortrait.character.stats.GetName()); } else { this.windowsCharacter.Add(""); } } else { this.windowsCharacter.Add(""); } } ES3.Save>("WindowsPosition", this.windowsPosition, text); ES3.Save>("WindowsSize", this.windowsSize, text); ES3.Save>("WindowsFull", this.windowsFull, text); ES3.Save>("WindowsCharacter", this.windowsCharacter, text); } // Token: 0x06001002 RID: 4098 RVA: 0x001364AC File Offset: 0x001346AC public void LoadWindows() { string text = Records.x.openBook + "/Quests.es3"; this.windowsPosition.Clear(); this.windowsSize.Clear(); this.windowsFull.Clear(); this.windowsCharacter.Clear(); this.windowsPosition = ES3.Load>("WindowsPosition", text, this.windowsPosition); this.windowsSize = ES3.Load>("WindowsSize", text, this.windowsSize); this.windowsFull = ES3.Load>("WindowsFull", text, this.windowsFull); this.windowsCharacter = ES3.Load>("WindowsCharacter", text, this.windowsCharacter); this.hasWindowSaveFile = true; for (int i = 0; i < this.windows.Count; i++) { bool flag = false; if (i < this.windowsPosition.Count) { if (this.windowsFull[i].z > 0f) { flag = true; } if (this.windowsCharacter[i] == "") { this.windows[i].Load(this.windowsSize[i], this.windowsPosition[i], flag, this.windowsFull[i].x, this.windowsFull[i].y); } } } } // Token: 0x06001003 RID: 4099 RVA: 0x00136608 File Offset: 0x00134808 public void GetWindowInfo(Character character, Windows window) { if (!this.hasWindowSaveFile) { return; } for (int i = 0; i < this.windowsCharacter.Count; i++) { if (character.stats.GetName() == this.windowsCharacter[i]) { bool flag = false; if (this.windowsFull[i].z > 0f) { flag = true; } window.Load(this.windowsSize[i], this.windowsPosition[i], flag, this.windowsFull[i].x, this.windowsFull[i].y); return; } } } // Token: 0x06001004 RID: 4100 RVA: 0x001366B8 File Offset: 0x001348B8 public void Controller() { if (Links.x.joy) { this.sheepButton.interactable = false; } else { this.sheepButton.interactable = true; } foreach (Windows windows in this.windows) { windows.ToggleController(); if (windows.linkedPortrait) { windows.linkedPortrait.UpdateController(); } } } // Token: 0x06001005 RID: 4101 RVA: 0x00136748 File Offset: 0x00134948 public void ShowSheep(bool always) { bool flag = true; if (this.texturesIdle != null && !always) { flag = false; } if (flag) { Links.x.renderPortraits.AddCharacter(Links.x.gaia.boro, Records.x.boroID, null, false, null, null, null, null); this.sheepPedestal.SetActive(true); this.sheepImage.enabled = true; } } // Token: 0x06001006 RID: 4102 RVA: 0x001367B3 File Offset: 0x001349B3 public void ClearSheep() { Links.x.renderPortraits.RemoveCharacter(Links.x.gaia.boro, Records.x.boroID, null); this.texturesIdle = null; } // Token: 0x06001007 RID: 4103 RVA: 0x001367E8 File Offset: 0x001349E8 private void Update() { if (this.boroCardOn) { this.BoroCardPosition(); } if (!Links.x.combat && !Records.x.pocketPause && Links.x.gameplay.seconds > this.updateRallyTime + 20f && Links.x.fellowship.rally > 0f) { this.updateRallyTime = Links.x.gameplay.seconds; this.UpdateRally(-1f); } } // Token: 0x06001008 RID: 4104 RVA: 0x00136874 File Offset: 0x00134A74 public GameObject GetFirstBadge() { if (this.stunBadgeParent.childCount > 2 && this.stunBadgeParent.GetChild(2).gameObject.activeSelf) { int childCount = this.stunBadgeParent.childCount; Navigation navigation = default(Navigation); for (int i = 0; i < childCount; i++) { GameObject gameObject = this.stunBadgeParent.GetChild(i).GetChild(0).gameObject; if (gameObject.activeSelf) { Button component = gameObject.GetComponent