public void Submit(string key, PositionType position, DotPoint point, int durationMillis) { Submit(key, position, new List <DotPoint>() { point }, durationMillis); }
private bool RemoveAtList(DotPoint dot) { if (dotPointList.Contains(dot)) { dotPointList.Remove(dot); return(true); } return(false); }
private bool AddToList(DotPoint dot) { if (dotPointList.Contains(dot)) { return(false); } dotPointList.Add(dot); return(true); }
public void Submit(string key, PositionType position, List <DotPoint> points, int durationMillis) { byte[] bytes = new byte[20]; for (var i = 0; i < points.Count; i++) { DotPoint point = points[i]; bytes[point.Index] = (byte)point.Intensity; } HapticApi.SubmitByteArray(key, position, bytes, 20, durationMillis); }
public void Toggle(DotPoint dot) { if (dotPointList.Contains(dot)) { RemoveAtList(dot); } else { AddToList(dot); } }
public void Submit(string key, PositionType position, DotPoint point, int durationMillis) { // nothing to do }
void Awake() { dotPoint = new DotPoint(motorIndex, motorIntensity); controller = GetComponentInParent <BhapticsDotPointControllerExample>(); thisButton = GetComponent <Button>(); }