Exemple #1
0
    public bool nextRound()
    {
        _curRound++;

        if (_curRound >= _curBattleInfos.Length)
        {
            _isWin = true;
            _star  = 3;

            _missionModel.setStatus(MissionModel.status.FINISHED);
            return(true);
        }

        BattleInfoModel        infoModel = _curBattleInfos [_curRound];
        List <BattleHeroModel> monster   = infoModel.getMonsters();

        _monsters = new List <BattleHeroModel> ();
        for (int i = 0; i < monster.Count; i++)
        {
            BattleHeroModel model = monster [i];
            model.formatModel();
            _monsters.Add(model);
        }

        foreach (BattleHeroModel model in _monsters)
        {
            model.HERO_DIED += _onMonsterDeath;
        }

        List <BattleHeroModel> totalModel = new List <BattleHeroModel> ();

        foreach (BattleHeroModel model in _monsters)
        {
            totalModel.Add(model);
        }

        foreach (BattleHeroModel model in _partners.Values)
        {
            totalModel.Add(model);
        }

        _totalModel = totalModel;

        BattleEvent.NEXT_ROUND();
        return(false);
    }