コード例 #1
0
ファイル: Entrance.cs プロジェクト: KurogamiRyujin/Discord
    //	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
        }
    }
コード例 #2
0
 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
     }
 }