示例#1
0
 public void Upgrade()
 {
     MoneyTracker.ChangeMoneyCount(-utensil.upgradeCost);
     utensil.upgradeNum++;
     utensil.cookTime    /= 2;
     utensil.upgradeCost *= 5;
     objectSprite.sprite  = RestaurantMain.GetUpgradeSprite(objectSprite.sprite);
 }
示例#2
0
    public static void GivePlateToCustomer(Recipe order, int n)
    {
        if (m_plateInHand != null && Recipe.CompareRecipe(m_plateInHand, order))
        {
            RestaurantMain.AddMoney(m_plateInHand.GetPrice());
            ChangePlateInHand(null);

            CustomerGenerator.RemoveCustomer(n);
        }
    }
        public RestaurantMenus(Window parent)
        {
            InitializeComponent();
            SolidColorBrush color = new SolidColorBrush();

            color.Color           = Color.FromArgb(120, 102, 102, 255);
            scrollView.Background = color;
            restaurantMain        = (RestaurantMain)parent;
            // get latest categoryId
            // TODO: fill categoryNames with existing categories from Database
            // TODO: fill imgNames with existing images according to the categoryID from db
            // Category c = new Category(...) --> categories.Add(c);
            // categoryWindows[categoryID] = c;
            addExistingCategories();
        }
示例#4
0
    // Use this for initialization
    void Start()
    {
        restMain = this;

        m_utensilSprites        = new List <Sprite>(Resources.LoadAll <Sprite>("Kitchen Utensils"));
        m_utensilSpriteNames    = new List <string>();
        m_ingredientSprites     = new List <Sprite>(Resources.LoadAll <Sprite>("Ingredients"));
        m_ingredientSpriteNames = new List <string>();

        m_ingredientLinePosition = ingredientLine.transform.position;
        m_utensilLinePosition    = utensilLine.transform.position;

        popUpText.enabled = false;

        //this is temporary
        ingredients = new List <Ingredients>();
        ingredients.Add(Ingredients.Lettuce);
        ingredients.Add(Ingredients.Chicken);
        ingredients.Add(Ingredients.Carrot);
        ingredients.Add(Ingredients.Beef);

        catStartingPos = cat.transform.position;

        //the game is paused in the upgrades state
        Pause();

        foreach (Sprite s in m_utensilSprites)
        {
            m_utensilSpriteNames.Add(s.name);
        }
        foreach (Sprite s in m_ingredientSprites)
        {
            m_ingredientSpriteNames.Add(s.name);
        }

        Reset();
    }
示例#5
0
 public void ThrowPlateAway()
 {
     ChangePlateInHand(null);
     RestaurantMain.AddMoney(-5);
 }