private void DeactivateThoseWhoRequireThis() { foreach (var button in mechMenu.buttons) { if (button.requirements.Contains(this.mechanicName)) { if (mechanics.IsEnabled(button.mechanicName)) { DeactivateMechanic(button.mechanicName); } } } }
private void SetMoveSpeed() { moveSpeed = config.moveSpeed; if (mechanics.IsEnabled("Move Speed Boost")) { moveSpeed = config.moveSpeedBoosted; } }
public void RevertMechanics() { changedMechanics = false; mechanics.RestoreState(); foreach (var button in buttons) { if (mechanics.IsEnabled(button.mechanicName)) { button.ActivateButtonImage(); } else { button.DeactivateButtonImage(); } } UpdateButtonsState(); }