public static void ActivateMotor(MotorPattern pattern) { if (pattern.GetPreset() != null) { #if UNITY_WEBGL SendMotorPreset(pattern.GetPreset()); #endif } }
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 } }
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 } }
public void Vibrate(MotorPattern preset) { Hardware.ActivateMotor(preset); }