public async Task <ActionResult <GameStuff> > PostGameStuff(GameStuff gameStuff)
        {
            _context.GameStuff.Add(gameStuff);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetGameStuff", new { id = gameStuff.Id }, gameStuff));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,GameId,PlayerId")] GameStuff gameStuff)
        {
            if (id != gameStuff.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(gameStuff);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!GameStuffExists(gameStuff.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PlayerId"] = new SelectList(_context.Set <Player>(), "Id", "Id", gameStuff.PlayerId);
            return(View(gameStuff));
        }
        public async Task <IActionResult> PutGameStuff(int id, GameStuff gameStuff)
        {
            if (id != gameStuff.Id)
            {
                return(BadRequest());
            }

            _context.Entry(gameStuff).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!GameStuffExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Example #4
0
 public void AddStuff(IStuff Stuff, int count)
 {
     for (int i = 0; i < count; i++)
     {
         IStuff st = GameStuff.DeepClone <IStuff>(Stuff);
         Things.Add(st);
     }
 }
Example #5
0
 public void AddStuff(IStuff Stuff, int count, Decimal price = 0)
 {
     for (int i = 0; i < count; i++)
     {
         IStuff st = GameStuff.DeepClone <IStuff>(Stuff);
         st.Price = (price > 0) ? price : Stuff.Price;
         Things.Add(st);
     }
 }
        public async Task <IActionResult> Create([Bind("Id,GameId,PlayerId")] GameStuff gameStuff)
        {
            if (ModelState.IsValid)
            {
                _context.Add(gameStuff);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PlayerId"] = new SelectList(_context.Set <Player>(), "Id", "Id", gameStuff.PlayerId);
            return(View(gameStuff));
        }
Example #7
0
 // Use this for initialization
 void Start()
 {
     theGame = GameObject.FindGameObjectWithTag("Bird").GetComponent <GameStuff>();
 }
Example #8
0
 void Start()
 {
     birdBody  = this.GetComponent <Rigidbody>();
     flyAmount = 5000.0f;
     theGame   = GameObject.FindGameObjectWithTag("Bird").GetComponent <GameStuff>();
 }
Example #9
0
        public static Player CreatePlayer(dynamic Stuff, Lessons lessonObject, Skills skillObject)
        {
            Player player = new Player();

            player.Name        = "Надя";
            player.LastName    = "Соколова";
            player.Description = "Надя Соколова";
            player.SmallImage  = "";

            player.HairColor = 0;
            player.HairStyle = 0;
            player.Height    = 170;

            player.DeclinationName = new String[6] {
                "", "", "", "", "", ""
            };
            player.DateOfBirth = Convert.ToDateTime("11.10.1995");
            player.Gender      = 2;
            player.Money       = 50m;

            player.Enema = false;

            player.Excite     = 0;
            player.Strength   = 10;
            player.Speed      = 5;
            player.Agility    = 5;
            player.Reaction   = 2;
            player.WillPower  = 10;
            player.Intellect  = 10;
            player.Vitality   = 5;
            player.SexualView = 0;

            player.Health = player.maxHealth;
            player.Energy = 15;
            player.Drink  = 15;
            player.Sleep  = 16;
            player.Mana   = player.maxMana;
            player.Mind   = player.maxMind;

            /*
             * player.maxHealth = 190;
             * player.maxFood = 1000;
             * player.maxDrink = 1000;
             * player.maxSleep = 1000;
             * player.maxMana = 180;
             * player.maxMind = 100;
             */

            player.LipSize      = 0;
            player.SkinTone     = 0;
            player.EyelashsSize = 0;
            player.EyeSize      = 0;

            //player.Drunk = 30;
            player.Fat               = 25;
            player.BodyMuscules      = 15;
            player.SexualOrientation = 30;

            player.AddStuff(GameStuff.DeepClone <IStuff>(Stuff.zontik));
            player.AddStuff(GameStuff.DeepClone <IStuff>(Stuff.vodka05));
            player.AddStuff(GameStuff.DeepClone <IStuff>(Stuff.samogon07l));
            player.AddSmallBagMe(GameStuff.DeepClone <SmallBag>(Stuff.smallbag1));
            player.AddBagMe(GameStuff.DeepClone <Bag>(Stuff.schoolbag1));
            player.WearStuff(GameStuff.DeepClone <IWear>(Stuff.schooldress1));
            player.WearStuff(GameStuff.DeepClone <IWear>(Stuff.schoolshoes1));
            player.WearStuff(GameStuff.DeepClone <IWear>(Stuff.bra6));
            player.WearStuff(GameStuff.DeepClone <IWear>(Stuff.panties3));
            player.WearStuff(GameStuff.DeepClone <IWear>(Stuff.bant1));
            player.AddSmallBag(GameStuff.DeepClone <Condom>(Stuff.condom));
            player.AddSmallBag(GameStuff.DeepClone <HandMirror>(Stuff.handmirror1));
            player.AddBag(GameStuff.DeepClone <IWear>(Stuff.sportshoes1));
            player.AddBag(GameStuff.DeepClone <IWear>(Stuff.sportpants1));
            player.AddBag(GameStuff.DeepClone <IWear>(Stuff.sportshirt1));

            /*player.WearStuff(GameStuff.DeepClone<IWear>(Stuff.jeans1));
             * player.WearStuff(GameStuff.DeepClone<IWear>(Stuff.panties3));
             * player.WearStuff(GameStuff.DeepClone<IWear>(Stuff.bra6));
             * player.WearStuff(GameStuff.DeepClone<IWear>(Stuff.sportshoes1));
             * player.WearStuff(GameStuff.DeepClone<IWear>(Stuff.shirt2));
             */
            player.Lessons.Lesson.Add(GameStuff.DeepClone <ILesson>(lessonObject.GetById("matematika")));
            player.Lessons.Lesson.Add(GameStuff.DeepClone <ILesson>(lessonObject.GetById("fizika")));
            player.Lessons.Lesson.Add(GameStuff.DeepClone <ILesson>(lessonObject.GetById("himija")));
            player.Lessons.Lesson.Add(GameStuff.DeepClone <ILesson>(lessonObject.GetById("geografija")));
            player.Lessons.Lesson.Add(GameStuff.DeepClone <ILesson>(lessonObject.GetById("informatika")));
            player.Lessons.Lesson.Add(GameStuff.DeepClone <ILesson>(lessonObject.GetById("fizkultura")));
            player.Lessons.Lesson.Add(GameStuff.DeepClone <ILesson>(lessonObject.GetById("biologija")));
            player.Lessons.Lesson.Add(GameStuff.DeepClone <ILesson>(lessonObject.GetById("istorija")));

            foreach (var so in skillObject.Skill)
            {
                player.Skills.Skill.Add(GameStuff.DeepClone <ISkill>(skillObject.GetById(so.id)));
            }

            //player.Skills.SetValue("vaginalskill", 100);

            return(player);
        }
Example #10
0
 public void AddThnig(IStuff Stuff)
 {
     AddStuff(GameStuff.DeepClone <IStuff>(Stuff));
 }