using System.Collections.Generic;
|
|
public class BattleField
|
{
|
public BattleMode battleMode;
|
|
public BattleObjMgr battleObjMgr;
|
|
public RecordPlayer recordPlayer;
|
|
public int round = 0;
|
|
public virtual void Init(TeamBase _redTeam, TeamBase _blueTeam)
|
{
|
battleObjMgr = new BattleObjMgr();
|
battleObjMgr.Init(_redTeam, _blueTeam);
|
|
recordPlayer = new RecordPlayer();
|
recordPlayer.Init(this);
|
}
|
|
public virtual void Release()
|
{
|
battleObjMgr.Release();
|
}
|
|
public virtual void Run()
|
{
|
recordPlayer.Run();
|
battleObjMgr.Run();
|
}
|
|
public void SetBattleMode(BattleMode _battleMode)
|
{
|
battleMode = _battleMode;
|
}
|
|
public virtual void PlayRecord(RecordAction recordAction)
|
{
|
recordPlayer.PlayRecord(recordAction);
|
}
|
|
public virtual void PlayRecord(List<RecordAction> recordList)
|
{
|
recordPlayer.PlayRecord(recordList);
|
}
|
|
public virtual void OnActionOver(int attackId)
|
{
|
//
|
// 手动推点一下发一个包 收一个包 播放一次报文 之后就停住 直到战斗结束的包文
|
// 自动的话 自动发包 播放报文 后 请求下一个包 循环 直到战斗结束的包文
|
// 战报播放就是一直播放战报 知道战斗结束的包文
|
if (battleMode == BattleMode.Auto)
|
{
|
// Request next action
|
}
|
else if (battleMode == BattleMode.Record)
|
{
|
// Play next record
|
}
|
else
|
{
|
// Wait for user input
|
}
|
}
|
|
public virtual void ResumeGame()
|
{
|
battleObjMgr.ResumeGame();
|
}
|
|
public virtual void PauseGame()
|
{
|
battleObjMgr.PauseGame();
|
}
|
}
|