コード例 #1
0
    void RestSkill()
    {
        RoleData.BoxAttr box = new RoleData.BoxAttr();
        box.makeCount = 1;
        box.timeMin   = staticMakeData.skillMin;
        box.timeMax   = staticMakeData.skillMax;

        List <RoleData.BoxAttr> list = new List <RoleData.BoxAttr>();

        list.Add(box);

        RoleData.CycleAttr cycle = new RoleData.CycleAttr();
        cycle.countMax    = staticMakeData.countMax;
        cycle.intervalMin = 1;
        cycle.boxList     = list;
        staticAttr        = cycle;

        TimerThearData a = new TimerThearData();

        a.Reset(list);
        a.isRun[0]           = true;
        a.curMakeCount[0]    = 1;
        a.totalCreateTime[0] = staticMakeData.skillMax;
        a.type = CycleType.Loop;
        createTimer[SkillList] = a;
    }
コード例 #2
0
    //生成一个固定的 静态块生成线程
    public void RestOnceStaticThread()
    {
        int rand  = UnityEngine.Random.Range(0, 100);
        int count = 0;

        if (rand < staticMakeData.makeBoxCountRate[2])
        {
            count = 3;
        }
        else if (rand < staticMakeData.makeBoxCountRate[1])
        {
            count = 2;
        }
        else if (rand < staticMakeData.makeBoxCountRate[0])
        {
            count = 1;
        }
        //生成一个 块生成线程
        RoleData.BoxAttr box = new RoleData.BoxAttr();
        box.makeCount = count;
        box.timeMax   = staticMakeData.maxTime;
        box.timeMin   = staticMakeData.minTime;

        List <RoleData.BoxAttr> list = new List <RoleData.BoxAttr>();

        list.Add(box);

        RoleData.CycleAttr cycle = new RoleData.CycleAttr();
        cycle.countMax    = staticMakeData.countMax;
        cycle.intervalMin = 0;
        cycle.boxList     = list;
        staticAttr        = cycle;

        TimerThearData a = new TimerThearData();

        a.Reset(list);
        a.isRun[0]           = true;
        a.curMakeCount[0]    = count;
        a.curMakeBoxCount[0] = count;
        a.totalCreateTime[0] = staticMakeData.countMax;
        a.type = CycleType.Loop;
        createTimer[StaticList] = a;
    }
コード例 #3
0
 void RestMoveCycle()
 {
     createTimer[MoveList] = new TimerThearData();
     createTimer[MoveList].Reset(moveAttr.boxList);
 }
コード例 #4
0
 void RestStaticCycle()
 {
     createTimer[StaticList] = new TimerThearData();
     createTimer[StaticList].Reset(staticAttr.boxList);
 }