private IEnumerator WaitTimeOfBuff(Repas repas) { yield return(new WaitForSeconds(repas.timeOfBuff)); FindObjectOfType <WeaponOnPlayer>().damageBuff -= (repas.damageBuff - 1f); FindObjectOfType <PlayerControllerIsometric>().speedBuff -= (repas.speedBuff - 1f); GetComponent <ItemManager>().loot -= repas.lootBuff; }
public NewRepasVueModel() { serv = RepasService.Instance; List <ChambreReservee> lst = serv.chargerListChambre(); edibleRoom = new ObservableCollection <ChambreReservee>(); foreach (ChambreReservee chambre in lst) { edibleRoom.Add(chambre); } newRep = new Repas(); }
private void goAccueil(object dest) { UserControl destUC = null; switch ((string)dest) { case "accueil": destUC = ListPages.FirstOrDefault(x => x is Accueil); if (destUC == null) { destUC = new Accueil(); } break; case "clients": destUC = ListPages.FirstOrDefault(x => x is Clients); if (destUC == null) { destUC = new Clients(); } break; case "reservations": destUC = ListPages.FirstOrDefault(x => x is Reservations); if (destUC == null) { destUC = new Reservations(); } break; case "repas": destUC = ListPages.FirstOrDefault(x => x is Repas); if (destUC == null) { destUC = new Repas(); } break; case "menages": destUC = ListPages.FirstOrDefault(x => x is Menages); if (destUC == null) { destUC = new Menages(); } break; } CurrentPage = destUC; }
public void MangerRepas(Repas repas) { PlayerHealthManager phm = FindObjectOfType <PlayerHealthManager>(); phm.HealPlayer(repas.heal); FindObjectOfType <WeaponOnPlayer>().damageBuff += repas.damageBuff - 1; FindObjectOfType <PlayerControllerIsometric>().speedBuff += repas.speedBuff - 1; GetComponent <ItemManager>().loot += repas.lootBuff; phm.currentShield += repas.shieldBuff; phm.StartCoroutine(phm.AutoHeal(repas.lifeBuff, repas.timeOfBuff)); if (repas.timeOfBuff != 0) // Infini { StartCoroutine(WaitTimeOfBuff(repas)); } }
public Repas Enregistrer(Repas repas) { using (Entities.AppContext context = new Entities.AppContext()) { if (repas.Id > 0) { context.Repas.Attach(repas); context.Entry(repas).State = System.Data.Entity.EntityState.Modified; } else { context.Repas.Add(repas); } context.SaveChanges(); } return(repas); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Repas = await _context.Repas.FindAsync(id); if (Repas != null) { _context.Repas.Remove(Repas); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Repas = await _context.Repas .Include(r => r.AssistantNavigation) .Include(r => r.CookNavigation) .Include(r => r.Repas1Navigation) .Include(r => r.VaissaileuxNavigation).FirstOrDefaultAsync(m => m.Id == id); if (Repas == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Repas = await _context.Repas .Include(r => r.AssistantNavigation) .Include(r => r.CookNavigation) .Include(r => r.Repas1Navigation) .Include(r => r.VaissaileuxNavigation).FirstOrDefaultAsync(m => m.Id == id); if (Repas == null) { return(NotFound()); } ViewData["Assistant"] = new SelectList(_context.Joueurs, "Id", "Nom"); ViewData["Cook"] = new SelectList(_context.Joueurs, "Id", "Nom"); ViewData["Repas1"] = new SelectList(_context.TypeRepas, "Id", "Nom"); ViewData["Vaissaileux"] = new SelectList(_context.Joueurs, "Id", "Nom"); return(Page()); }
public void SetAmeliorationMiel(Repas pizza) { ameliorationCraftSlots[2].itemToCraft = pizza; ameliorationCraftSlots[2].RefreshUI(); }
public void SetAmeliorationBasilique(Repas pizza) { ameliorationCraftSlots[0].itemToCraft = pizza; ameliorationCraftSlots[0].RefreshUI(); }
private void enregistrer() { newRep = serv.Enregistrer(newRep); }