void Start() { if (GameObject.Find("Frog")) { frogHealth = GameObject.Find("Frog").GetComponent <Helth>(); } image = GetComponent <Image>(); }
public ActionResult DeleteConfirmed(int id) { Helth helth = db.Helths.Find(id); db.Helths.Remove(helth); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "HelthID,Name,Sername,Age,Pay,Planned_arrival")] Helth helth) { if (ModelState.IsValid) { db.Entry(helth).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(helth)); }
void Start() { thisRB = GetComponent <Rigidbody2D>(); thisAS = GetComponent <AudioSource>(); YouDeadYet = GetComponent <Helth>(); Invoke("enableAnim", Random.Range(0, 0.5f)); if (GameObject.Find("Frog")) { target = GameObject.Find("Frog").transform; } }
public ActionResult Create([Bind(Include = "HelthID,Name,Sername,Age,Pay,Planned_arrival")] Helth helth) { if (ModelState.IsValid) { db.Helths.Add(helth); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(helth)); }
// GET: Helths/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Helth helth = db.Helths.Find(id); if (helth == null) { return(HttpNotFound()); } return(View(helth)); }
private void Awake() { helth = GetComponent <Helth>(); }