List<UnitVM> CreateUnitVMList(MenkoBattleData[] unitList) { List<UnitVM> unitVMList = new List<UnitVM>(); for (int i = 0; i < unitList.Length; ++i) { var unit = unitList[i]; string path = AssetPath.GetMonsterFaceTexPath(unit.BaseData.ID); var assetData = AssetManager.Load<Sprite>(path); var face = assetData.Asset as Sprite; var vm = new UnitVM(face, unit.IsRepresent, unit.SkillData.NeedTurn); unitVMList.Add(vm); unit.UnitViewModel = vm; } return unitVMList; }
List <UnitVM> CreateUnitVMList(MenkoBattleData[] unitList) { List <UnitVM> unitVMList = new List <UnitVM>(); for (int i = 0; i < unitList.Length; ++i) { var unit = unitList[i]; string path = AssetPath.GetMonsterFaceTexPath(unit.BaseData.ID); var assetData = AssetManager.Load <Sprite>(path); var face = assetData.Asset as Sprite; var vm = new UnitVM(face, unit.IsRepresent, unit.SkillData.NeedTurn); unitVMList.Add(vm); unit.UnitViewModel = vm; } return(unitVMList); }