Exemplo n.º 1
0
        private void Awake()
        {
            m_animator = GetComponentInParent <Animator>();

#if SALSA
            m_salsa = GetComponent <Salsa>();
#endif
        }
Exemplo n.º 2
0
 public Pizza(string nombre, Tamanio tamanio, Masa masa, Salsa salsa, List <Ingredientes> ingredientes)
 {
     this.Nombre       = nombre;
     this.Tamanio      = tamanio;
     this.Masa         = masa;
     this.Salsa        = salsa;
     this.Ingredientes = ingredientes;
 }
Exemplo n.º 3
0
        public void Put(int id, [FromBody] Salsa newObj)
        {
            var oldObj = db.Salsa.Find(id);

            if (oldObj == null)
            {
                return;
            }
            newObj.Id = oldObj.Id;
            db.Entry(oldObj).CurrentValues.SetValues(newObj);
            db.SaveChanges();
        }
Exemplo n.º 4
0
    string Instype;                                       //socket message type

    // Start is called before the first frame update
    void Start()
    {
        salsa            = (Salsa)GameObject.Find("biaoqing12").GetComponent <Salsa>();
        animator         = salsa.GetComponent <Animator>();
        instructionQueue = new Queue();
        UserGameRecords  = new Queue();
        VHgameQueue      = new Queue();
        VHGameRecords    = new Queue();

        //start socket connection
        startClient();

        animator.speed = 2F;
    }
Exemplo n.º 5
0
        public BookingHandler()
        {
            col                 = new Collector();
            _fitness            = new ObservableCollection <Event>();
            _yoga               = new ObservableCollection <Event>();
            _salsa              = new ObservableCollection <Event>();
            _karate             = new ObservableCollection <Event>();
            _zumba              = new ObservableCollection <Event>();
            _ballet             = new ObservableCollection <Event>();
            _poledance          = new ObservableCollection <Event>();
            _eventListSingleton = EventListSingleton.GetInstance();
            _eventListSingleton.SetEvents(col.Events);

            foreach (var Event in _eventListSingleton.GetDates())
            {
                if (Event.Type == "Fitness")
                {
                    Fitness.Add(Event);
                }
                if (Event.Type == "Yoga")
                {
                    Yoga.Add(Event);
                }
                if (Event.Type == "Salsa")
                {
                    Salsa.Add(Event);
                }
                if (Event.Type == "Pole dance")
                {
                    Poledance.Add(Event);
                }
                if (Event.Type == "Ballet")
                {
                    Ballet.Add(Event);
                }
                if (Event.Type == "Zumba")
                {
                    Zumba.Add(Event);
                }
                if (Event.Type == "Karate")
                {
                    Karate.Add(Event);
                }
            }
        }
Exemplo n.º 6
0
        private static void ConfigureSalsaSettings(AudioClip clip, QueueProcessor qp)
        {
            salsa = selectedObject.GetComponent <Salsa>();
            if (salsa == null)
            {
                salsa = selectedObject.AddComponent <Salsa>();
            }

            // configure AudioSource for demonstration
            var audSrc = selectedObject.GetComponent <AudioSource>();

            if (audSrc == null)
            {
                audSrc = selectedObject.AddComponent <AudioSource>();
            }
            audSrc.playOnAwake = true;
            audSrc.loop        = false;
            if (clip != null && audSrc.clip == null)
            {
                audSrc.clip = clip;
            }
            salsa.audioSrc = audSrc;

            salsa.queueProcessor = qp;

            // adjust salsa settings
            //	- data analysis settings
            salsa.autoAdjustAnalysis   = autoAdjustAnalysis;
            salsa.autoAdjustMicrophone = autoAdjustMicrophone;
            salsa.audioUpdateDelay     = audioUpdateDelay;
            //	- advanced dynamics
            salsa.loCutoff           = loCutoff;
            salsa.hiCutoff           = hiCutoff;
            salsa.useAdvDyn          = useAdvDyn;
            salsa.advDynPrimaryBias  = advDynPrimaryBias;
            salsa.useAdvDynJitter    = useAdvDynJitter;
            salsa.advDynJitterAmount = advDynJitterAmount;
            salsa.advDynJitterProb   = advDynJitterProb;
            salsa.advDynSecondaryMix = advDynSecondaryMix;

            salsa.emphasizerTrigger = emphasizerTrigger;

            salsa.visemes.Clear();
        }
