示例#1
0
        //generating sauce type
        public void GeneratingCustomerChoice2()
        {
            int c2 = r.Next(1, 4);

            if (c2 == 1)
            {
                Toppings to = new Toppings(870, 50, speechfoodw, speechfoodh, Color.Brown, "brown");
                custochoice2.Add(to);
            }
            else if (c2 == 2)
            {
                Toppings tt = new Toppings(870, 50, speechfoodw, speechfoodh, Color.Red, "red");
                custochoice2.Add(tt);
            }
            else if (c2 == 3)
            {
                Toppings tth = new Toppings(870, 50, speechfoodw, speechfoodh, Color.Yellow, "yellow");
                custochoice2.Add(tth);
            }
        }
示例#2
0
        public void OnStart()
        {
            switch (levelNumber)
            {
            case 1:
                moodspeeds = Convert.ToInt16(levels[0].moodspeed);
                numbers    = Convert.ToInt16(levels[0].custonumber);
                choice1s   = Convert.ToInt16(levels[0].choiceone);
                choice2s   = Convert.ToInt16(levels[0].choicetwo);
                quotas     = Convert.ToDouble(levels[0].quota);
                break;

            case 2:
                moodspeeds = Convert.ToInt16(levels[1].moodspeed);
                numbers    = Convert.ToInt16(levels[1].custonumber);  //apparently not in the correct format
                choice1s   = Convert.ToInt16(levels[1].choiceone);
                choice2s   = Convert.ToInt16(levels[1].choicetwo);
                quotas     = Convert.ToDouble(levels[1].quota);
                break;

            case 3:
                moodspeeds = Convert.ToInt16(levels[2].moodspeed);
                numbers    = Convert.ToInt16(levels[2].custonumber);
                choice1s   = Convert.ToInt16(levels[2].choiceone);
                choice2s   = Convert.ToInt16(levels[2].choicetwo);
                quotas     = Convert.ToDouble(levels[2].quota);
                break;
            }

            //creating counter
            Object counter = new Object(counterx, countery - (counterh / 2), counterw, counterh, Color.Black);
            //creating incounter
            Object incounter = new Object(incounterx, incountery, incounterw, incounterh, Color.White);
            //creating holder
            Object holder = new Object(holderx, holdery, holderw, holderh, Color.DarkRed);

            //creating the chooser
            chooser = new Object(20, 735, foodw, foodh, Color.Black);
            //foodw is 120
            //foodh is 172

            //creating foods
            Food     f1  = new Food(20, 735, foodw, foodh, RushAndCrush.Properties.Resources.whiteb, "white");
            Food     f2  = new Food(150, 735, foodw, foodh, RushAndCrush.Properties.Resources.brownb, "brown");
            Food     f3  = new Food(280, 735, foodw, foodh, RushAndCrush.Properties.Resources.sesameb, "sesame");
            Food     f4  = new Food(410, 735, foodw, foodh, RushAndCrush.Properties.Resources.veg1, "veg1");
            Food     f5  = new Food(540, 735, foodw, foodh, RushAndCrush.Properties.Resources.veg2, "veg2");
            Food     f6  = new Food(670, 735, foodw, foodh, RushAndCrush.Properties.Resources.veg3, "veg3");
            Toppings t7  = new Toppings(20, 917, foodw, foodh, Color.Brown, "brown");
            Toppings t8  = new Toppings(150, 917, foodw, foodh, Color.Red, "red");
            Toppings t9  = new Toppings(280, 917, foodw, foodh, Color.Yellow, "yellow");
            Food     f10 = new Food(410, 917, foodw, foodh, RushAndCrush.Properties.Resources.meat1, "meat1");
            Food     f11 = new Food(540, 917, foodw, foodh, RushAndCrush.Properties.Resources.meat2, "meat2");
            Food     f12 = new Food(670, 917, foodw, foodh, RushAndCrush.Properties.Resources.meat3, "meat3");
            Drink    dr1 = new Drink(holderx + (holderw - drinkw) / 2, holdery + (holderh - drinkh - drinkh) / 3, drinkw, drinkh, RushAndCrush.Properties.Resources.strawberryd);
            Drink    dr2 = new Drink(holderx + (holderw - drinkw) / 2, holdery + (holderh - drinkh - drinkh) / 3 + drinkh + (holderh - drinkh - drinkh) / 3, drinkw, drinkh, RushAndCrush.Properties.Resources.chocolated);

            //adding to list
            items.Add(counter);
            items.Add(incounter);
            items.Add(holder);


            foods.Add(f1);
            foods.Add(f2);
            foods.Add(f3);
            foods.Add(f4);
            foods.Add(f5);
            foods.Add(f6);
            //foods.Add(f7);
            //foods.Add(f8);
            //foods.Add(f9);
            foods.Add(f10);
            foods.Add(f11);
            foods.Add(f12);

            toppings.Add(t7);
            toppings.Add(t8);
            toppings.Add(t9);

            drinks.Add(dr1);
            drinks.Add(dr2);

            //below are customers stuff

            CustoCreater();

            mood = new MoodLevel(500, 100, 100, 400, 500, 300, 100, 200, Color.Yellow);


            //customers' choices that are randomized
            customerChoiceNumber = r.Next(choice1s, choice2s);

            //level one only deals with one choice#
            if (customerChoiceNumber == 3)
            {
                //all of these supposedly show up in speech bubbles
                GeneratingCustomerChoice1(0, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 0);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 0);
                GeneratingCustomerChoice2();
            }
            //level two deals with three choice#s
            //drinks option only starts at level 2
            else if (customerChoiceNumber == 4)
            {
                //all of these supposedly show up in speech bubbles
                GeneratingCustomerChoice1(0, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 0);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 90);
                GeneratingCustomerChoice2();
                //GeneratingCustomerChoice3();
            }
            else if (customerChoiceNumber == 5)
            {
                GeneratingCustomerChoice1(0, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 0);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 90);
                GeneratingCustomerChoice1(0, 90);
                GeneratingCustomerChoice2();
                //GeneratingCustomerChoice3();
            }
            else if (customerChoiceNumber == 6)
            {
                GeneratingCustomerChoice1(0, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 0);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 90);
                GeneratingCustomerChoice1(0, 90);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 90);
                GeneratingCustomerChoice2();
                //GeneratingCustomerChoice3();
            }
            //level three deals with three choice#s
            else if (customerChoiceNumber == 7)
            {
                GeneratingCustomerChoice1(0, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 0);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 90);
                GeneratingCustomerChoice1(0, 90);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 90);
                GeneratingCustomerChoice1(speechfoodw + 10, 180);
                GeneratingCustomerChoice2();
                //GeneratingCustomerChoice3();
            }
            else if (customerChoiceNumber == 8)
            {
                GeneratingCustomerChoice1(0, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 0);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 90);
                GeneratingCustomerChoice1(0, 90);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 90);
                GeneratingCustomerChoice1(speechfoodw + 10, 180);
                GeneratingCustomerChoice1(0, 180);
                GeneratingCustomerChoice2();
                //GeneratingCustomerChoice3();
            }
            else if (customerChoiceNumber == 9)
            {
                GeneratingCustomerChoice1(0, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 0);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 0);
                GeneratingCustomerChoice1(speechfoodw + 10, 90);
                GeneratingCustomerChoice1(0, 90);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 90);
                GeneratingCustomerChoice1(speechfoodw + 10, 180);
                GeneratingCustomerChoice1(0, 180);
                GeneratingCustomerChoice1(speechfoodw + 20 + speechfoodw, 180);
                GeneratingCustomerChoice2();
                //GeneratingCustomerChoice3();
            }
        }