public void Show(string newText = "", bool showSpecialActionIcon = false) { if (newText != "") { interractText.text = newText; } else { interractText.text = originalInterractText; } Initialize(); interractText.active = true; if (showSpecialActionIcon && specialXboxIcon && specialKeyboardIcon) { xboxIcon.active = false; keyboardIcon.active = false; specialXboxIcon.active = ControllerRumbleComponent.IsXboxControllerPluggedIn(); specialKeyboardIcon.active = !ControllerRumbleComponent.IsXboxControllerPluggedIn(); } else { if (specialXboxIcon && specialKeyboardIcon) { specialXboxIcon.active = false; specialKeyboardIcon.active = false; } xboxIcon.active = ControllerRumbleComponent.IsXboxControllerPluggedIn(); keyboardIcon.active = !ControllerRumbleComponent.IsXboxControllerPluggedIn(); } }
public void Show() { this.active = true; if (this.transform.Find("XboxIcon") && this.transform.Find("KeyboardIcon")) { Transform xboxIcon = this.transform.Find("XboxIcon"); Transform keyboardIcon = this.transform.Find("KeyboardIcon"); xboxIcon.active = ControllerRumbleComponent.IsXboxControllerPluggedIn(); keyboardIcon.active = !ControllerRumbleComponent.IsXboxControllerPluggedIn(); } iTween.StopByName(this.gameObject, "Hiding"); iTween.MoveTo(this.gameObject, new ITweenBuilder().SetPosition(showPosition.position).SetTime(showHideTime).SetName("Showing").SetEaseType(easeTypeToUse).Build()); }