Exemplo n.º 7
0
        /// <summary>
        /// Ensure all Suite references are linked. Requires an LOD to be active.
        /// </summary>
        /// <param name="lodLevel"></param>
        /// <param name="clip"></param>
        private void SetReferences(int lodLevel, AudioClip clip = null)
        {
            salsa  = GetComponent <Salsa>();
            emoter = GetComponent <Emoter>();
            eyes   = GetComponent <Eyes>();

            if (salsa == null || emoter == null)
            {
                OneClickAutodeskCG.Setup(gameObject, clip, lodLevel);
                salsa  = GetComponent <Salsa>();
                emoter = GetComponent <Emoter>();
            }

            if (eyes == null)
            {
                OneClickAutodeskCgEyes.Setup(gameObject, lodLevel);
                eyes = GetComponent <Eyes>();
            }
        }
Exemplo n.º 8
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
    //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        salsa    = (Salsa)GameObject.Find("biaoqing12").GetComponent <Salsa>(); //access the VH model
        animator = salsa.GetComponent <Animator>();                             //access the animator
        animator.SetBool("goodbye", false);                                     //set the animation state flag to false after animation finishes
    }
Exemplo n.º 9
0
        static void Main(string[] args)
        {
            string ing, kitchen;

            Console.Write("Enter Country (SA/US): ");
            kitchen = Console.ReadLine();
            Console.Write("Do you want to create a Taco or Burrito? ");
            ing = Console.ReadLine();
            Console.WriteLine();
            Console.WriteLine();

            if (kitchen == "SA" || kitchen == "sa")
            {
                if (ing == "Taco" || ing == "taco")
                {
                    Taco saTaco = new Taco(new SAIngredientFactory());
                    Console.WriteLine($"SA Taco: {saTaco.DescribeTaco()}");
                }
                else if (ing == "Burrito" || ing == "burrito")
                {
                    Burrito saBurrito = new Burrito(new SAIngredientFactory());
                    Console.WriteLine($"SA Burrito: {saBurrito.DescribeBurrito()}");
                }
            }
            else if (kitchen == "US" || kitchen == "us")
            {
                if (ing == "Taco" || ing == "taco")
                {
                    Taco usTaco = new Taco(new USIngredientFactory());
                    Console.WriteLine($"US Taco: {usTaco.DescribeTaco()}");
                }
                else if (ing == "Burrito" || ing == "burrito")
                {
                    Burrito usBurrito = new Burrito(new USIngredientFactory());
                    Console.WriteLine($"US Burrito: {usBurrito.DescribeBurrito()}");
                }
            }

            //----------------------------------- Adding fillings to ingredient for SA Taco kitchen, for burrito just change Taco to burrito in next line

            Ingredient newIngredientSA = new Taco(new SAIngredientFactory());
            string     userInputSA     = "Yes";
            string     chosenFillingSA;

            while (userInputSA == "Yes" || userInputSA == "yes" || userInputSA == "YES")
            {
                Console.Write("What filling do you want to add to your ingredient? ");
                chosenFillingSA = Console.ReadLine();
                switch (chosenFillingSA)
                {
                case "Chicken":
                case "chicken":
                    newIngredientSA = new Chicken(newIngredientSA);
                    break;

                case "Mutton":
                case "mutton":
                    newIngredientSA = new Mutton(newIngredientSA);
                    break;

                case "Samp":
                case "samp":
                    newIngredientSA = new Samp(newIngredientSA);
                    break;

                case "Chedder Cheese":
                case "chedder cheese":
                case "Chedder cheese":
                    newIngredientSA = new CheddarCheese(newIngredientSA);
                    break;

                case "Sliced Avocados":
                case "sliced avocados":
                case "Sliced avocados":
                    newIngredientSA = new SlicedAvocados(newIngredientSA);
                    break;

                case "Jasmin Rice":
                case "jasmin rice":
                case "Jasmin rice":
                    newIngredientSA = new JasminRice(newIngredientSA);
                    break;

                case "Refried Beans":
                case "Refried beans":
                case "refried beans":
                    newIngredientSA = new RefriedBeans(newIngredientSA);
                    break;

                case "Smooth Cream Cheese":
                case "smooth cream cheese":
                case "Smooth Cream cheese":
                    newIngredientSA = new SmoothCreamCheese(newIngredientSA);
                    break;

                case "Relish":
                case "relish":
                    newIngredientSA = new Relish(newIngredientSA);
                    break;

                case "Jalapeno Chilies":
                case "jalapeno chilies":
                case "Jalapeno chilies":
                    newIngredientSA = new JalapenoChilies(newIngredientSA);
                    break;
                }// end switch
                Console.Write("Do you want to add another filling to your ingredient? ");
                userInputSA = Console.ReadLine();
            } // end while loop
            Console.WriteLine();
            Console.WriteLine(newIngredientSA.GetDiscription() + " \tFinal Price: " + newIngredientSA.Cost().ToString("C"));
            Console.WriteLine();



            //----------------------------------- Adding fillings to ingredient for US Taco kitchen, for burrito just change Taco to Burrito in next line

            Ingredient newIngredientUS = new Taco(new USIngredientFactory());
            string     userInputUS     = "Yes";
            string     chosenFillingUS;

            while (userInputUS == "Yes" || userInputUS == "yes" || userInputUS == "YES")
            {
                Console.Write("What filling do you want to add to your ingredient? ");
                chosenFillingUS = Console.ReadLine();
                switch (chosenFillingUS)
                {
                case "Turkey":
                case "turkey":
                    newIngredientUS = new Turkey(newIngredientUS);
                    break;

                case "Beef":
                case "beef":
                    newIngredientUS = new Beef(newIngredientUS);
                    break;

                case "Chickpeas":
                case "chickpeas":
                    newIngredientUS = new Chickpeas(newIngredientUS);
                    break;

                case "Pepper Jack Cheese":
                case "pepper jack cheese":
                case "Pepper jack cheese":
                    newIngredientUS = new PepperJackCheese(newIngredientUS);
                    break;

                case "Guacamole":
                case "guacomole":
                    newIngredientUS = new Guacamole(newIngredientUS);
                    break;

                case "Basmati Rice":
                case "basmati rice":
                case "Basmati rice":
                    newIngredientUS = new BasmatiRice(newIngredientUS);
                    break;

                case "Black Beans":
                case "black beans":
                case "Black beans":
                    newIngredientUS = new BlackBeans(newIngredientUS);
                    break;

                case "Chunky Cream Cheese":
                case "chunky cream cheese":
                case "Chunky Cream cheese":
                    newIngredientUS = new ChunkyCreamCheese(newIngredientUS);
                    break;

                case "Salsa":
                case "salsa":
                    newIngredientUS = new Salsa(newIngredientUS);
                    break;

                case "Habanero Chilies":
                case "habanero chilies":
                case "Habanero chilies":
                    newIngredientUS = new HabaneroChilies(newIngredientUS);
                    break;
                }// end switch
                Console.Write("Do you want to add another filling to your ingredient? ");
                userInputUS = Console.ReadLine();
            } // end while loop
            Console.WriteLine();
            Console.WriteLine(newIngredientUS.GetDiscription() + " \tFinal Price: " + newIngredientUS.Cost().ToString("C"));
            Console.WriteLine();

            Console.ReadLine();
        }
