// MobileUI mobile; /// <summary> /// Standard Unity Function. Called once every frame. /// </summary> void Update() { if (playerInVicinity && doorState.IsAccessible()) { #if UNITY_STANDALONE if (Input.GetButtonDown("Jump")) { this.Enter(); } #elif UNITY_ANDROID if (GameController_v7.Instance.GetMobileUIManager().IsInteracting() || GameController_v7.Instance.GetMobileUIManager().IsJumping()) { GameController_v7.Instance.GetMobileUIManager().SetInteracting(false); GameController_v7.Instance.GetMobileUIManager().SetJumping(false); this.Enter(); } // if (mobile.interactPressed || mobile.jumpPressed) { // mobile.interactPressed = false; // mobile.jumpPressed = false; // this.Enter (); // } #endif } }
void Update() { if (playerInVicinity && doorState.IsAccessible()) { #if UNITY_STANDALONE if (Input.GetButtonDown("Jump")) { this.Enter(); } #elif UNITY_ANDROID if (mobile.interactPressed || mobile.jumpPressed) { mobile.interactPressed = false; mobile.jumpPressed = false; this.Enter(); } #endif } }