private void CheckAtmos() { if (metaNode.GasMix.Pressure < MinimumPressure) { metaNode.GasMix = new GasMix(GasMixes.Air); subsystemManager.UpdateAt(metaNode.Position); } }
private void Update() { if (metaNode.GasMix.Pressure > MaximumPressure) { metaNode.GasMix = new GasMix(GasMixes.Space); _subsystemManager.UpdateAt(metaNode.Position); } }
public virtual void SetTile(Vector3Int position, GenericTile tile, Matrix4x4 transformMatrix, Color color) { InternalSetTile(position, tile); tilemap.SetColor(position, color); tilemap.SetTransformMatrix(position, transformMatrix); subsystemManager?.UpdateAt(position); }
private void Update() { if (metaNode.Atmos.Pressure > MaximumPressure) { metaNode.Atmos = GasMixes.Space; _subsystemManager.UpdateAt(metaNode.Position); } }
public virtual bool RemoveTile(Vector3Int position) { bool TileREmoved = false; TileREmoved = InternalSetTile(position, null); if (TileREmoved) { subsystemManager.UpdateAt(position); } return(TileREmoved); }
public virtual void RemoveTile(Vector3Int position, bool removeAll = false) { if (removeAll) { //TODO: OVERLAYS - This wouldn't work reliably if there is something at level -3 but nothing at -1 and -2. position.z = 0; while (tilemap.HasTile(position)) { InternalSetTile(position, null); position.z--; } } else { InternalSetTile(position, null); } position.z = 0; subsystemManager.UpdateAt(position); }
public virtual bool RemoveTile(Vector3Int position, bool removeAll = false) { bool TileREmoved = false; if (removeAll) { position.z = 0; while (tilemap.HasTile(position)) { InternalSetTile(position, null); position.z--; TileREmoved = true; } } else { TileREmoved = InternalSetTile(position, null); } position.z = 0; subsystemManager.UpdateAt(position); return(TileREmoved); }
public void UpdateSystemsAt(Vector3Int localPosition) { subsystemManager.UpdateAt(localPosition); }
public void UpdateSystemsAt(Vector3Int localPosition, SystemType ToUpDate = SystemType.All) { subsystemManager.UpdateAt(localPosition, ToUpDate); }
public virtual void SetTile(Vector3Int position, GenericTile tile, Matrix4x4 transformMatrix) { tilemap.SetTile(position, tile); tilemap.SetTransformMatrix(position, transformMatrix); subsystemManager.UpdateAt(position); }