public void SwitchFlightMode(FlightMode currentFlightMode, FlightMode newFlightMode) { if (currentFlightMode != newFlightMode) { switch (currentFlightMode) { case FlightMode.Feather: FeatherActivatedImage.enabled = false; break; case FlightMode.Normal: StarshipActivatedImage.enabled = false; break; case FlightMode.Chain: ChainActivatedImage.enabled = false; break; case FlightMode.Sword: OnMouseOverEnd?.Invoke(); SwordActivatedImage.enabled = false; break; } switch (newFlightMode) { case FlightMode.Feather: FeatherActivatedImage.enabled = true; break; case FlightMode.Normal: StarshipActivatedImage.enabled = true; break; case FlightMode.Chain: ChainActivatedImage.enabled = true; break; case FlightMode.Sword: SwordActivatedImage.enabled = true; break; } flightModeSwitcher.SwitchFlightMode(newFlightMode); } }
private void SwitchFlightMode(FlightMode flightMode) { currentFlightMode = flightMode; flightModeSwitcher.SwitchFlightMode(flightMode); }