Beispiel #1
0
        public void Main(string argument)
        {
            switch (argument)
            {
            case "+":
                gRotor.AddAngle(fAngle);
                break;

            case "-":
                gRotor.AddAngle(-fAngle);
                break;

            case "reset":
                gRotor.SetAngle(0.0f);
                break;

            default:
                if (argument != string.Empty)
                {
                    float angle;

                    if (float.TryParse(argument, out angle))
                    {
                        gRotor.SetAngle(angle);
                    }
                }
                break;
            }
        }