Ejemplo n.º 1
0
 /// <summary>
 /// Editorと共通のタッチ状態
 /// </summary>
 /// <returns>タッチ状態</returns>
 private Phase GetTouch()
 {
     if (MobileAppUtility.AppRuntime())
     {
         // スマホのタッチ状態
         if (touched)
         {
             return((Phase)((int)main.phase));
         }
     }
     else
     {
         // Editorのタッチ状態
         if (Input.GetMouseButtonDown(0))
         {
             return(Phase.Began);
         }
         if (Input.GetMouseButton(0))
         {
             return(Phase.Stationary);
         }
         if (Input.GetMouseButtonUp(0))
         {
             return(Phase.Ended);
         }
     }
     return(Phase.None);
 }
Ejemplo n.º 2
0
        public void IsValidMobileTableType_CorrectlyEvaluates(Type typeToEvaluate, string tableName, bool expected)
        {
            // Act
            bool result = MobileAppUtility.IsValidItemType(typeToEvaluate, tableName);

            // Assert
            Assert.Equal(expected, result);
        }