Example #1
0
        private void korisnikPritisnuoDugmic(object sender, KeyEventArgs e)
        {
            string imgPathGore = @"C:\Users\marinao\source\repos\Zmijica\Roboti\Images\bb8 ide prema r2d2Gore.jpeg";
            string imgPathDole = @"C:\Users\marinao\source\repos\Zmijica\Roboti\Images\bb8 ide prema r2d2Dole.jpeg";

            smer = Smer.Desno;
            var key = (Keys)e.KeyValue;

            switch (key)
            {
            case Keys.Up:
                smer = Smer.Gore;
                //pictureBoxSredina.Image = (new ImageHelper()).vratiSliku(imgPathGore, 81, 91);
                pictureBoxSredina.Image = null;
                pictureBoxDole.Image    = null;
                pictureBoxGore.Image    = (new ImageHelper()).vratiSliku(imgPathGore, 81, 91);

                break;

            case Keys.Down:
                smer = Smer.Dole;
                //pictureBoxSredina.Image = (new ImageHelper()).vratiSliku(imgPathDole, 81, 91);
                pictureBoxSredina.Image = null;
                pictureBoxDole.Image    = (new ImageHelper()).vratiSliku(imgPathGore, 81, 91);;
                pictureBoxGore.Image    = null;
                break;

            case Keys.Right:
                smer = Smer.Desno;
                pictureBoxSredina.Image = (new ImageHelper()).vratiSliku(imgPathGore, 81, 91);;
                pictureBoxDole.Image    = null;
                pictureBoxGore.Image    = null;
                break;

            case Keys.Left:
                smer = Smer.Desno;    //??
                break;

            case Keys.P:
                //pauzirajSat();
                break;

            default:
                break;
            }
            Udar udar = Udar.Ne;

            if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift)
            {
                udar = Udar.Da;
            }
        }
Example #2
0
     public override List <Efekat> korakni(Smer smer, Udar udar)
     {
         if (smer == Smer.Gore)
         {
             return new List <Efekat> {
             }
         }
         ;
         return(new List <Efekat> {
             Efekat.OduzmiZivot
         });
     }
 }
Example #3
0
     public override List <Efekat> korakni(Smer smer, Udar udar)
     {
         if (smer == Smer.Desno)
         {
             return new List <Efekat> {
                        Efekat.UkloniPrepreku
             }
         }
         ;
         return(new List <Efekat> {
             Efekat.OduzmiZivot
         });
     }
 }
Example #4
0
 public override List <Efekat> korakni(Smer smer, Udar udar)
 {
     return(new List <Efekat> {
     });
 }