Example #1
0
 private void Start()
 {
     muhStaticClass = GameObject.FindObjectOfType <StaticClass>();
     try {
         player = GameObject.FindObjectOfType <keypadSounds>();
     }
     catch { Debug.Log("No keypad sounds, proceeding"); }
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     muhStaticClass = GameObject.FindObjectOfType <StaticClass>();
     otherButtons.Clear();
     buttons = GameObject.FindGameObjectsWithTag("other");
     foreach (GameObject currentOtherButton in buttons)
     {
         //Debug.Log(buttons.ToString());
         otherButtons.Add(currentOtherButton.GetComponent <Button>());
         clickHandler(currentOtherButton.GetComponent <Button>());
     }
     cancelButton = GameObject.FindGameObjectWithTag("orderCancel").GetComponent <Button>();
     cancelButton.onClick.AddListener(cancelButtonOnClick);
     player = GameObject.FindObjectOfType <keypadSounds>();
     loader = GameObject.FindObjectOfType <keypad_program>();
 }
Example #3
0
    // Use this for initialization
    void Start()
    {
        colorMe       = GameObject.FindObjectOfType <tableHighlight>();
        callingButton = colorMe.getCallingTable();
        writeMe       = callingButton.GetComponent <tableInfo>();
        login         = colorMe.getLoginNumber();
        otherButtons.Clear();
        player = (GameObject.FindGameObjectWithTag("Player").GetComponent <keypadSounds>());

        if (this.gameObject.name != "Order Popup(Clone)")
        {
            actionButton = GameObject.FindGameObjectWithTag("action").GetComponent <Button>();
            cancelButton = GameObject.FindGameObjectWithTag("cancel").GetComponent <Button>();
            inputOrder   = GameObject.FindGameObjectWithTag("placeOrder").GetComponent <Button>();
            tableStatus  = GameObject.FindGameObjectWithTag("other").GetComponent <Button>();
            orderList    = GameObject.FindGameObjectWithTag("orderList").GetComponent <Button>();
            addActionClickMethod();
            cancelButton.onClick.AddListener(cancelClick);
            Text abText = actionButton.GetComponentInChildren <Text>();
            //Debug.Log(abText.text);
            renameActionButton(login, abText);
            Text tblStatus = tableStatus.GetComponentInChildren <Text>();
            setTableStatus(tblStatus, writeMe, login);
            populateOrderList();
        }
        else
        {
            GameObject[] otherButtonsGO = GameObject.FindGameObjectsWithTag("other");
            foreach (GameObject currentOtherButton in otherButtonsGO)
            {
                //Debug.Log(otherButtons.ToString());
                otherButtons.Add(currentOtherButton.GetComponent <Button>());
                clickHandler(currentOtherButton.GetComponent <Button>());
            }
            cancelButton = GameObject.FindGameObjectWithTag("orderCancel").GetComponent <Button>();
            cancelButton.onClick.AddListener(orderCancelClick);
        }
    }
Example #4
0
 // Use this for initialization
 void Start()
 {
     player = (GameObject.FindGameObjectWithTag("Player").GetComponent<keypadSounds>());
     tables = GameObject.FindGameObjectsWithTag("button");
     foreach(GameObject currentTable in tables) addOnClick(currentTable);
 }