示例#1
0
        protected virtual void Awake()
        {
            LobbyUi = LobbyUi ?? FindObjectOfType <LobbyUi>();

            if (LobbyUi == null)
            {
                Logs.Error("Lobby window was not set. ");
            }
        }
示例#2
0
        /// <summary>
        /// Uses property data to setup the controller view
        /// </summary>
        /// <param name="propertyData"></param>
        public virtual void Setup(LobbyPropertyData propertyData)
        {
            Lobby = Lobby ?? GetComponentInParent <LobbyUi>();

            RawData    = propertyData;
            Label.text = propertyData.Label;

            Dropdown.ClearOptions();

            Dropdown.AddOptions(propertyData.Options);
        }
示例#3
0
        private void Awake()
        {
            Lobby = Lobby ?? GetComponentInParent <LobbyUi>();

            _currentMessages = new Queue <Text>();

            // Listen to "submit on enter" events
            InputField.onEndEdit.AddListener(val => {
                if (Input.GetKeyDown(KeyCode.Return) || Input.GetKeyDown(KeyCode.KeypadEnter))
                {
                    OnSendClick();
                }
            });
        }
 protected virtual void Awake()
 {
     Properties = new GenericUIList <LobbyPropertyData>(PropPrefab.gameObject, PropertiesGroup);
     Lobby      = Lobby ?? GetComponentInParent <LobbyUi>();
 }
示例#5
0
 private void Awake()
 {
     Lobby = Lobby ?? GetComponentInParent <LobbyUi>();
 }