public void InitOrder()
 {
     HasFulfilledOrder = false;
     Info            = OrderGeneration.GenerateNewOrder();
     _displayOrderUI = GetComponent <DisplayOrderUI>();
     _displayOrderUI.InitOrder(Info.orderItems);
 }
Beispiel #2
0
    //before the customer is visible, make sure to...
    private void Awake()
    {
        //disable the collider
        TriggerCustomerCollider(false, true);

        //ensure that the order icon is not visible
        orderIconPos.gameObject.SetActive(false);

        //get the order generation script
        orderGenerationScript = OrderGeneration.Instance;
    }
    private void Awake()
    {
        //Debug.Log(this.gameObject.name);

        if (_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
        }
        else
        {
            _instance = this;
        }
    }
Beispiel #4
0
    // Update is called once per frame
    void Update()
    {
        timeleft -= 1;

        if (timeleft == 0)
        {
            GameObject      scorekeeper     = GameObject.Find("GameTime");
            OrderGeneration orderGeneration = scorekeeper.GetComponent <OrderGeneration>();

            //orderGeneration.pointCount -= orderGeneration.recipePrice;
            orderGeneration.numberOfOrders -= 1;
            GameObject[] orders;
            orders = GameObject.FindGameObjectsWithTag("Recipe");
            foreach (GameObject order in orders)
            {
                order.transform.position -= new Vector3(250f, transform.position.y, 0f);
            }

            Destroy(gameObject);
        }
    }