public void Clear() { BattleInfo?.Clear(); BattleInfo = null; MechaInfoDict.Clear(); PlayerMechaInfo = null; }
public void StartBattle(BattleInfo battleInfo) { Clear(); BattleInfo = battleInfo; BattleInfo.OnRemoveMechaInfoSuc = RemoveMechaInfo; PlayerMechaInfo = battleInfo.BattleMechaInfoData.PlayerMechaInfo; battleInfo.SetPlayerMecha(PlayerMechaInfo); foreach (KeyValuePair <uint, MechaInfo> kv in battleInfo.BattleMechaInfoData.EnemyMechaInfoDict) { AddEnemyMecha(kv.Value); } }