コード例 #1
0
 private void PathClicked(object sender, RoutedEventArgs e)
 {
     hapticPlayer.Submit("path1", PositionType.VestFront, new PathPoint(0.5f, 0.5f, 100), 1000);
     hapticPlayer.Submit("path2", PositionType.ForearmL, new PathPoint(0.5f, 0.5f, 100), 1000);
     hapticPlayer.Submit("path3", PositionType.ForearmR, new PathPoint(0.5f, 0.5f, 100), 1000);
     hapticPlayer.Submit("path4", PositionType.VestBack, new PathPoint(0.5f, 0.5f, 100), 1000);
     hapticPlayer.Submit("path5", PositionType.Head, new PathPoint(0.5f, 0.5f, 100), 1000);
 }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: Changmok/tac-sharp
 private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
 {
     HapticPlayer.Submit(
         "test2",
         PositionType.Left,
         new List <DotPoint>()
     {
         new DotPoint(0, 100)
     }, 1000);
 }
コード例 #3
0
        public MainWindow()
        {
            InitializeComponent();

            hapticPlayer = new HapticPlayer("sample", "sample");

            var file    = File.ReadAllText("ElectricFront.tact");
            var project = CommonUtils.ConvertJsonStringToTactosyFile(file).Project;

            hapticPlayer.Register("file", project);

            timerToCheckIfDeviceActive.Elapsed += (sender, args) =>
            {
                hapticPlayer.Submit("ping", PositionType.FootL, new List <DotPoint>(), 100);
            };

            timerToCheckIfDeviceActive.Start();
        }
コード例 #4
0
        private void PathClicked(object sender, RoutedEventArgs e)
        {
            hapticPlayer.Submit("path1", PositionType.VestFront, new PathPoint(0.5f, 0.5f, 100), 1000);
            hapticPlayer.Submit("path2", PositionType.ForearmL, new PathPoint(0.5f, 0.5f, 100), 1000);
            hapticPlayer.Submit("path3", PositionType.ForearmR, new PathPoint(0.5f, 0.5f, 100), 1000);
            hapticPlayer.Submit("path4", PositionType.VestBack, new PathPoint(0.5f, 0.5f, 100), 1000);
            hapticPlayer.Submit("path5", PositionType.Head, new PathPoint(0.5f, 0.5f, 100), 1000);

            Debug.WriteLine("Device Connected: " + hapticPlayer.IsActive(PositionType.Vest));
        }