Exemplo n.º 10
0
        protected static void DoOneClickiness(GameObject go, AudioClip clip)
        {
            selectedObject = go;

            // setup QueueProcessor
            var qp = selectedObject.GetComponent <QueueProcessor>();            // get QueueProcessor on current object -- we no longer look in-scene.

            if (qp == null)
            {
                qp = selectedObject.AddComponent <QueueProcessor>();
            }

            // if there is a uepProxy, get reference to it.
            uepProxy = go.GetComponent <UmaUepProxy>();

            foreach (var configuration in oneClickConfigurations)
            {
                // module-specific configuraiton requirements::
                switch (configuration.type)
                {
                    #region salsa-specific setup
                case OneClickConfiguration.ConfigType.Salsa:
                    salsa = selectedObject.GetComponent <Salsa>();
                    if (salsa == null)
                    {
                        salsa = selectedObject.AddComponent <Salsa>();
                    }

                    // configure AudioSource for demonstration
                    var audSrc = selectedObject.GetComponent <AudioSource>();
                    if (audSrc == null)
                    {
                        audSrc = selectedObject.AddComponent <AudioSource>();
                    }
                    audSrc.playOnAwake = true;
                    audSrc.loop        = false;
                    if (clip != null)
                    {
                        audSrc.clip = clip;
                    }
                    salsa.audioSrc = audSrc;

                    salsa.queueProcessor = qp;

                    // adjust salsa settings
                    //	- data analysis settings
                    salsa.autoAdjustAnalysis   = autoAdjustAnalysis;
                    salsa.autoAdjustMicrophone = autoAdjustMicrophone;
                    //	- advanced dynamics
                    salsa.loCutoff           = loCutoff;
                    salsa.hiCutoff           = hiCutoff;
                    salsa.useAdvDyn          = useAdvDyn;
                    salsa.advDynPrimaryBias  = advDynPrimaryBias;
                    salsa.useAdvDynJitter    = useAdvDynJitter;
                    salsa.advDynJitterAmount = advDynJitterAmount;
                    salsa.advDynJitterProb   = advDynJitterProb;
                    salsa.advDynSecondaryMix = advDynSecondaryMix;

                    salsa.emphasizerTrigger = emphasizerTrigger;
                    break;
                    #endregion

                    #region emoter-specific setup
                case OneClickConfiguration.ConfigType.Emoter:
                    emoter = selectedObject.GetComponent <Emoter>();
                    if (emoter == null)
                    {
                        emoter = selectedObject.AddComponent <Emoter>();
                    }

                    salsa.emoter          = emoter;
                    emoter.queueProcessor = qp;

                    emoter.useRandomEmotes         = useRandomEmotes;
                    emoter.isChancePerEmote        = isChancePerEmote;
                    emoter.NumRandomEmotesPerCycle = numRandomEmotesPerCycle;
                    emoter.randomEmoteMinTimer     = randomEmoteMinTimer;
                    emoter.randomEmoteMaxTimer     = randomEmoteMaxTimer;
                    emoter.randomChance            = randomChance;
                    emoter.useRandomFrac           = useRandomFrac;
                    emoter.randomFracBias          = randomFracBias;
                    emoter.useRandomHoldDuration   = useRandomHoldDuration;
                    emoter.randomHoldDurationMin   = randomHoldDurationMin;
                    emoter.randomHoldDurationMax   = randomHoldDurationMax;

                    break;
                    #endregion
                }

                #region Skinned Mesh Renderer search for shape component creation.
                if (configuration.smrSearches.Count > 0)
                {
                    var allSmrs = selectedObject.GetComponentsInChildren <SkinnedMeshRenderer>();
                    // quick test to see if this object has the necessary stuff
                    if (allSmrs == null || allSmrs.Length == 0)
                    {
                        Debug.LogError("This object does not have the required components. No Skinned Mesh Renderers found. Ensure this one-click script was applied to the root of the model prefab in the scene hierarchy.");
                        return;
                    }

                    // Find the necessary SMR's
                    foreach (var smr in allSmrs)
                    {
                        foreach (var smrSearch in configuration.smrSearches)
                        {
                            if (Regex.IsMatch(smr.name, smrSearch, RegexOptions.IgnoreCase))
                            {
                                requiredSmrs.Add(smr);
                            }
                        }
                    }

                    if (requiredSmrs.Count == 0)
                    {
                        Debug.LogError("This object does not have the required components. Could not find the referenced SMRs. Ensure the appropriate one-click was used for your model type and generation.");
                        return;
                    }
                }
                #endregion                 // Skinned Mesh Renderer search for shape component creation.

                ConfigureModule(configuration);

                ResetForNextConfiguration();
            }
        }
