Beispiel #1
0
        private void nextPosture(bool success)
        {
            training.next(success);

            //update UI
            TrainingProgress.Value = training.getProgess();
            StatusLabel.Content    = training.successCount + " / " + training.index;

            if (!training.isFinish())
            {
                player.setAction(training.getActionData());
                actionMatcher.init(training.getActionData());
            }
            else
            {
                TrainingFinish();
            }
        }
Beispiel #2
0
        private void Start_Training(object sender, RoutedEventArgs e)
        {
            this.training = MyTraining1Factory.createActionTraining();

            training.next();
            if (!training.isFinish())
            {
                player.setAction(training.getActionData());
                actionMatcher.init(training.getActionData());
            }
            player.start();

            //update UI
            TrainingProgress.Value = training.getProgess();
            StatusLabel.Content    = training.successCount + " / " + training.index;

            consumer.start();
            timer.Start();
        }