Ejemplo n.º 1
0
        bool bB5 = true;                 //Bools To Know If They Are In The Round
        public Cyborg()
        {
            InitializeComponent();
            this.Opacity = Class1.brightness / 1850; //Brightness

            Toly.Play();                             //Play Sound
            Toly.Volume = Class1.Volume;             //Volume Sound


            B    = new Image[] { B1, B2, B3, B4, B5 };                                                            //Array of Errors
            U    = new Image[] { U1, U2, U3, U4, U5 };                                                            //Array of Bugs
            Blen = B.Length;                                                                                      //Length Error

            MoveObj          = new System.Windows.Threading.DispatcherTimer();                                    //MoveObj //Set Timer(1ms)
            MoveObj.Interval = TimeSpan.FromMilliseconds(1);                                                      //MoveObj //Set Timer(1ms)
            MoveObj.Tick    += MoveObj_Tick;                                                                      //MoveObj //Set Timer(all 1ms)
            MoveObj.Start();                                                                                      //MoveObj //Set Timer(all 1ms)

            RDosBox = new Rect(Canvas.GetLeft(DosBox), Canvas.GetTop(DosBox), DosBox.Width, DosBox.Height);       //Rect to DosBox To Check Intersect

            if (Class1.Bots)                                                                                      //Change Images IF TolyBot
            {                                                                                                     //Change Images IF TolyBot
                Back.ImageSource = new BitmapImage(new Uri(@"image/TolyBot/Map.jpg", UriKind.Relative));          //Change Images IF TolyBot
                                                                                                                  //Change Images IF TolyBot
                tolyborg.Source = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/image/TolyBot/DosBox.png"));   //Change Images IF TolyBot
                                                                                                                  //Change Images IF TolyBot
                shoot.Source = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/image/TolyBot/Bug.png"));            //Change Images IF TolyBot
                U2.Source = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/image/TolyBot/Bug.png"));            //Change Images IF TolyBot
                U4.Source = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/image/TolyBot/Bug.png"));            //Change Images IF TolyBot
                                                                                                                  //Change Images IF TolyBot
            }                                                                                                     //Change Images IF TolyBot
            else
            {
                Back.ImageSource = new BitmapImage(new Uri(@"image/MargaBot/Class.jpg", UriKind.Relative));            //Change Images IF TolyBot
                                                                                                                       //Change Images IF TolyBot
                tolyborg.Source = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/image/MargaBot/Visual.png"));       //Change Images IF TolyBot
                                                                                                                       //Change Images IF TolyBot
                shoot.Source = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/image/MargaBot/Failed.png"));             //Change Images IF TolyBot
                U2.Source = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/image/MargaBot/Failed.png"));             //Change Images IF TolyBot
                U4.Source = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/image/MargaBot/Failed.png"));             //Change Images IF TolyBot
            }
        }
Ejemplo n.º 2
0
 private void media_MediaEnded(object sender, RoutedEventArgs e)                                  //restart Toly
 {                                                                                                //restart Toly
     Toly.Stop();                                                                                 //restart Toly
     Toly.Play();                                                                                 //restart Toly
 }                                                                                                //restart Toly