Exemplo n.º 1
0
 public static void ActivateMotor(MotorPattern pattern)
 {
     if (pattern.GetPreset() != null)
     {
         #if UNITY_WEBGL
         SendMotorPreset(pattern.GetPreset());
         #endif
     }
 }
Exemplo n.º 2
0
 public static void ActivateMotor(MotorPattern pattern)
 {
     if (pattern.GetPreset() != null)
     {
         #if UNITY_WEBGL && !UNITY_EDITOR
         SendMotorPreset(pattern.GetPreset());
         #else
         Debug.LogWarning("Warning: MotorPattern=" + pattern.GetPreset() + " received, but motor patterns are not supported on this platform.");
         #endif
     }
 }
Exemplo n.º 3
0
 public static void ActivateMotor(MotorPattern pattern)
 {
     if (pattern.GetPreset() != null)
     {
     #if UNITY_WEBGL && !UNITY_EDITOR
         JSONObject cmd = new JSONObject();
         cmd["type"]   = "Motor";
         cmd["preset"] = pattern.GetPreset();
         Play.Command(cmd.ToString());
     #else
         Debug.LogWarning("Warning: MotorPattern=" + pattern.GetPreset() + " received, but motor patterns are not supported on this platform.");
     #endif
     }
 }
Exemplo n.º 4
0
 public void Vibrate(MotorPattern preset)
 {
     Hardware.ActivateMotor(preset);
 }