示例#1
0
		public Battle(BattleType battleType, BattleSource source)
		{
			this.battleType = battleType;
			this.battleSource = source;
			this.record = new BattleRecord();
			this.storeData = new BattleStoreData(source.BattleCompatibleUtils);
			this.storeHandler = new BattleStoreHandler(storeData);
		}
		public virtual Battle createBattle(BattleSource source, IBattleTemplateService tempService)
		{
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final com.kx.sglm.gs.battle.share.enums.BattleType _type = source.getBattleType();
			BattleType _type = source.BattleType;

			Battle _battle = new Battle(_type, source);

			IBattleExecuter _excuter = createBattleExecuter(_battle, tempService);

			_battle.BattleExcuter = _excuter;

			HeroTeam _attacker = createAttackerTeam(_battle);

			_excuter.AttackerTeam = _attacker;

			_excuter.initDefencerTeam();

			_excuter.initDataOnCreate();

			return _battle;
		}