Ejemplo n.º 1
0
        public UnitModifier(ProgressBase i_progress)
        {
            mModel = new ViewModel();
            mData  = GenericDataLoader.GetData <T>(i_progress.ID);

            mLevel = new Upgradeable();
            mLevel.SetPropertyToUpgrade(mModel, mData.Level);
            Level.Value = i_progress.Level;
        }
Ejemplo n.º 2
0
        public Building(BuildingProgress i_buildingProgress, UnitProgress i_unitProgress)
        {
            mModel           = new ViewModel();
            mData            = GenericDataLoader.GetData <BuildingData>(i_buildingProgress.ID);
            Name             = mData.GetName();
            NumUnits         = (int)Math.Floor(i_unitProgress.Count);
            NextUnitProgress = i_unitProgress.Count - NumUnits;

            mLevel = new Upgradeable();
            mLevel.SetPropertyToUpgrade(mModel, mData.BuildingLevel);
            mLevel.UpgradeCompleteEvent += OnUpgraded;
            Level.Value = i_buildingProgress.Level;

            UnitData unitData = GenericDataLoader.GetData <UnitData>(i_unitProgress.ID);

            Unit = new Unit(unitData, i_unitProgress, mModel);

            UpdateViewProperties();

            SubscribeToMessages();
        }
Ejemplo n.º 3
0
 private void SetUnitLevel()
 {
     mLevel = new Upgradeable();
     mLevel.SetPropertyToUpgrade(mModel, mData.UnitLevel);
     Level.Value = mProgress.Level;
 }