/// <summary> /// Called to enable the outline effect. /// </summary> public void enableOutline(RegisteredObject registeredBuilding, UnitBuilder builder) { // Note, this could be called multiple times if multiple builders are in the same party. this.gameObject.SetActive(true); this.buildingToPlace = registeredBuilding; this.cachedBuilders.Add(builder); this.setSize(this.buildingToPlace.getPrefab().GetComponent <BuildingBase>()); // Gray out the action buttons while the outline is being shown. CameraMover.instance().actionButtons.setForceDisabled(true); }
/// <summary> /// Disables the outline effect. /// </summary> public void disableOutline() { this.gameObject.SetActive(false); this.cachedBuilders.Clear(); CameraMover.instance().actionButtons.setForceDisabled(false); }