Ejemplo n.º 1
0
        private void OnEntityKill(ContainerIOEntity entity)
        {
            BuildingPrivlidge priv = entity.GetBuildingPrivilege();

            if (priv == null)
            {
                return;
            }

            _ioEntity[priv.buildingID]?.Remove(entity);
        }
Ejemplo n.º 2
0
        private void OnEntitySpawned(ContainerIOEntity entity)
        {
            BuildingPrivlidge priv = entity.GetBuildingPrivilege();

            if (priv == null)
            {
                return;
            }

            if (!_ioEntity.ContainsKey(priv.buildingID))
            {
                _ioEntity[priv.buildingID] = new List <IOEntity> {
                    entity
                };
            }
            else
            {
                _ioEntity[priv.buildingID].Add(entity);
            }
        }