Esempio n. 1
0
        public void FishClone(Fish clonedFrom)
        {
            Width=clonedFrom.Width;
            Height=clonedFrom.Height;
            Center=clonedFrom.Center;
            Colar=clonedFrom.Colar;
            ColarWidth=clonedFrom.ColarWidth;
            Tail=clonedFrom.Tail;
            TailWidth = clonedFrom.TailWidth;
            maxFishOffset = clonedFrom.maxFishOffset;

            SolidColorBrush shadow = new SolidColorBrush(Color.FromArgb(100, 0, 0, 0));
            ((Path)this.FindName("FishOutline")).Fill = shadow;
        }
Esempio n. 2
0
        public MainWindow()
        {
            this.KinectSensorManager = new KinectSensorManager();
            this.KinectSensorManager.KinectSensorChanged += this.KinectSensorChanged;
            this.DataContext = this.KinectSensorManager;

            InitializeComponent();

            #if DEBUG
            angleSlider.Visibility = System.Windows.Visibility.Visible;
            angleLabel.Visibility = System.Windows.Visibility.Visible;
            spedLabel.Visibility = System.Windows.Visibility.Visible;
            stackPanel1.Visibility = System.Windows.Visibility.Visible;
            angleSlider.Focus();
            //GameTime = 10;
            //StartSpeed = 0.5;
            #endif

            //p.Status = Status.Unknown;

            //p.Radius = 35;
            //p.Mass = p.Radius * .01;
            //p.Opacity = p.Radius * .02;
            //Canvas.SetTop(p, 100     );
            //Canvas.SetLeft(p, 100);

            this.SensorChooserUI.KinectSensorChooser = sensorChooser;
            sensorChooser.Start();

            // Bind the KinectSensor from the sensorChooser to the KinectSensor on the KinectSensorManager
            var kinectSensorBinding = new Binding("Kinect") { Source = this.sensorChooser };
            BindingOperations.SetBinding(this.KinectSensorManager, KinectSensorManager.KinectSensorProperty, kinectSensorBinding);

            //fourLineFish = this.FindName("UCFish") as FourLineFish;

            countdownTimer.Elapsed += new ElapsedEventHandler(countdownTimerElapsed);

            //serialWindow = (ShapeGame2.SerialConnector)App.Current.Windows[0];
            feedback.Changed += new EventHandler(PortChanged);

            shadowFish = new FishComponents.Fish();
            shadowFish.Visibility = System.Windows.Visibility.Hidden;
        }