Exemplo n.º 1
0
    void createSummon(MonsterHeroAI ai)
    {
        _createNum = ai.actionSummonSlotNum.Length;

        int i = 0;

        shuffleList.Clear();
        shuffleList2.Clear();

        for (i = 0; i < _createNum; ++i)
        {
            shuffleList.Add(i);
        }

        int targetIndex = 0;

        for (i = 0; i < _createNum; ++i)
        {
            targetIndex = GameManager.inGameRandom.Range(0, shuffleList.Count);
            shuffleList2.Add(shuffleList[targetIndex]);
            shuffleList.RemoveAt(targetIndex);
        }


        for (i = 0; i < _createNum; ++i)
        {
            targetIndex = shuffleList2[i];

            mon.unitSlots[ai.actionSummonSlotNum[i]].create(ai.actionSummonSlotPosX, targetIndex, _createNum);
        }
    }
Exemplo n.º 2
0
    public void setData(Monster mon, MonsterHeroAI ai)
    {
        //Log.logError(ai.id, ai.coolTime);

        _heroMon    = mon;
        coolTime    = ai.coolTime + ai.coolTimeStartDelay;
        maxCoolTime = ai.coolTime;
        //_coolTimeStartDelay = ai.coolTimeStartDelay;
        excuteCount = 0;
        this.ai     = ai;
    }
Exemplo n.º 3
0
 public override void destroy()
 {
     base.destroy();
     ai = null;
 }