public ControlWindow() { InitializeComponent(); servoManager = new ServoManager(servoConfigFileName); servoManager.ConnectToHardware(); UpdateConnectedTextblock(servoManager.IsConnected(), servoHardwareState); ariaManager = new AriaManager(); ariaManager.InitializeAria(); UpdateConnectedTextblock(ariaManager.IsConnected(), ariaHardwareState); robotSpeech = new RobotSpeech(servoManager); robotEyes = new RobotEyes(); robotEyes.InitializeHardware(); personTracking = new PersonTracking(servoManager, ariaManager); sequenceProcessor = new SequenceProcessor(servoManager, ariaManager, robotSpeech, robotEyes, sequenceFileName); kinectManager = new KinectManager(sequenceProcessor, personTracking, robotSpeech); kinectManager.InitializeKinect(); UpdateConnectedTextblock(kinectManager.IsConnected(), kinectHardwareState); UpdateMotionEnabledDisplay(); logUpdateTimer.Tick += new EventHandler(logUpdateTimer_Tick); logUpdateTimer.Interval = new TimeSpan(0, 0, 0, 0, 500); logUpdateTimer.Start(); }
IEnumerator WaitForSpeech(AudioClip clip) { RobotEyes flashing = null; switch (currTurn) { case Turn.Bot1: Bot1Source.PlayOneShot(clip); flashing = Bot1Eyes; break; case Turn.Bot2: Bot2Source.PlayOneShot(clip); flashing = Bot2Eyes; break; } flashing.FlashEyes(); yield return(new WaitForSeconds(clip.length)); Debug.Log("clip finished playing"); flashing.StopFlashing(); EnterState(State.ZoomedOut); }