Exemplo n.º 1
0
    private void OnBattleStart(object obj)
    {
        bool ifBoss = (bool)obj;

        this.ifBoss = ifBoss;
        player.Create();
        servant.Create();
        if (!ifBoss)
        {
            int enemyRandom = Random.Range(0, enemyList.Count);
            enemy.Create(enemyList[enemyRandom]);
        }
        else
        {
            StaticMapVo mapVo = StaticDataPool.Instance.staticMapPool.GetStaticDataVo(nowMap);
            enemy.Create(StaticDataPool.Instance.staticUnitLevelPool.GetStaticDataVo(mapVo.bossId), true);
        }
        ifEnd      = false;
        pauseRound = 1;
        GameRoot.Instance.evt.CallEvent(GameEventDefine.UPDATE_UNIT_CELL, UnitState.None);
        battleList.Clear();
        battleList.Add(player);
        battleList.Add(enemy);
        battleList.Add(servant);
        OnUpdateList(null);
        nowPos = 0;
    }