void Start()
 {
     if (GameObject.Find("Frog"))
     {
         frogHealth = GameObject.Find("Frog").GetComponent <Helth>();
     }
     image = GetComponent <Image>();
 }
Beispiel #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            Helth helth = db.Helths.Find(id);

            db.Helths.Remove(helth);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #3
0
 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;
     }
 }
Beispiel #5
0
        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));
        }
Beispiel #6
0
        // 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));
        }
Beispiel #7
0
 private void Awake()
 {
     helth = GetComponent <Helth>();
 }