Exemplo n.º 1
0
        /// <summary>
        /// Initializes the component, makes sure that it is set up correctly
        /// </summary>
        private void Awake()
        {
            if (createRoomButton == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(createRoomButton));
            }
            if (pageUpButton == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(pageUpButton));
            }
            if (pageDownButton == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(pageDownButton));
            }
            if (createRoomSubMenu == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(createRoomSubMenu));
            }

            // subscribe to the necessary events
            roomListView.ItemSelected      += OnRoomSelected;
            createRoomSubMenu.WindowClosed += CreateRoomMenuClosed;

            LobbyManager.Instance.RoomListChanged        += UpdateRoomList;
            LobbyManager.Instance.LobbyJoinStatusChanged += OnLobbyStatusChanged;

            Close();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Checks the setup
 /// </summary>
 private void Awake()
 {
     if (dataDisplay == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(dataDisplay));
     }
 }
Exemplo n.º 3
0
 private void Awake()
 {
     if (visualizationPrefab == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(visualizationPrefab));
     }
 }
Exemplo n.º 4
0
        protected override void Awake()
        {
            base.Awake();

            if (surfaceMaterial == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(surfaceMaterial));
            }

            surfaceMeshFilter = contentParent.GetComponent <MeshFilter>();
            if (surfaceMeshFilter == null)
            {
                SpecialDebugMessages.LogComponentNotFoundError(this, nameof(MeshFilter), contentParent.gameObject);
            }
            surfaceMeshRenderer = contentParent.GetComponent <MeshRenderer>();
            if (surfaceMeshRenderer == null)
            {
                SpecialDebugMessages.LogComponentNotFoundError(this, nameof(MeshRenderer), contentParent.gameObject);
            }
            gridController = contentParent.GetComponent <GridController>();
            if (gridController == null)
            {
                SpecialDebugMessages.LogComponentNotFoundError(this, nameof(GridController), contentParent.gameObject);
            }

            surfaceMeshRenderer.material = Instantiate(surfaceMaterial);
        }
 private void Awake()
 {
     if (xPos == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(xPos));
     }
     if (xNeg == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(xNeg));
     }
     if (yPos == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(yPos));
     }
     if (yNeg == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(yNeg));
     }
     if (zPos == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(zPos));
     }
     if (zNeg == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(zNeg));
     }
 }
Exemplo n.º 6
0
 private void Awake()
 {
     if (progressBar == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(progressBar));
     }
 }
Exemplo n.º 7
0
        private void Awake()
        {
            if (chestBone == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(chestBone));
            }
            if (neckBone == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(neckBone));
            }
            if (headBone == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(headBone));
            }
            if (eyeLeftBone == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(eyeLeftBone));
            }
            if (eyeRightBone == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(eyeRightBone));
            }

            eyeMiddleLocalPosition = Vector3.Lerp(eyeLeftBone.localPosition, eyeRightBone.localPosition, 0.5f);
            initialHeadRotation    = headBone.localRotation;
            initialNeckRotation    = neckBone.localRotation;
        }
Exemplo n.º 8
0
 /// <summary>
 /// Checks if the component is set up correctly
 /// </summary>
 private void Awake()
 {
     if (playerAvatarPrefab == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(playerAvatarPrefab));
     }
 }
Exemplo n.º 9
0
 private void Awake()
 {
     if (diagram == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(diagram));
     }
     if (xPosSlider == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(xPosSlider));
     }
     if (xNegSlider == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(xNegSlider));
     }
     if (yPosSlider == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(yPosSlider));
     }
     if (yNegSlider == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(yNegSlider));
     }
     if (zPosSlider == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(zPosSlider));
     }
     if (zNegSlider == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(zNegSlider));
     }
 }
Exemplo n.º 10
0
 private void Awake()
 {
     if (kanbanBoardController == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(kanbanBoardController));
     }
 }
Exemplo n.º 11
0
        /// <summary>
        /// Checks the setup of the text label and calls UpdateVisuals() for the first time
        /// </summary>
        private void Awake()
        {
            if (!Application.isEditor)
            {
                // check the text label array
                if (textLabels.Length == 0)
                {
                    SpecialDebugMessages.LogArrayInitializedWithSize0Warning(this, nameof(textLabels));
                }

                for (int i = 0; i < textLabels.Length; i++)
                {
                    if (textLabels[i] == null)
                    {
                        SpecialDebugMessages.LogArrayMissingReferenceError(this, nameof(textLabels), i);
                    }
                }
                // check the other components
                if (background == null)
                {
                    SpecialDebugMessages.LogMissingReferenceError(this, nameof(background));
                }
            }

            UpdateVisuals();
        }
Exemplo n.º 12
0
 /// <summary>
 /// Checks the setup of the component
 /// </summary>
 private void Awake()
 {
     if (cubeAnimator == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(cubeAnimator));
     }
     if (cubePivot == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(cubePivot));
     }
     if (onOffButton == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(onOffButton));
     }
     if (labelsParent == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(labelsParent));
     }
     if (animationHandler == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(animationHandler));
     }
     if (appBarSpawner == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(appBarSpawner));
     }
 }
