public BattleManager(BattleData data) { this.data = data; battleVM = new BattleViewModels(); list = new MenkoList(); skillController = new SkillController(this); isBattleEnd = false; }
public void BindVM(BattleData data) { ViewRoot root = Object.FindObjectOfType<ViewRoot>(); List<UnitVM> playerUnits = CreateUnitVMList(data.PlayerUnit.GetData()); List<UnitVM> rivalUnits = CreateUnitVMList(data.RivalUnit.GetData()); this.unitListVM = new UnitListVM(playerUnits, rivalUnits); this.battleVM = new BattleVM(root); this.guideVM = new GuideVM() { GuideText = "" }; root.Bind(this.unitListVM); root.Bind(this.guideVM); root.SetContext(); }
void ToBattle() { // 仮の対戦データを使用 BattleUnit[] units = new BattleUnit[2]; for (int i = 0; i < units.Length; ++i) { BattleUnit unit = new BattleUnit( new uint[] { 1, 2, 3, 2, 1 }, new bool[] { false, true, false, true, false}, (i == 0 ? true : false) ); units[i] = unit; } BattleData battleSetUp = new BattleData(1, true, units); SceneManager.Instance.ChangeScene(new BattleScene(battleSetUp)); }
public void SceneMove() { // 今の所仮データを入れる BattleUnit[] units = new BattleUnit[2]; for (int i = 0; i < units.Length; ++i) { BattleUnit unit = new BattleUnit( new uint[] { 1, 3, 5, 7, 3 }, new bool[] { false, true, false, true, false}, (i == 0 ? true : false) ); units[i] = unit; } BattleData battleSetUp = new BattleData(1, true, units); SceneManager.Instance.ChangeScene(new BattleScene(battleSetUp)); }
public BattleScene(BattleData setup) { data = setup; manager = new BattleManager(setup); this.stateMachine = new BattleStateMachine(manager); }