Beispiel #1
0
            public void Awake()
            {
                _net = FindObjectOfType <PureP2PCommsNetwork>();
                _net.InitializeAsClient(_sessionId);

                _comms = FindObjectOfType <DissonanceComms>();
            }
    public void Start()
    {
        //Set up the input field initial values
        _comms = FindObjectOfType <PureP2PCommsNetwork>();
        SignallingInput.text = _comms.SignallingServer;

        SignallingInput.textComponent.horizontalOverflow = HorizontalWrapMode.Wrap;
        Ice1Input.textComponent.horizontalOverflow       = HorizontalWrapMode.Wrap;
        Ice2Input.textComponent.horizontalOverflow       = HorizontalWrapMode.Wrap;
        Ice3Input.textComponent.horizontalOverflow       = HorizontalWrapMode.Wrap;

        InitializeIceInputs();

        //React to the input field edits
        SignallingInput.onEndEdit.AddListener(a => _comms.SignallingServer = a);
        Ice1Input.onEndEdit.AddListener(a => ReplaceIce(0, a));
        Ice2Input.onEndEdit.AddListener(a => ReplaceIce(1, a));
        Ice3Input.onEndEdit.AddListener(a => ReplaceIce(2, a));
    }