public void Init(UnitInfoPM i_infoPM) { mUnitInfoPM = i_infoPM; SetModel(mUnitInfoPM.ViewModel); RefreshUnitStatDisplay(); }
private void OpenUnitInfoWindow() { GameObject window = gameObject.InstantiateUI(UnitInfoPrefab); UnitInfoPM infoPM = new UnitInfoPM(PlayerManager.Data.AllUnits, mUnitIndex, StatCalculator.Instance); UnitInfoView infoView = window.GetComponent <UnitInfoView>(); infoView.Init(infoPM); }