Example #1
0
 bool ejex = true, ejey = true;       // eje que se encuentra la serpiente
 public Snake()
 {
     InitializeComponent();
     Player.SoundLocation = "Gangplank_Galleon.wav";
     serpiente            = new Serpiente(190, 90);
     comida = new Comida();
     g      = Lienzo.CreateGraphics();
 }
 public void Comer()
 {
     if (alargar == null)
     {
         alargar = new Serpiente(this.x, this.y);
     }
     else
     {
         alargar.Comer();
     }
 }
Example #3
0
 public void GameOver()
 {
     lblPuntuacion.Text = "0";
     ejex      = ejey = true;
     xdir      = ydir = 0;
     serpiente = new Serpiente(190, 90);
     comida    = new Comida();
     MessageBox.Show("Game Over: Puntaje " + puntaje);
     puntaje        = 0;
     bucle.Interval = 100;
 }
 public Serpiente(int x, int y)
 {
     this.x       = x;
     this.y       = y;
     this.alargar = null;
 }