Exemplo n.º 1
0
        public void Initialise(GameVM gameVM, StarSystem starSys, Entity viewingFaction)
        {
            _viewingFaction = viewingFaction;

            var listnerblobs = new List <int>();

            listnerblobs.Add(EntityManager.DataBlobTypes[typeof(OwnedDB)]);
            listnerblobs.Add(EntityManager.DataBlobTypes[typeof(PositionDB)]);
            EntityChangeListner changeListner = new EntityChangeListner(starSys, viewingFaction, listnerblobs);

            _changeListner = changeListner;


            IconableEntitys.Clear();
            _iconableEntites.Clear();


            foreach (Entity entity in _changeListner.ListningToEntites)
            {
                AddIconableEntity(entity);
            }
            SystemSubpulse = starSys.ManagerSubpulses;
            //starSys.SystemManager.GetAllEntitiesWithDataBlob<NewtonBalisticDB>(gameVM.CurrentAuthToken);

            OnPropertyChanged(nameof(IconableEntitys));
        }
Exemplo n.º 2
0
        //public Dictionary<IDrawIconMethod, List<AIconData<BaseDataBlob>>> IconsDictionary = new Dictionary<IDrawIconMethod, List<AIconData<BaseDataBlob>>>();

        public void InitializeForGM(GameVM gameVM, StarSystem starSys)
        {
            _changeListner = new EntityChangeListnerSM(starSys);

            foreach (var entityWithPosition in starSys.GetAllEntitiesWithDataBlob <PositionDB>())
            {
                AddIconableEntity(entityWithPosition);
                _changeListner.ListningToEntites.Add(entityWithPosition);
            }
        }