Example #1
0
        private void Awake()
        {
            ErrorHandler.AssertExists(Instance);

            Instance = this;

            DontDestroyOnLoad(gameObject);
        }
Example #2
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();
        }
Example #3
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!");
        }