private static KeyCode GetKeyCode(GrowthControls growthControl) { switch (growthControl) { case GrowthControls.PositiveY: return KeyCode.E; } throw new InvalidOperationException(); }
private static bool ControlKeyDown(GrowthControls growthControl) { return Input.GetKeyDown(GetKeyCode(growthControl)); }