コード例 #1
0
 public GameState()
 {
     this.buildState = new BuildState();
     this.regularState = new RegularState();
     this.pauseState = new PauseState();
     state = regularState;
 }
コード例 #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            RegularState regularstate = (RegularState)db.GPAStates.Find(id);

            db.GPAStates.Remove(regularstate);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #3
0
        //
        // GET: /RegularState/Delete/5

        public ActionResult Delete(int id = 0)
        {
            RegularState regularstate = (RegularState)db.GPAStates.Find(id);

            if (regularstate == null)
            {
                return(HttpNotFound());
            }
            return(View(regularstate));
        }
コード例 #4
0
 public ActionResult Edit(RegularState regularstate)
 {
     if (ModelState.IsValid)
     {
         db.Entry(regularstate).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(regularstate));
 }
 public ActionResult Edit([Bind(Include = "GPAStateId,LowerLimit,UpperLimit,TuitionRateFactor")] RegularState regularState)
 {
     if (ModelState.IsValid)
     {
         db.Entry(regularState).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(regularState));
 }
コード例 #6
0
        //
        // GET: /RegularState/Edit/5

        public ActionResult Edit(int id = 0)
        {
            RegularState regularstate = db.RegularStates.Find(id);

            if (regularstate == null)
            {
                return(HttpNotFound());
            }
            return(View(regularstate));
        }
コード例 #7
0
        public ActionResult Create(RegularState regularstate)
        {
            if (ModelState.IsValid)
            {
                db.GPAStates.Add(regularstate);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(regularstate));
        }
コード例 #8
0
ファイル: House.cs プロジェクト: xcmel/FWPGame
 public House(Texture2D texture, Vector2 position, Vector2 mapPosition, Texture2D[] animateSequence, Texture2D burnt)
     : base(texture, position)
 {
     myMapPosition = mapPosition;
     name = "House";
     myAnimateSequence = animateSequence;
     myAnimate = new Animate(animateSequence);
     SetUpAnimate();
     myBurnt = burnt;
     myState = new RegularState(this);
 }
        public ActionResult Create([Bind(Include = "GPAStateId,LowerLimit,UpperLimit,TuitionRateFactor")] RegularState regularState)
        {
            if (ModelState.IsValid)
            {
                db.GPAStates.Add(regularState);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(regularState));
        }
コード例 #10
0
ファイル: People.cs プロジェクト: xcmel/FWPGame
 public People(Texture2D texture, Vector2 position, Vector2 mapPosition, Texture2D[] burningSequence, Texture2D burnt)
     : base(texture, position)
 {
     myMapPosition = mapPosition;
     name = "People";
     myBurningSequence = burningSequence;
     myBurning = new Animate(burningSequence);
     SetUpBurning();
     myBurnt = burnt;
     myState = new RegularState(this);
 }
        // GET: RegularStates/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RegularState regularState = (RegularState)db.GPAStates.Find(id);

            if (regularState == null)
            {
                return(HttpNotFound());
            }
            return(View(regularState));
        }
コード例 #12
0
ファイル: Goomba.cs プロジェクト: nathanbengal/SuperMarioBros
 public Goomba(int x, int y)
 {
     xCoordinate = x;
     yCoordinate = y;
     sprite      = SpriteFactory.Instance.CreateGoombaSprite();
     //sprite = SpriteFactory.Instance.CreateBigGoombaSprite();
     width         = sprite.MaxWidth;
     height        = sprite.MaxHeight;
     movementState = new EnemyLeftMovementState();
     physics       = new RegularPhysics(xCoordinate, yCoordinate);
     powerState    = new RegularState(this);
     ai            = new RegularAI();
     immuneTimer   = 0;
     immune        = false;
 }
コード例 #13
0
ファイル: Tree.cs プロジェクト: xcmel/FWPGame
 public Tree(Texture2D texture, Vector2 position, Vector2 mapPosition,
     Texture2D[] burningSequence, Texture2D burnt, Texture2D[] multiplyTree)
     : base(texture, position)
 {
     myMapPosition = mapPosition;
     name = "Tree";
     myBurningSequence = burningSequence;
     myBurning = new Animate(burningSequence);
     SetUpBurning();
     myBurnt = burnt;
     myMultiplySequence = multiplyTree;
     myMultiply = new Animate(multiplyTree);
     SetUpMultiply();
     myState = new RegularState(this);
 }
コード例 #14
0
        //
        // GET: /RegularState/

        public ActionResult Index()
        {
            return(View(RegularState.getInstance()));
        }
コード例 #15
0
 // GET: RegularStates
 public ActionResult Index()
 {
     //return View(db.RegularStates.ToList());
     return(View(RegularState.getInstance()));
 }