public async Task <IActionResult> Edit(int id, [Bind("Id,Nombre,Especie,Habilidad,Ocupacion,Ubicacion,Imagen")] Touhou touhou) { if (id != touhou.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(touhou); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TouhouExists(touhou.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(touhou)); }
public async Task <IActionResult> Create([Bind("Id,Nombre,Especie,Habilidad,Ocupacion,Ubicacion, Imagen")] Touhou touhou) { if (ModelState.IsValid) { _context.Add(touhou); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(touhou)); }
public Level(Touhou game) { this.game = game; // Load images and sprites spriteBatch = new SpriteBatch(game.GraphicsDevice); // Create the level player player = new Player(game, this); // Load other game media music = game.Content.Load<Song>("A Soul As Red As Ground Cherry"); backgroundImage = game.Content.Load<Texture2D>("Sky"); bulletTexture = game.Content.Load<Texture2D>("testbullet"); // Start playing level music // MediaPlayer.Play(music); screenWidth = game.gameWidth; screenHeight = game.gameHeight; }