public override void Init(Trash _trash) { trash = _trash as TrashC; nameText.text = trash.trashName; stopBtn.onClick.AddListener(() => { trashImageAnimator.SetBool("Stop", true); handAnimator.SetBool("Stop", true); if (throwCoroutine != null) { StopCoroutine(throwCoroutine); throwCoroutine = null; } Finish(!trash.throwingIsAnswer); }); RegisterButton(stopBtn); trashImage.sprite = trash.image; bin.Set(trash.typeBottom); throwCoroutine = StartCoroutine(Throw()); //Vector2 handSize = handImage.rectTransform.sizeDelta; //handSize = new Vector2(Mathf.Lerp(500f, 850f, trash.handDepth), handSize.y); //handImage.rectTransform.sizeDelta = handSize; }
public ActionResult DeleteConfirmed(int id) { TrashC customer = db.TrashC.Find(id); db.TrashC.Remove(customer); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Create([Bind(Include = "FirstName, LastName, Address, City, State, Zipcode, Days, StartDate, EndDate, ExtraPickIp, Bill")] TrashC customer) { string currentUserId = User.Identity.GetUserId(); customer.ApplicationUserId = currentUserId; db.TrashC.Add(customer); db.SaveChanges(); return(RedirectToAction("Details")); }
public ActionResult Delete(int id) { TrashC customer = db.TrashC.Find(id); if (customer == null) { return(HttpNotFound()); } return(View(customer)); }
public ActionResult Edit(TrashC customer) { if (ModelState.IsValid) { db.Entry(customer).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(customer)); }
public ActionResult Edit(int id = 0) { TrashC customer = db.TrashC.Find(id); return(View(customer)); }