Ejemplo n.º 1
0
    public bool Strike(string[] arr)
    {
        string errorMessage = "Strike power [accuracy]";

        if (game.GetState() is IdleState && arr.Length < 3)
        {
            Powerbar powerbar = game.GetPowerbar();
            float    power    = 1f;
            float    accuracy = 0f;
            if (arr.Length == 1)
            {
                power = Floatify(arr[0]);
            }
            if (arr.Length == 2)
            {
                accuracy = Floatify(arr[1]);
            }
            powerbar.SetPower(power);
            powerbar.SetAccuracy(accuracy);
            game.GetCursorGraphics().Disable();
            game.SetState(new StrikingState(game));
            return(true);
        }
        Reply(errorMessage);
        return(true);
    }
Ejemplo n.º 2
0
 public override void OnKeySpace()
 {
     powerbar.SetPower();
     game.SetState(new AccuracyState(game));
 }