Example #1
0
    //返回应该出多少礼品
    public int AddScoresAndGivePlayerAward(InsertCoinsAlu.PlayerPosition p, int scores, UniInsertCoinsOptionsFile opfile, UniInsertCoinsRecord recordFile)
    {
        totalScores[(int)p]   += scores;
        currentScores[(int)p] += scores;
        int ret = 0;

        while (currentScores[(int)p] >= opfile.awardNeedScore)
        {
            ret += opfile.awardCount;
            currentScores[(int)p] -= opfile.awardNeedScore;
        }
        if (ret != 0)
        {
            GivePlayerAward(p, opfile, recordFile);
        }
        return(ret);
    }
Example #2
0
 //奖励礼品
 public void GivePlayerAward(InsertCoinsAlu.PlayerPosition p, UniInsertCoinsOptionsFile opfile, UniInsertCoinsRecord recordFile)
 {
     recordFile.PlayerAward(opfile.awardCount);
 }