ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Programacion De Juego De Serpiente Snake En Visual C#


Enviado por   •  8 de Mayo de 2013  •  12.518 Palabras (51 Páginas)  •  1.560 Visitas

Página 1 de 51

AQUÍ LES MUESTRO LA VISUALIZACIÓN DE LA FORMA

La siguiente imagen muestra los componentes usados.

COMPONENTES

button1;

button2;

button3;

button4;

button5;

button6;

button7;

button8;

button9;

button12;

button11;

button10

groupBox1;

radioButton3;

radioButton2;

radioButton1;

panel1;

panel2;

panel3;

panel4;

panel5;

panel6;

timer1;

timer2;

timer3;

timer4;

timer8;

timer5;

timer6;

timer7;

label1;

label2;

label3;

label4;

label5;

textBox1;

comboBox1;

comboBox2;

numericUpDown1;

usingSystem;

usingSystem.Collections.Generic;

usingSystem.ComponentModel;

usingSystem.Data;

usingSystem.Drawing;

usingSystem.Linq;

usingSystem.Text;

usingSystem.Windows.Forms;

using System.Drawing.Drawing2D;

usingSystem.Threading;

namespaceProyectoGraficacion

{

public partial class Form1 : Form

{

bool band = true;

Randomram = new Random();

intcontxy; //ACUMULADOR DE LA POSICION DE LA VIBORA EN EL EJE X

contletra = 0;

intXcount; //ACUMULADOR DE LA POSICION DE LA VIBORA EN EL EJE Y

int y;

bool band1;

int dificultad = 300;

//ARREGLOS PARA GUARDAR COORDENADAS

//DE LA POSICION DE LOS 4 PIXELES

//QUE REPRESENTAN LA COMIDA DE LA VIBORA

int[,] comida = new int[10,2];//PIXEL 1

int[,] comida2 = new int[10, 2];//PIXEL 2

int[,] comida3 = new int[10, 2];//PIXEL 3

int[,] comida4 = new int[10, 2];//PIXEL 4

int PUNTOS; //CONTADOR DE PUNTOS CADA VEZ QUE COME LA VIVORA

intvivoraX; //POSICION EN X

intvivoraY; //POSICION EN Y

int CX; //AUXILIAR GUARDA LA COORDENADA DE LA COMIDA EN EL EJE X

int CY; //AUXILIAR GUARDA LA COORDENADA DE LA COMIDA EN EL EJE X

intcont_comida; //CONTADOR DE LA COMIDA QUE TOMA LA VIBORA

int retraso; //RETRASO DE LA VIBORA 2

int crecer = 10;//LONGITUD DE LA VIVORA

bool a = true; //ALTERNADOR DE DIRECCION

public Form1()

{

InitializeComponent();

}

privatevoid Form1_Load(objectsender, EventArgs e)

{

//PONEMOS INVISIBLES LOS BOTONES QUE CONTROLAN LA VIBORA

button4.Visible = false;

button5.Visible = false;

button6.Visible = false;

button7.Visible = false;

button9.Enabled = false;

}

//BOTON QUE MUSTRA UN TEXTO CON EFECTOS DE GRADIENTE Y ZOOM

privatevoid button2_Click(objectsender, EventArgs e)

{

inttam = int.Parse(numericUpDown1.Value.ToString());

panel6.Visible = false;

panel5.Visible = false;

panel2.Visible = false;

this.Refresh();

timer1.Enabled = false;

timer2.Enabled = false;

...

Descargar como (para miembros actualizados)  txt (33.8 Kb)  
Leer 50 páginas más »
Disponible sólo en Clubensayos.com