Axiom.Demos.Water.AdjustRange C# (CSharp) Méthode

AdjustRange() private méthode

private AdjustRange ( float &val, KeyCodes plus, KeyCodes minus, float min, float max, float chg ) : bool
val float
plus KeyCodes
minus KeyCodes
min float
max float
chg float
Résultat bool
		private bool AdjustRange( ref float val, KeyCodes plus, KeyCodes minus, float min, float max, float chg )
		{
			if ( input.IsKeyPressed( plus ) )
			{
				val += ( chg * changeSpeed );
				if ( val > max )
					val = max;
				return true;
			}
			if ( input.IsKeyPressed( minus ) )
			{
				val -= ( chg * changeSpeed );
				if ( val < min )
					val = min;
				return true;
			}
			return false;
		}
		#endregion RAPID UPDATE FUNCTIONS