|
|
|
|
@ -1,4 +1,6 @@ |
|
|
|
|
#if UNITY_EDITOR |
|
|
|
|
using NaughtyAttributes; |
|
|
|
|
#endif |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using TouchSocket.Core; |
|
|
|
|
using UnityEngine; |
|
|
|
|
@ -104,11 +106,17 @@ public class HandDriver : MonoBehaviour |
|
|
|
|
public string SendBackIP; |
|
|
|
|
public VibrationData vibrationData; |
|
|
|
|
|
|
|
|
|
#if UNITY_EDITOR |
|
|
|
|
[BoxGroup("Vibrator 1"), Min(0), Label("Million Second")] |
|
|
|
|
#endif |
|
|
|
|
public int Duration1 = 20; |
|
|
|
|
#if UNITY_EDITOR |
|
|
|
|
[BoxGroup("Vibrator 1"), Range(4, 10)] |
|
|
|
|
#endif |
|
|
|
|
public int Amplitude1 = 4; |
|
|
|
|
#if UNITY_EDITOR |
|
|
|
|
[Button] |
|
|
|
|
#endif |
|
|
|
|
public void Vibrator_1Active() |
|
|
|
|
{ |
|
|
|
|
if (Network == null) return; |
|
|
|
|
@ -134,11 +142,17 @@ public class HandDriver : MonoBehaviour |
|
|
|
|
Network.SendVibrationMsg(CharacterName, SendBackIP, vibrationData); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if UNITY_EDITOR |
|
|
|
|
[BoxGroup("Vibrator 2"), Min(0), Label("Million Second")] |
|
|
|
|
#endif |
|
|
|
|
public int Duration2 = 20; |
|
|
|
|
#if UNITY_EDITOR |
|
|
|
|
[BoxGroup("Vibrator 2"), Range(4, 10)] |
|
|
|
|
#endif |
|
|
|
|
public int Amplitude2 = 4; |
|
|
|
|
#if UNITY_EDITOR |
|
|
|
|
[Button] |
|
|
|
|
#endif |
|
|
|
|
public void Vibrator_2Active() |
|
|
|
|
{ |
|
|
|
|
if (Network == null) return; |
|
|
|
|
@ -163,7 +177,9 @@ public class HandDriver : MonoBehaviour |
|
|
|
|
} |
|
|
|
|
Network.SendVibrationMsg(CharacterName, SendBackIP, vibrationData); |
|
|
|
|
} |
|
|
|
|
#if UNITY_EDITOR |
|
|
|
|
[Button] |
|
|
|
|
#endif |
|
|
|
|
public void BothActiveWithVibrator_1Parameters() |
|
|
|
|
{ |
|
|
|
|
if (Network == null) return; |
|
|
|
|
|