示例#1
0
        private void Start()
        {
            _levelChangeHandler = FindObjectOfType <LevelChangeHandler>();
            NickNameSetter ns = FindObjectOfType <NickNameSetter>();

            if (ns != null)
            {
                _nickname = ns.GetNickName();
            }
        }
示例#2
0
        void Start()
        {
            _reference  = FirebaseDatabase.DefaultInstance.GetReference(DatabaseConstants.PLAYERS);
            _sessionId  = Random.Range(0, 1000000).ToString();
            _collection = FindObjectOfType <CameraCollection>();
            _collection.SetSessionID(_sessionId);
            NickNameSetter ns = FindObjectOfType <NickNameSetter>();

            if (ns != null)
            {
                _sesionNick = ns.GetNickName();
            }
        }