// Start is called before the first frame update void Start() { audio = GetComponent <AudioSource>(); rb = GetComponent <Rigidbody>(); estaTienda = false; estaMenuTienda = false; trampasScript = GetComponent <Trampas>(); animator = GetComponent <Animator>(); tiempoHot = 0; }
public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here Trampas objTrampa = new Trampas(); objTrampa.IdCampo = int.Parse(collection["IdCampo"]); objTrampa.IdEstado = int.Parse(collection["IdEstado"]); objTrampa.BateriaFElab = DateTime.Parse(collection["BateriaFElab"]); objTrampa.BateriaFVenc = DateTime.Parse(collection["BateriaFVenc"]); db.Trampas.Add(objTrampa); db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }