internal void TentacleHit(BreakOff breakOffPart, Collider missile) { if (!TentacleAlive) { return; } if (TentacleHittable) { if (breakOffPart != BreakawayParts[howManyHits]) { return; // keep the parts breaking off in sequence } StartCoroutine(TempDisableTrigger(TentacleHittable, 1f)); breakOffPart.BreakOffPart(missile.GetComponent <Rigidbody>().velocity); howManyHits++; if (howManyHits == BreakawayParts.Length) { TentacleKilled(); } missile.GetComponent <Collider>().enabled = false; } }
public ActionResult DeleteConfirmed(Guid id) { BreakOff breakoff = db.BreakOffs.Find(id); db.BreakOffs.Remove(breakoff); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /BreakOffManager/Details/5 public ActionResult Details(Guid id) { BreakOff breakoff = db.BreakOffs.Find(id); if (breakoff == null) { return(HttpNotFound()); } return(View(breakoff)); }
public ActionResult Cancle(Guid id) { BreakOff breakoff = db.BreakOffs.Find(id); if (breakoff == null) { return(HttpNotFound()); } else { breakoff.Status = "Cancle"; } db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Create(BreakOff breakoff) { if (ModelState.IsValid) { breakoff.UserID = User.Identity.Name; breakoff.BreakOffGuid = Guid.NewGuid(); ViewData["breakoffguid"] = breakoff.BreakOffGuid; breakoff.Status = "Ask"; db.BreakOffs.Add(breakoff); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(breakoff)); }
public ActionResult Edit(BreakOff breakoff) { if (ModelState.IsValid) { List <SelectListItem> cutfrom1 = new List <SelectListItem>(); cutfrom1.Add(new SelectListItem { Text = "Annual Leave", Value = "Annual Leave" }); cutfrom1.Add(new SelectListItem { Text = "Change Off", Value = "Change Off" }); ViewData["CutFrom1"] = cutfrom1; db.Entry(breakoff).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(breakoff)); }
// // GET: /BreakOffManager/Edit/5 public ActionResult Edit(Guid id) { List <SelectListItem> cutfrom1 = new List <SelectListItem>(); cutfrom1.Add(new SelectListItem { Text = "Annual Leave", Value = "Annual Leave" }); cutfrom1.Add(new SelectListItem { Text = "Change Off", Value = "Change Off" }); ViewData["CutFrom1"] = cutfrom1; BreakOff breakoff = db.BreakOffs.Find(id); if (breakoff == null) { return(HttpNotFound()); } return(View(breakoff)); }