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

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