コード例 #1
0
    // Use this for initialization
    void Start()
    {
        muhStaticClass = GameObject.FindObjectOfType <StaticClass>();
        thisButton     = this.gameObject.GetComponent <Button>();
        thisButton.onClick.AddListener(onClick);
        colorMe       = GameObject.FindObjectOfType <tableHighlight>();
        callingButton = colorMe.getCallingTable();
        writeMe       = callingButton.GetComponent <tableInfo>();
        //login = colorMe.getLoginNumber();
        login             = muhStaticClass.getLogin();
        tablesToHighlight = colorMe.tablesToHighlight;
        tablesToHighlight.Clear();

        onClick();
    }
コード例 #2
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);
        }
    }