void Update() { if (hbMan.bUpgrading) { if (contSupp.ControllerRightJoystickVertical() != 0 || contSupp.ControllerRightJoystickHorizontal() != 0) { if (contSupp.ControllerRightJoystickHorizontal() > -0.333f && contSupp.ControllerRightJoystickHorizontal() < 0.333f && contSupp.ControllerRightJoystickVertical() < -0.85f) { currentSelection = UpgradeSection.Section1; sec1.GetComponentInChildren <Button>().Select(); } else if (contSupp.ControllerRightJoystickHorizontal() > 0.333f && contSupp.ControllerRightJoystickHorizontal() < 0.85f && contSupp.ControllerRightJoystickVertical() > -0.85f && contSupp.ControllerRightJoystickVertical() < -0.333f) { currentSelection = UpgradeSection.Section2; sec2.GetComponentInChildren <Button>().Select(); } else if (contSupp.ControllerRightJoystickHorizontal() > 0.85f && contSupp.ControllerRightJoystickVertical() > -0.333f && contSupp.ControllerRightJoystickVertical() < 0.333f) { currentSelection = UpgradeSection.Section3; sec3.GetComponentInChildren <Button>().Select(); } else if (contSupp.ControllerRightJoystickHorizontal() > 0.333f && contSupp.ControllerRightJoystickHorizontal() < 0.85f && contSupp.ControllerRightJoystickVertical() > 0.333f && contSupp.ControllerRightJoystickVertical() < 0.85f) { currentSelection = UpgradeSection.Section4; sec4.GetComponentInChildren <Button>().Select(); } else if (contSupp.ControllerRightJoystickHorizontal() > -0.333f && contSupp.ControllerRightJoystickHorizontal() < 0.333f && contSupp.ControllerRightJoystickVertical() > 0.85f) { currentSelection = UpgradeSection.Section5; sec5.GetComponentInChildren <Button>().Select(); } else if (contSupp.ControllerRightJoystickHorizontal() > -0.85f && contSupp.ControllerRightJoystickHorizontal() < -0.333f && contSupp.ControllerRightJoystickVertical() > 0.333f && contSupp.ControllerRightJoystickVertical() < 0.85f) { currentSelection = UpgradeSection.Section6; sec6.GetComponentInChildren <Button>().Select(); } else if (contSupp.ControllerRightJoystickHorizontal() < -0.85f && contSupp.ControllerRightJoystickVertical() > -0.333f && contSupp.ControllerRightJoystickVertical() < 0.333f) { currentSelection = UpgradeSection.Section7; sec7.GetComponentInChildren <Button>().Select(); } else if (contSupp.ControllerRightJoystickHorizontal() > -0.85f && contSupp.ControllerRightJoystickHorizontal() < -0.333f && contSupp.ControllerRightJoystickVertical() > -0.85f && contSupp.ControllerRightJoystickVertical() < -0.333f) { if (heroStats.bIsDead) { currentSelection = UpgradeSection.Section8; sec8.GetComponentInChildren <Button>().Select(); } } } if (contSupp.ControllerButtonPadBottom("down")) { if (currentSelection == UpgradeSection.Section1) { sec1.GetComponentInChildren <Button>().onClick.Invoke(); } else if (currentSelection == UpgradeSection.Section2) { sec2.GetComponentInChildren <Button>().onClick.Invoke(); } else if (currentSelection == UpgradeSection.Section3) { sec3.GetComponentInChildren <Button>().onClick.Invoke(); } else if (currentSelection == UpgradeSection.Section4) { sec4.GetComponentInChildren <Button>().onClick.Invoke(); } else if (currentSelection == UpgradeSection.Section5) { sec5.GetComponentInChildren <Button>().onClick.Invoke(); } else if (currentSelection == UpgradeSection.Section6) { sec6.GetComponentInChildren <Button>().onClick.Invoke(); } else if (currentSelection == UpgradeSection.Section7) { sec7.GetComponentInChildren <Button>().onClick.Invoke(); } else if (currentSelection == UpgradeSection.Section8) { sec8.GetComponentInChildren <Button>().onClick.Invoke(); } } if (contSupp.ControllerButtonPadRight("down")) { hbMan.ToggleHeroUpgradeShells(); } } }