private void Init() { environment = new Surroundings(); sceneObjects = new ObjectScene[] { new ObjectScene() }; sceneSubjects = new List<Subject>(); sceneSubjectsCopy = new List<Subject>(); sceneSubjectsShore = new List<Subject>(); SubjectsCopy = new List<Subject>(); winner = new Winner(); }
void ReceiveDataLookAt(object sender, ElapsedEventArgs e) { yarpPortLookAt.receivedData(out receiveLookAtData); if (receiveLookAtData != null && receiveLookAtData != "") { try { winner = ComUtils.XmlUtils.Deserialize<Winner>(receiveLookAtData); //check winner data } catch (Exception exc) { Console.WriteLine("Error XML Winner: " + exc.Message); } System.Threading.Thread t1 = new System.Threading.Thread(delegate() { this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate() { Canvas.SetLeft(ViewPoint, winner.spinX * 640); Canvas.SetTop(ViewPoint, (480 - winner.spinY * 480)); } )); }); t1.Priority = ThreadPriority.Lowest; t1.Start(); } }