Esempio n. 1
0
    public PAPS_GRADE FindPAPSGrade(int gender, SCHOOL_GRADE schoolGrade, float value)
    {
        _min = 0; _max = 0;
        PAPS_GRADE grade = PAPS_GRADE.NONE;

        for (int i = 0; i < _listPAPSScriptInfo.Count; ++i)
        {
            grade = FindPAPSGrade(_listPAPSScriptInfo[i], gender, schoolGrade, value);
            if (grade != PAPS_GRADE.NONE)
            {
                return(grade);
            }
        }

        if (_min == 0 && _max == 0)
        {
            return(grade);
        }

        if (_min < _max)
        {
            grade = _min > value ? PAPS_GRADE.ONE : PAPS_GRADE.FIVE;
        }
        else
        {
            grade = _min < value ? PAPS_GRADE.ONE : PAPS_GRADE.FIVE;
        }

        return(grade);
    }
Esempio n. 2
0
 public PAPSTableInfo(int index, int gender, SCHOOL_GRADE schoolGrade, PAPS_GRADE PAPSGrade, float min, float max)
 {
     _index       = index;
     _gender      = gender;
     _schoolGrade = schoolGrade;
     _PAPSGrade   = PAPSGrade;
     _min         = min;
     _max         = max;
 }
Esempio n. 3
0
    static public PAPS_GRADE GetMusGrade()
    {
        int gender = 0, grade = 0;

        GetGenderAndGrade(out gender, out grade);
        int   value1 = AppManager.GetInstance().papsInfo._muscularEndurance.GetSitUpCount();
        float value2 = AppManager.GetInstance().papsInfo._muscularEndurance.GetGrip();

        PAPS_GRADE grade1 = AppManager.GetInstance().papsTableManager.FindPAPSGrade(TABLE_TYPE.SIT_UP, gender, (SCHOOL_GRADE)grade, value1);
        PAPS_GRADE grade2 = AppManager.GetInstance().papsTableManager.FindPAPSGrade(TABLE_TYPE.GRIP, gender, (SCHOOL_GRADE)grade, value2);

        return(grade1 > grade2 ? grade2 : grade1);
    }
Esempio n. 4
0
    static public PAPS_GRADE GetAgilityGrade()
    {
        int gender = 0, grade = 0;

        GetGenderAndGrade(out gender, out grade);
        float value1 = AppManager.GetInstance().papsInfo._agility.GetFiftyMRunningSecond();
        float value2 = AppManager.GetInstance().papsInfo._agility.GetStandingBroadJumpCm();

        PAPS_GRADE grade1 = AppManager.GetInstance().papsTableManager.FindPAPSGrade(TABLE_TYPE.FIFTY_M_RUNNING, gender, (SCHOOL_GRADE)grade, value1);
        PAPS_GRADE grade2 = AppManager.GetInstance().papsTableManager.FindPAPSGrade(TABLE_TYPE.STANDING_BROAD_JUMP, gender, (SCHOOL_GRADE)grade, value2);

        return(grade1 > grade2 ? grade2 : grade1);
    }
Esempio n. 5
0
    static public PAPS_GRADE GetCardiGrade()
    {
        int gender = 0, grade = 0;

        GetGenderAndGrade(out gender, out grade);
        int value1 = AppManager.GetInstance().papsInfo._cardiovascularEndurance.GetRepeatLongRunningCount();
        int value2 = AppManager.GetInstance().papsInfo._cardiovascularEndurance.GetLongRunningSecond();

        PAPS_GRADE grade1 = AppManager.GetInstance().papsTableManager.FindPAPSGrade(TABLE_TYPE.REPEAT_LONG_RUNNING, gender, (SCHOOL_GRADE)grade, value1);
        PAPS_GRADE grade2 = AppManager.GetInstance().papsTableManager.FindPAPSGrade(TABLE_TYPE.LONG_RUNNING, gender, (SCHOOL_GRADE)grade, value2);

        return(grade1 > grade2 ? grade2 : grade1);
    }
Esempio n. 6
0
    public void AddPAPSSriptInfo(int index, int gender, SCHOOL_GRADE schoolGrade, PAPS_GRADE PAPSGrade, float min, float max)
    {
        if (schoolGrade < SCHOOL_GRADE.ELE_FOUR || schoolGrade >= SCHOOL_GRADE.MAX_SCHOOL_GRADE) // 초4부터 팝스등급있음
        {
            Debug.Log("학년값을 벗어남");
            return;
        }

        if (PAPSGrade < PAPS_GRADE.ONE || PAPSGrade > PAPS_GRADE.FIVE)
        {
            Debug.Log("PAPS등급값을 벗어남");
            return;
        }

        PAPSTableInfo PAPSScriptInfo = new PAPSTableInfo(index, gender, schoolGrade, PAPSGrade, min, max);

        _listPAPSScriptInfo.Add(PAPSScriptInfo);
    }