public void impedisciUscitaSchermo(List<Guerriero> listGuer, Game1 game) { // Per il momento possiamo farne a meno! foreach (Guerriero guerDaCheck in listGuer) { //if (guerDaCheck.nuovaPosizione.Y > game.Window.ClientBounds.Bottom - 64 || guerDaCheck.nuovaPosizione.Y < game.Window.ClientBounds.Top) //{ // guerDaCheck.nuovaPosizione = guerDaCheck.posizione; //} } }
public void coordSpawnGuerriero(Colore coloreGiocatore, Game1 game) { int rnd = 0;// = rand.Next(0, (game.Window.ClientBounds.Right - 64)); int xSpawn = 64 * (int)(rnd / 64); int ySpawn; if (coloreGiocatore == Colore.rosso) ySpawn = 0; else ySpawn = game.Window.ClientBounds.Bottom - 64; posizione = new Vector2(xSpawn, ySpawn); }
static void Main() { using (var game = new Game1()) game.Run(); }