Exemplo n.º 11
0
        static void Main(string[] args)
        {
            // Configure Observer pattern
            ConcreteKitchen sKitchen    = new ConcreteKitchen();
            ConcreteKitchen sIngredient = new ConcreteKitchen();

            // Sets the predefined observers available
            sKitchen.Attach(new ConcreteObserver(sKitchen, "Kitchen"));
            sIngredient.Attach(new ConcreteObserver(sIngredient, "Ingredient"));

            string ing, kitchen;

            Console.Write("Enter Country (SA/US): ");
            kitchen = Console.ReadLine();

            switch (kitchen)
            {
            // Changes the Kitchen observer to be kitchen location
            case "US": sKitchen.SubjectState = "US Kitchen"; break;

            case "us": sKitchen.SubjectState = "US Kitchen"; break;

            case "SA": sKitchen.SubjectState = "SA Kitchen"; break;

            case "sa": sKitchen.SubjectState = "SA Kitchen"; break;
            }
            //Goes through Subject class to ConcreteObserver class to output in the console window
            sKitchen.Notify();

            //Setting the Ingredient
            Console.Write("Choose Ingredient Taco/Burrito: ");
            ing = Console.ReadLine();
            switch (ing)
            {
            // Changes the Ingredient observer to be an ingredient type
            case "Taco": sIngredient.SubjectState = "Taco"; break;

            case "taco": sIngredient.SubjectState = "Taco"; break;

            case "Burrito": sIngredient.SubjectState = "Burrito"; break;

            case "burrito": sIngredient.SubjectState = "Burrito"; break;
            }
            //Goes through Subject class to ConcreteObserver class to output in the console window
            sIngredient.Notify();


            Console.WriteLine();
            Console.WriteLine();

            if (kitchen == "SA" || kitchen == "sa" || kitchen == "Sa")
            {
                if (ing == "Taco" || ing == "taco" || ing == "TACO")
                {
                    Taco saTaco = new Taco(new SAIngredientFactory());
                    Console.WriteLine($"SA Taco: {saTaco.DescribeTaco()}");
                    // ---------------------------- observer testing
                    Ingredient newIngredientSA = new Taco(new SAIngredientFactory());
                    string     userInputSA     = "Yes";
                    string     chosenFillingSA;
                    while (userInputSA == "Yes" || userInputSA == "yes" || userInputSA == "YES")
                    {
                        Console.Write("What filling do you want to add to your ingredient? ");
                        chosenFillingSA = Console.ReadLine();
                        switch (chosenFillingSA)
                        {
                        case "Chicken":
                        case "chicken":
                            newIngredientSA = new Chicken(newIngredientSA);
                            break;

                        case "Mutton":
                        case "mutton":
                            newIngredientSA = new Mutton(newIngredientSA);
                            break;

                        case "Samp":
                        case "samp":
                            newIngredientSA = new Samp(newIngredientSA);
                            break;

                        case "Cheddar Cheese":
                        case "cheddar cheese":
                        case "Cheddar cheese":
                            newIngredientSA = new CheddarCheese(newIngredientSA);
                            break;

                        case "Sliced Avocados":
                        case "sliced avocados":
                        case "Sliced avocados":
                            newIngredientSA = new SlicedAvocados(newIngredientSA);
                            break;

                        case "Jasmin Rice":
                        case "jasmin rice":
                        case "Jasmin rice":
                            newIngredientSA = new JasminRice(newIngredientSA);
                            break;

                        case "Refried Beans":
                        case "Refried beans":
                        case "refried beans":
                            newIngredientSA = new RefriedBeans(newIngredientSA);
                            break;

                        case "Smooth Cream Cheese":
                        case "smooth cream cheese":
                        case "Smooth Cream cheese":
                            newIngredientSA = new SmoothCreamCheese(newIngredientSA);
                            break;

                        case "Relish":
                        case "relish":
                            newIngredientSA = new Relish(newIngredientSA);
                            break;

                        case "Jalapeno Chilies":
                        case "jalapeno chilies":
                        case "Jalapeno chilies":
                            newIngredientSA = new JalapenoChilies(newIngredientSA);
                            break;
                        }// end switch
                        Console.Write("Do you want to add another filling to your ingredient? ");
                        userInputSA = Console.ReadLine();
                    } // end while loop
                    Console.WriteLine();
                    Console.WriteLine(newIngredientSA.GetDiscription() + " \tFinal Price: " + newIngredientSA.Cost().ToString("C"));
                    Console.WriteLine();
                    // ---------------------------- end observer testing
                }
                else if (ing == "Burrito" || ing == "burrito" || ing == "BURRITO")
                {
                    Burrito saBurrito = new Burrito(new SAIngredientFactory());
                    Console.WriteLine($"SA Burrito: {saBurrito.DescribeBurrito()}");
                    // ---------------------------- observer testing
                    Ingredient newIngredientSA = new Burrito(new SAIngredientFactory());
                    string     userInputSA     = "Yes";
                    string     chosenFillingSA;
                    while (userInputSA == "Yes" || userInputSA == "yes" || userInputSA == "YES")
                    {
                        Console.Write("What filling do you want to add to your ingredient? ");
                        chosenFillingSA = Console.ReadLine();
                        switch (chosenFillingSA)
                        {
                        case "Chicken":
                        case "chicken":
                            newIngredientSA = new Chicken(newIngredientSA);
                            break;

                        case "Mutton":
                        case "mutton":
                            newIngredientSA = new Mutton(newIngredientSA);
                            break;

                        case "Samp":
                        case "samp":
                            newIngredientSA = new Samp(newIngredientSA);
                            break;

                        case "Cheddar Cheese":
                        case "cheddar cheese":
                        case "Cheddar cheese":
                            newIngredientSA = new CheddarCheese(newIngredientSA);
                            break;

                        case "Sliced Avocados":
                        case "sliced avocados":
                        case "Sliced avocados":
                            newIngredientSA = new SlicedAvocados(newIngredientSA);
                            break;

                        case "Jasmin Rice":
                        case "jasmin rice":
                        case "Jasmin rice":
                            newIngredientSA = new JasminRice(newIngredientSA);
                            break;

                        case "Refried Beans":
                        case "Refried beans":
                        case "refried beans":
                            newIngredientSA = new RefriedBeans(newIngredientSA);
                            break;

                        case "Smooth Cream Cheese":
                        case "smooth cream cheese":
                        case "Smooth Cream cheese":
                            newIngredientSA = new SmoothCreamCheese(newIngredientSA);
                            break;

                        case "Relish":
                        case "relish":
                            newIngredientSA = new Relish(newIngredientSA);
                            break;

                        case "Jalapeno Chilies":
                        case "jalapeno chilies":
                        case "Jalapeno chilies":
                            newIngredientSA = new JalapenoChilies(newIngredientSA);
                            break;
                        }// end switch
                        Console.Write("Do you want to add another filling to your ingredient? ");
                        userInputSA = Console.ReadLine();
                    } // end while loop
                    Console.WriteLine();
                    Console.WriteLine(newIngredientSA.GetDiscription() + " \tFinal Price: " + newIngredientSA.Cost().ToString("C"));
                    Console.WriteLine();
                    // ---------------------------- end observer testing
                }
            }
            else if (kitchen == "US" || kitchen == "us" || kitchen == "Us")
            {
                if (ing == "Taco" || ing == "taco" || ing == "TACO")
                {
                    Taco usTaco = new Taco(new USIngredientFactory());
                    Console.WriteLine($"US Taco: {usTaco.DescribeTaco()}");
                    // ---------------------- observer testing start
                    Ingredient newIngredientUS = new Taco(new USIngredientFactory());
                    string     userInputUS     = "Yes";
                    string     chosenFillingUS;
                    while (userInputUS == "Yes" || userInputUS == "yes" || userInputUS == "YES")
                    {
                        Console.Write("What filling do you want to add to your ingredient? ");
                        chosenFillingUS = Console.ReadLine();
                        switch (chosenFillingUS)
                        {
                        case "Turkey":
                        case "turkey":
                            newIngredientUS = new Turkey(newIngredientUS);
                            break;

                        case "Beef":
                        case "beef":
                            newIngredientUS = new Beef(newIngredientUS);
                            break;

                        case "Chickpeas":
                        case "chickpeas":
                            newIngredientUS = new Chickpeas(newIngredientUS);
                            break;

                        case "Pepper Jack Cheese":
                        case "pepper jack cheese":
                        case "Pepper jack cheese":
                            newIngredientUS = new PepperJackCheese(newIngredientUS);
                            break;

                        case "Guacamole":
                        case "guacomole":
                            newIngredientUS = new Guacamole(newIngredientUS);
                            break;

                        case "Basmati Rice":
                        case "basmati rice":
                        case "Basmati rice":
                            newIngredientUS = new BasmatiRice(newIngredientUS);
                            break;

                        case "Black Beans":
                        case "black beans":
                        case "Black beans":
                            newIngredientUS = new BlackBeans(newIngredientUS);
                            break;

                        case "Chunky Cream Cheese":
                        case "chunky cream cheese":
                        case "Chunky Cream cheese":
                            newIngredientUS = new ChunkyCreamCheese(newIngredientUS);
                            break;

                        case "Salsa":
                        case "salsa":
                            newIngredientUS = new Salsa(newIngredientUS);
                            break;

                        case "Habanero Chilies":
                        case "habanero chilies":
                        case "Habanero chilies":
                            newIngredientUS = new HabaneroChilies(newIngredientUS);
                            break;
                        }// end switch
                        Console.Write("Do you want to add another filling to your ingredient? ");
                        userInputUS = Console.ReadLine();
                    } // end while loop
                    Console.WriteLine();
                    Console.WriteLine(newIngredientUS.GetDiscription() + " \tFinal Price: " + newIngredientUS.Cost().ToString("C"));
                    Console.WriteLine();
                    // ---------------------- observer testing end
                }
                else if (ing == "Burrito" || ing == "burrito" || ing == "BURRITO")
                {
                    Burrito usBurrito = new Burrito(new USIngredientFactory());
                    Console.WriteLine($"US Burrito: {usBurrito.DescribeBurrito()}");
                    // ---------------------- observer testing start
                    Ingredient newIngredientUS = new Burrito(new USIngredientFactory());
                    string     userInputUS     = "Yes";
                    string     chosenFillingUS;
                    while (userInputUS == "Yes" || userInputUS == "yes" || userInputUS == "YES")
                    {
                        Console.Write("What filling do you want to add to your ingredient? ");
                        chosenFillingUS = Console.ReadLine();
                        switch (chosenFillingUS)
                        {
                        case "Turkey":
                        case "turkey":
                            newIngredientUS = new Turkey(newIngredientUS);
                            break;

                        case "Beef":
                        case "beef":
                            newIngredientUS = new Beef(newIngredientUS);
                            break;

                        case "Chickpeas":
                        case "chickpeas":
                            newIngredientUS = new Chickpeas(newIngredientUS);
                            break;

                        case "Pepper Jack Cheese":
                        case "pepper jack cheese":
                        case "Pepper jack cheese":
                            newIngredientUS = new PepperJackCheese(newIngredientUS);
                            break;

                        case "Guacamole":
                        case "guacomole":
                            newIngredientUS = new Guacamole(newIngredientUS);
                            break;

                        case "Basmati Rice":
                        case "basmati rice":
                        case "Basmati rice":
                            newIngredientUS = new BasmatiRice(newIngredientUS);
                            break;

                        case "Black Beans":
                        case "black beans":
                        case "Black beans":
                            newIngredientUS = new BlackBeans(newIngredientUS);
                            break;

                        case "Chunky Cream Cheese":
                        case "chunky cream cheese":
                        case "Chunky Cream cheese":
                            newIngredientUS = new ChunkyCreamCheese(newIngredientUS);
                            break;

                        case "Salsa":
                        case "salsa":
                            newIngredientUS = new Salsa(newIngredientUS);
                            break;

                        case "Habanero Chilies":
                        case "habanero chilies":
                        case "Habanero chilies":
                            newIngredientUS = new HabaneroChilies(newIngredientUS);
                            break;
                        }// end switch
                        Console.Write("Do you want to add another filling to your ingredient? ");
                        userInputUS = Console.ReadLine();
                    } // end while loop
                    Console.WriteLine();
                    Console.WriteLine(newIngredientUS.GetDiscription() + " \tFinal Price: " + newIngredientUS.Cost().ToString("C"));
                    Console.WriteLine();
                    // ---------------------- observer testing end
                }
            }

            Console.ReadLine();
        }
Exemplo n.º 12
0
 public override string ToString()
 {
     return((base._torilla ? "Tortilla, " : "") + (base.Rice ? "Rice, " : "") + Meat.ToString() + ", " + (Salsa == Salsa.Queso ? "Queso" : Salsa.ToString() + " Salsa"));
 }
Exemplo n.º 13
0
 public void Post(Salsa sync)
 {
     db.Salsa.Add(sync);
     db.SaveChanges();
 }