public void ScaleUp() { StateAccessor stateAccessor = this.GetComponent <StateAccessor>(); if (stateAccessor != null && !stateAccessor.AbleToTakeAnInteraction()) { return; } soundFX.Play(); switch (currentZoom) { case Scale.Small: oldZoom = currentZoom; currentZoom = Scale.Default; break; case Scale.Default: oldZoom = currentZoom; currentZoom = Scale.Large; break; case Scale.Large: return; } zoomChanging = true; if (customMessages != null) { customMessages.SendScaleChangeMessage((byte)currentZoom); } }
public void ToggleScale() { StateAccessor stateAccessor = this.GetComponent <StateAccessor>(); if (stateAccessor != null && !stateAccessor.AbleToTakeAnInteraction()) { return; } soundFX.Play(); oldZoom = currentZoom; currentZoom = NextScale(currentZoom); zoomChanging = true; if (customMessages != null) { customMessages.SendScaleChangeMessage((byte)currentZoom); } }