Ejemplo n.º 1
0
        private void Start()
        {
            // PROTO: get all inputfields into a Key/Value dictionary
            //GetComponentsInChildren<InputField>();

            ErrorHandler.AssertNull(userIdField);
        }
Ejemplo n.º 2
0
        public Metadata(string userId, Tick tick)
        {
            if (string.IsNullOrWhiteSpace(userId))
            {
                ErrorHandler.LogError("User set an empty name.");
            }

            ErrorHandler.AssertNull(tick);

            UserId = userId;
            Tick   = tick;
        }
Ejemplo n.º 3
0
        private GameObject CreateLabel(string text, Vector2 position, RectTransform parent)
        {
            GameObject label = Instantiate(labelPrefab, parent);

            RectTransform rectTransform = label.GetComponent <RectTransform>();

            ErrorHandler.AssertNull(rectTransform);

            TextMeshProUGUI textComponent = label.GetComponent <TextMeshProUGUI>();

            ErrorHandler.AssertNull(textComponent);

            rectTransform.anchoredPosition = position;

            textComponent.text = text;

            return(label);
        }
Ejemplo n.º 4
0
        private void Awake()
        {
            ErrorHandler.AssertExists(Instance, "There is more than one GraphController script running.");
            Instance = this;

            ErrorHandler.AssertNull(nodeImage);
            ErrorHandler.AssertNull(separatorImage);

            ErrorHandler.AssertNull(scrollbar);
            ErrorHandler.AssertNull(verticalLabelContainer);
            ErrorHandler.AssertNull(horizontalLabelContainer);
            ErrorHandler.AssertNull(legendContainer);

            ErrorHandler.AssertNull(nodeContainer);
            SetupNodeContainer();

            ErrorHandler.AssertNull(legendPrefab);

            ErrorHandler.AssertNull(labelPrefab);
            SetupHorizontalLabels();
        }
Ejemplo n.º 5
0
        private void Awake()
        {
            ErrorHandler.AssertExists(Instance, "There is more than one GameLogic script running.");
            Instance = this;

            GameObject hexesGameObject = GameObject.Find("Hexes");

            ErrorHandler.AssertNull(hexesGameObject, "Hexes object not found! Cannot proceed execution.");

            hexMap = hexesGameObject.GetComponent <HexMap>();
            ErrorHandler.AssertNull(hexMap, "HexMap script not found in GameManager object!");

            MainCamera = Camera.main;
            ErrorHandler.AssertNull(MainCamera, "MainCamera object not found! Cannot proceed execution!");

            AnimCamera = MainCamera.GetComponent <Animation>();
            ErrorHandler.AssertNull(AnimCamera, "Main Camera Animation component not found! Cannot proceed execution!");

            ErrorHandler.AssertNull(GraphPanel, "GraphPanel object not found! Cannot proceed execution!");

            AnimGraph = GraphPanel.GetComponent <Animation>();
            ErrorHandler.AssertNull(AnimGraph, "Graph Panel Animation component not found! Cannot proceed execution!");

            ErrorHandler.AssertNull(ButtonPanel, "ButtonPanel object component not found! Cannot proceed execution!");

            AnimButton = ButtonPanel.GetComponent <Animation>();
            ErrorHandler.AssertNull(AnimButton, "Button Panel Animation component not found! Cannot proceed execution!");

            ErrorHandler.AssertNull(ButtonPrefab, "Button prefab not found! Cannot proceed execution!");

            ErrorHandler.AssertNull(TimeScale, "Time Scale object not found! Cannot proceed execution!");

            timeScaleText = TimeScale.GetComponent <TextMeshProUGUI>();

            ErrorHandler.AssertNull(timeScaleText, "Time Scale TextMeshPro not found! Cannot proceed execution!");
        }