private void Awake() { selectionCircle = GetComponentInChildren <SelectionCircle>(); Assert.IsNotNull(selectionCircle); selectionCircle.gameObject.SetActive(false); unit = GetComponent <Unit>(); Assert.IsNotNull(unit, $"Missing Unit component on {name} that has UnitSelectionComponent"); }
private void Awake() { selectionCircle = GetComponentInChildren <SelectionCircle>(); Assert.IsNotNull(livingCityElements); Assert.IsNotNull(fires); Assert.IsNotNull(ruins); Assert.IsNotNull(selectionCircle); livingCityElements.SetActive(true); fires.SetActive(false); ruins.SetActive(false); node = GetComponent <Node>(); Assert.IsNotNull(node); node.OnStatusReceived += OnStatusReceived; node.OnStatusRemoved += OnStatusRemoved; healthComponent = node.gameObject.GetComponent <HealthComponent>(); Assert.IsNotNull(healthComponent); healthComponent.OnValueChanged += OnHealthChanged; selectionCircle.gameObject.SetActive(false); var nodeController = FindObjectOfType <NodeController>(); Assert.IsNotNull(nodeController); nodeController.OnSelectedNodeChanged += OnSelectedNodeChanged; }