Beispiel #1
0
    void SetChefType()
    {
        int choice = Random.Range(0, 3);

        switch (choice)
        {
        case 0:
            chefType = ChefType.PRODUCTION;
            type     = "Production";
            break;

        case 1:
            chefType = ChefType.POPULARITY;
            type     = "Popularity";
            break;

        case 2:
            chefType = ChefType.TECHNOLOGY;
            type     = "Technology";
            break;

        default:
            Debug.Log("No chef type allocated");
            break;
        }
    }
Beispiel #2
0
        public ChefType Create(ChefType model)
        {
            _ctx.ChefTypes.Add(model);

            _ctx.SaveChanges();

            return(model);
        }
Beispiel #3
0
        public ChefType Update(ChefType model)
        {
            var entity = _ctx.ChefTypes.FirstOrDefault(x => x.Id == model.Id);

            entity.Name = model.Name;

            _ctx.SaveChanges();

            return(model);
        }
Beispiel #4
0
 public void SetType(ChefType newType)
 {
     chefType = newType;
 }