//GlobalOnClickManagerに通知するもの
    void globalOnClick()
    {
        Debug.Log("OnClick:" + objectid);

        DOVirtual.DelayedCall(0.05f, () =>
        {
            global.GlobalOnClick(objectid);
        });
    }
示例#2
0
    void onReceived(Message msg)
    {
        if (!config.OSCReceive)
        {
            return;
        }

        address = msg.address;

        foreach (var v in msg.values)
        {
            if (v is int)
            {
                value = "int: " + ((int)v).ToString();
            }
            else if (v is float)
            {
                value = "float: " + ((float)v).ToString();
            }
            else if (v is string)
            {
                value = "string: " + ((string)v).ToString();
            }
            else if (v is byte[])
            {
                value = "byte: " + ((byte[])v).ToString();
            }
        }
        //------------------

        //ボタン押下エミュレート
        if (address == "/VaNiiMenu/Button" && msg.values[0] is string)
        {
            Gonclick.GlobalOnClick((string)msg.values[0]);
        }

        if (address == "/VaNiiMenu/Menu" && msg.values[0] is int)
        {
            if ((int)msg.values[0] == 0)
            {
                menu.MenuEnd = true;
            }
            else
            {
                menu.MenuStart = true;
            }
        }

        if (address == "/VaNiiMenu/HomeInfo" && msg.values[0] is string)
        {
            HomeText.text = (string)msg.values[0];
        }
        if (address == "/VaNiiMenu/TweetPhraseReload")
        {
            tweet.loadJSON();
            tweet.show();
        }
        if (address == "/VaNiiMenu/Alert")
        {
            if (msg.values.Length == 2)
            {
                if (msg.values[0] is string && msg.values[1] is string)
                {
                    menu.ShowDialogOK((string)msg.values[0], (string)msg.values[1], 0.05f, () => { });
                }
            }
            else if (msg.values.Length == 1)
            {
                if (msg.values[0] is string)
                {
                    menu.ShowDialogOK(LanguageManager.config.showdialog.FROM_EXTERNAL_APP, (string)msg.values[0], 0.05f, () => { });
                }
            }
        }
    }