コード例 #1
0
    public bool IsGood(int type)
    {
        int stepTapped = bc.getStepClosest();

        if (level.getActionFromBeat(stepTapped) == type)
        {
            this.successStep.Add(stepTapped);
            notifySucces();
            return(true);
        }
        else if (level.getActionFromBeat(stepTapped - 1) == type)
        {
            this.successStep.Add(stepTapped - 1);
            notifySucces();
            return(true);
        }
        else
        {
            if (level.getActionFromBeat(stepTapped + 1) == type)
            {
                this.successStep.Add(stepTapped + 1);
                notifySucces();
                return(true);
            }
        }
        addFail();
        return(false);
    }