private void ToggleShiftUI(int state) { shiftImage.color = Convert.ToBoolean(state) ? enabledColor : disabledColor; shiftImage.sprite = Convert.ToBoolean(state) ? shiftStateSprites[0] : shiftStateSprites[1]; if (dash == null) { dash = FindObjectOfType <DashUIComponent>(); } dash?.SetDashShiftUI(shiftImage.color, shiftImage.sprite); }
private void ToggleShiftUI(int state) { shiftImage.color = Convert.ToBoolean(state) ? enabledColor : disabledColor; shiftImage.sprite = Convert.ToBoolean(state) ? shiftStateSprites[0] : shiftStateSprites[1]; dash?.SetDashShiftUI(shiftImage.color, shiftImage.sprite); }