Пример #1
0
    public void SwitchBurger(int amount)
    {
        timer = 600;
        foreach (Transform z in transform)
        {
            Destroy(z.gameObject);
        }
        if (burgerID < asiakasScript.GetComponent <AsiakasScript>().levelMax&&amount == 1)
        {
            burgerID++;
        }
        else if (amount == 1)
        {
            burgerID = 0;
        }
        if (burgerID > 0 && amount == -1)
        {
            burgerID--;
        }
        else if (amount == -1)
        {
            burgerID = asiakasScript.GetComponent <AsiakasScript>().levelMax;
        }

        burgeri = menu.BurgerMenu[burgerID];

        burgerLayers = 0;
        showcaseBurger();
    }
Пример #2
0
    void Start()
    {
        menu     = menuREF.GetComponent <MenuRefrence>();
        burgerID = 0;
        burgeri  = menu.BurgerMenu[burgerID];

        burgerLayers = 0;
        showcaseBurger();
        timer = 900;
    }
Пример #3
0
    public void sendBurger()
    {
        Hampurilanen burgeri = ScriptableObject.CreateInstance <Hampurilanen>();

        Debug.Log("Initiated burger");
        List <int> tempStack = stack;

        burgeri.Ingredients = tempStack;
        Debug.Log("added stack");
        burgerName   = input.text;
        burgeri.name = burgerName;
        Debug.Log("named burger");
#if UNITY_EDITOR
        AssetDatabase.CreateAsset(burgeri, "assets/Scripts/Burgers/" + burgerName + ".asset");
        AssetDatabase.SaveAssets();
        AssetDatabase.Refresh();
#endif
        Debug.Log("Made burgerFile");
        resetBurger();
    }
Пример #4
0
    //kim

    public void Start()
    {
        orderText = GameObject.FindGameObjectWithTag("Teksti");
        menu      = menuREF.GetComponent <MenuRefrence>();
        //BurgerOrder = transform.GetChild(0).GetChild(0).GetComponent<Text>();
        burgeri     = menu.BurgerMenu[burgerID];
        BurgerSize  = 0;
        BurgerTimer = -1;
        //BurgerOrder.text = burgeri.name;
        orderPassed = false;
        orderText.GetComponent <TextScript>().ShowOrder(burgeri.name);
        ordersFailed = 0;
        //kim
        orderImageHolder       = GameObject.FindGameObjectWithTag("Temp");
        orderImageChild        = GameObject.FindGameObjectWithTag("TempChild");
        asiakas                = GameObject.FindGameObjectWithTag("Customer");
        customerOriginPosition = GameObject.FindGameObjectWithTag("Origin");
        customerTargetPosition = GameObject.FindGameObjectWithTag("Target");
        ShowOrderImage();
        asiakasCTRL = GameObject.FindGameObjectWithTag("AsiakasCTRL");
        //kim
    }