internal void HandleChange(EntityChangeData changeData) { if (changeData.ChangeType == EntityChangeData.EntityChangeType.DBAdded) { if (changeData.Datablob is OrbitDB && changeData.Entity.GetDataBlob <OrbitDB>().Parent != null) { if (!((OrbitDB)changeData.Datablob).IsStationary) { OrbitList[changeData.Entity.Guid] = new OrbitRing(changeData.Entity, _camera); } } if (changeData.Datablob is NameDB) { TextIconList[changeData.Entity.Guid] = new TextIcon(changeData.Entity, _camera); } IconDict[changeData.Entity.Guid] = new EntityIcon(changeData.Entity, _camera); } if (changeData.ChangeType == EntityChangeData.EntityChangeType.DBRemoved) { if (changeData.Datablob is OrbitDB) { OrbitList.Remove(changeData.Entity.Guid); } if (changeData.Datablob is NameDB) { TextIconList.Remove(changeData.Entity.Guid); } } }
internal void RemoveIcon(Entity entity) { if (OrbitList.ContainsKey(entity.Guid)) { OrbitList.Remove(entity.Guid); } if (TextIconList.ContainsKey(entity.Guid)) { TextIconList.Remove(entity.Guid); } if (IconDict.ContainsKey(entity.Guid)) { IconDict.Remove(entity.Guid); } }