Exemplo n.º 13
0
 private void Awake()
 {
     if (heightChanger == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(heightChanger));
     }
     targetRotation = transform.rotation;
 }
Exemplo n.º 14
0
 protected virtual void Awake()
 {
     if (progressBar == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(progressBar));
     }
     progressBarVisuals = progressBar.GetComponent <IProgressBarVisuals>();
 }
Exemplo n.º 15
0
 protected override void Awake()
 {
     base.Awake();
     if (letterCaption == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(letterCaption));
     }
 }
Exemplo n.º 16
0
 private void Awake()
 {
     if (previewQuad == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(previewQuad));
     }
     interactable = GetComponent <Interactable>();
 }
Exemplo n.º 17
0
 protected override void Awake()
 {
     base.Awake();
     if (barPrefab == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(barPrefab));
     }
 }
Exemplo n.º 18
0
 private void Awake()
 {
     if (eyeTarget == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(eyeTarget));
     }
     headBone = transform.parent;
 }
Exemplo n.º 19
0
        protected override void Awake()
        {
            if (targetBoundsControl == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(targetBoundsControl));
            }

            base.Awake();
        }
Exemplo n.º 20
0
        protected override void Awake()
        {
            base.Awake();
            if (shiftIndicator == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(shiftIndicator));
                return;
            }

            SetShift(false);
        }
Exemplo n.º 21
0
 /// <summary>
 /// Checks the setup
 /// </summary>
 private void Awake()
 {
     if (statusLabel == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(statusLabel));
     }
     if (statusLabelBackground == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(statusLabelBackground));
     }
 }
Exemplo n.º 22
0
 /// <summary>
 /// Checks the setup of the component
 /// </summary>
 private void Awake()
 {
     if (sourceLabel == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(sourceLabel));
     }
     if (backgroundRenderer == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(backgroundRenderer));
     }
 }
Exemplo n.º 23
0
 /// <summary>
 /// Checks the setup of the component
 /// </summary>
 private void Awake()
 {
     if (profileImageRenderer == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(profileImageRenderer));
     }
     if (userNameLabel == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(userNameLabel));
     }
 }
Exemplo n.º 24
0
 /// <summary>
 /// Checks if the component is set up correctly
 /// </summary>
 private void Awake()
 {
     if (nameDisplay == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(nameDisplay));
     }
     if (avatarVisuals == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(avatarVisuals));
     }
 }
Exemplo n.º 25
0
 /// <summary>
 /// Initialization: gets the required components
 /// </summary>
 private void Awake()
 {
     rend = GetComponent <Renderer>();
     if (defaultMaterial == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(defaultMaterial));
     }
     if (processingMaterial == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(processingMaterial));
     }
 }
Exemplo n.º 26
0
 protected override void Awake()
 {
     base.Awake();
     if (notificationWidget == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(notificationWidget));
     }
     if (notificationPreviewLabel == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(notificationPreviewLabel));
     }
 }
Exemplo n.º 27
0
        /// <summary>
        /// Checks the component's setup and initializes it
        /// </summary>
        protected override void Awake()
        {
            if (configurationWindow == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(configurationWindow));
            }
            configurationWindowInterface = configurationWindow?.GetComponent <IWindow>();
            if (configurationWindowInterface == null)
            {
                SpecialDebugMessages.LogComponentNotFoundError(this, nameof(IWindow), configurationWindow);
            }

            base.Awake();
        }
Exemplo n.º 28
0
        private void Awake()
        {
            if (avatarParent == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(avatarParent));
            }
            else
            {
                EnsureAvatarConfigController();
                // deactivate the spine controller
                spineController         = avatarParent.GetComponentInChildren <AvatarSpineController>();
                spineController.enabled = false;
            }

            if (categoryToggles == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(categoryToggles));
            }
            else
            {
                categoryObjectCollection = categoryToggles.gameObject.GetComponent <GridObjectCollection>();
                if (categoryObjectCollection == null)
                {
                    SpecialDebugMessages.LogComponentNotFoundError(this, nameof(GridObjectCollection), gameObject);
                }
            }
            if (categoryButtonPrefab == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(categoryButtonPrefab));
            }
            if (modelSelector == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(modelSelector));
            }
            if (materialSelector == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(materialSelector));
            }
            if (colorSelector == null)
            {
                SpecialDebugMessages.LogMissingReferenceError(this, nameof(colorSelector));
            }

            InitializeCategories();

            modelSelector.ItemSelected    += ModelItemSelected;
            materialSelector.ItemSelected += MaterialItemSelected;
            colorSelector.ItemSelected    += ColorItemSelected;
        }
Exemplo n.º 29
0
 private void Awake()
 {
     if (roomNameLabel == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(roomNameLabel));
     }
     if (memberNumberLabel == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(memberNumberLabel));
     }
     if (lockIcon == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(lockIcon));
     }
 }
Exemplo n.º 30
0
 /// <summary>
 /// Checks if the component was set up correctly
 /// </summary>
 private void Awake()
 {
     if (craneTop == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(craneTop));
     }
     if (slider == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(slider));
     }
     if (cable == null)
     {
         SpecialDebugMessages.LogMissingReferenceError(this, nameof(cable));
     }
 }