public static int Calificacion(Vegeta Calif) { int retorno = 0; SqlCommand comando = new SqlCommand(string.Format( "Insert into Calificaciones2 (Curp,Español,Matema,Exnat_Soc,Civica,Ed_Fisica ,Ed_Artis,Computac,Ingles,Ortogrf,Discipl,Uniforme,Puntualid,Material,Partici,Comp_Lec,Trabajos,Tareas,inasis,Ballet,Takewondo,Karate,promgeneral,prosep,procomp,tipo_bimtre,puntos) values ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}','{15}','{16}','{17}','{18}','{19}','{20}','{21}','{22}','{23}','{24}','{25}','{26}')", Calif.Curp, Calif.Español, Calif.Matematicas, Calif.Nat_y_Soc, Calif.Civica, Calif.Ed_Fisica, Calif.Ed_Artistica, Calif.Computacion, Calif.Ingles, //Cali.Com, //Cali.Ing, Calif.Ortografia, Calif.Disciplina, Calif.Uniforme, Calif.Puntualidad, Calif.Material, Calif.Partici, Calif.Comp_Lect, Calif.Trabajos, Calif.Tareas, Calif.Inasistenicias, Calif.Ballet, Calif.Karate, Calif.Take, Calif.promgen, Calif.prosep, Calif.promcom, Calif.tipobimes, Calif.puntos ), conection.conectar); conection.conectar.Open(); retorno = comando.ExecuteNonQuery(); conection.conectar.Close(); return(retorno); }
private void Tmr_Tick(object sender, EventArgs e) { // 1st determine if the enemy can see Player within range... Vector point = Vegeta.Pos - Goku.Pos; // face the enemy double dist = point.Magnitude; // calc dist between the 2 saiyans List <Saiyan> contacts = new List <Saiyan>(); if (dist < 400) { contacts.Add(Goku); // enemy can SEE us, so add us to list of contacts } Vegeta.Sense(contacts); // enemy now SENSES the Player // Calc Goku's new Velocity by checking user input... if (dir == Direction.Left) { Goku.Vel.X -= 5; } else if (dir == Direction.Right) { Goku.Vel.X += 5; } else if (dir == Direction.Up) { Goku.Vel.Y -= 5; } else if (dir == Direction.Down) { Goku.Vel.Y += 5; } else if (dir == Direction.None) { Goku.Vel.X = 0;// stop instantly Goku.Vel.Y = 0; } Goku.Move(0.1, true); // Have Goku calc his new position in space Vegeta.Move(0.1, false); // Have Vegeta calc his new position in space this.Invalidate(); // repaint the game }
public static void VegetaM() { if (Console.CursorLeft == 122 && Console.CursorTop == 24) { Console.Clear(); Console.WriteLine("This trip cost $1000. See you later"); Console.ReadKey(); if (Stats.EMoney >= 1000) { Stats.EMoney -= 1000; Stats.age += 1; Console.Clear(); Display.UniverseMap(121, 10); } else if (Stats.EMoney < 1000) { Console.Clear(); Console.WriteLine("You're broke."); Console.ReadKey(); Console.Clear(); Vegeta vegeta = new Vegeta(122, 24); } } else if (Console.CursorLeft == 88 && Console.CursorTop == 14) { Stats.SellStore(200, 3000, 600, 2500); Vegeta vegeta = new Vegeta(88, 14); } else if (Console.CursorLeft == 108 && Console.CursorTop == 14) { if (t6 < 1) { Console.WriteLine("This store is being runned by King Vegeta's warriors...\nTry not to stand out."); Console.WriteLine("You found $2000.."); Stats.EMoney += 2000; t6++; } else if (t6 >= 1) { Console.WriteLine("This store is being runned by Kind Vegeta's warriors...\nTry not to stand out."); } Console.ReadKey(); Console.Clear(); Vegeta vegeta = new Vegeta(108, 14); } else if (Console.CursorLeft == 88 && Console.CursorTop == 21) { Stats.SellStore(800, 1200, 600, 100); Vegeta vegeta = new Vegeta(88, 21); } else if (Console.CursorLeft == 108 && Console.CursorTop == 21) { Stats.BuyStore(1000, 100, 2000, 200); Vegeta vegeta = new Vegeta(108, 21); } else if (Console.CursorLeft == 69 && Console.CursorTop == 17) { Stats.BuyStore(); Vegeta vegeta = new Vegeta(69, 17); } else if (Console.CursorLeft == 117 && Console.CursorTop == 21) { Stats.BuyStore(200, 600, 300, 800); Vegeta vegeta = new Vegeta(117, 21); } }
public static void UniverseMap(int x = 81, int y = 20) { Screen(); // Print random stars as background Random rnd = new Random(); for (int i = Sx1 + 1; i < Sx2; i += 5) { for (int j = Sy1 + 1; j < Sy2; j += 5) { Cursor.WriteAt("*", rnd.Next(i, i + 5), rnd.Next(j, j + 5)); } } // Print Planets var PlanetLocation = new List <(string color, (int x, int y) coord)> { ("Blue", (80, 20)), ("Red", (40, 10)), ("Cyan", (50, 28)), ("Green", (120, 10)), ("Magenta", (110, 25)) }; foreach (var item in PlanetLocation) { Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), item.color); Cursor.WriteAt("*", item.coord.x, item.coord.y); } Console.ResetColor(); // Print Spaceship Console.SetCursorPosition(x, y); Console.ForegroundColor = ConsoleColor.White; Console.OutputEncoding = Encoding.Unicode; Console.WriteLine((char)0x25B2); Console.ResetColor(); Stats stats = new Stats(42, 37); Console.SetCursorPosition(51, 38); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Planets include: earth | vegeta | alphac | namek | yardrat"); Console.ResetColor(); Console.SetCursorPosition(61, 39); Console.Write("What Planet would you like to go to? "); string choice = Console.ReadLine(); switch (choice) { case "earth": Console.Clear(); Stats.age += 8; if (Stats.age < 65) { Earth earth = new Earth(); } else if (Stats.age >= 65) { Console.WriteLine("You have reached Death.."); Environment.Exit(0); } break; case "vegeta": Console.Clear(); Stats.age += 8; if (Stats.age < 65) { Vegeta vegeta = new Vegeta(); } else if (Stats.age >= 65) { Console.WriteLine("You have reached Death.."); Environment.Exit(0); } break; case "alphac": Console.Clear(); Stats.age += 8; if (Stats.age < 65) { AlphaC alphac = new AlphaC(); } else if (Stats.age >= 65) { Console.WriteLine("You have reached Death.."); Environment.Exit(0); } break; case "namek": Console.Clear(); Stats.age += 8; if (Stats.age < 65) { Namek namek = new Namek(); } else if (Stats.age >= 65) { Console.WriteLine("You have reached Death.."); Environment.Exit(0); } break; case "yardrat": Console.Clear(); Stats.age += 8; if (Stats.age < 65) { Yardrat yardrat = new Yardrat(); } else if (Stats.age >= 65) { Console.WriteLine("You have reached Death.."); Environment.Exit(0); } break; default: Console.Clear(); Console.WriteLine("You didn't spell the planet correctly try again.."); UniverseMap(); break; } }