예제 #1
0
    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;
        }
    }
예제 #2
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            BreakOff breakoff = db.BreakOffs.Find(id);

            db.BreakOffs.Remove(breakoff);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #3
0
        //
        // 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"));
        }
예제 #5
0
        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));
        }
예제 #6
0
 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));
 }
예제 #7
0
        //
        // 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));
        }