コード例 #1
0
        public void OnSceneGUI()
        {
            CVirtHapticEmitter targetScript = (CVirtHapticEmitter)target;

            Handles.color = orange;
            Handles.DrawWireDisc(targetScript.transform.position, targetScript.transform.up, targetScript.distance);
        }
コード例 #2
0
        public override void OnInspectorGUI()
        {
            CVirtHapticEmitter targetScript = (CVirtHapticEmitter)target;

            targetScript.autoStart = EditorGUILayout.Toggle("AutoStart Playing", targetScript.autoStart);
            targetScript.loop      = EditorGUILayout.Toggle("Loop", targetScript.loop);
            targetScript.duration  = EditorGUILayout.FloatField("Timespan", targetScript.duration);
            targetScript.distance  = EditorGUILayout.FloatField("Distance", targetScript.distance);

            targetScript.forceOverTime     = EditorGUILayout.CurveField("Volume over Time", targetScript.forceOverTime, Color.green, Rect.MinMaxRect(0, 0, 1, 1), GUILayout.Height(80));
            targetScript.forceOverDistance = EditorGUILayout.CurveField("Force over Distance", targetScript.forceOverDistance, orange, Rect.MinMaxRect(0, 0, 1, 1), GUILayout.Height(80));
        }
コード例 #3
0
 public void RemoveEmitter(CVirtHapticEmitter emitter)
 {
     emitters.Remove(emitter);
 }
コード例 #4
0
 public void AddEmitter(CVirtHapticEmitter emitter)
 {
     emitters.Add(emitter);
 }