Beispiel #1
0
 private void CheckAtmos()
 {
     if (metaNode.GasMix.Pressure < MinimumPressure)
     {
         metaNode.GasMix = new GasMix(GasMixes.Air);
         subsystemManager.UpdateAt(metaNode.Position);
     }
 }
Beispiel #2
0
 private void Update()
 {
     if (metaNode.GasMix.Pressure > MaximumPressure)
     {
         metaNode.GasMix = new GasMix(GasMixes.Space);
         _subsystemManager.UpdateAt(metaNode.Position);
     }
 }
Beispiel #3
0
    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);
    }
Beispiel #4
0
 private void Update()
 {
     if (metaNode.Atmos.Pressure > MaximumPressure)
     {
         metaNode.Atmos = GasMixes.Space;
         _subsystemManager.UpdateAt(metaNode.Position);
     }
 }
Beispiel #5
0
    public virtual bool RemoveTile(Vector3Int position)
    {
        bool TileREmoved = false;

        TileREmoved = InternalSetTile(position, null);
        if (TileREmoved)
        {
            subsystemManager.UpdateAt(position);
        }
        return(TileREmoved);
    }
Beispiel #6
0
    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);
    }
Beispiel #7
0
    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);
    }
Beispiel #8
0
 public void UpdateSystemsAt(Vector3Int localPosition)
 {
     subsystemManager.UpdateAt(localPosition);
 }
 public void UpdateSystemsAt(Vector3Int localPosition, SystemType ToUpDate = SystemType.All)
 {
     subsystemManager.UpdateAt(localPosition, ToUpDate);
 }
Beispiel #10
0
 public virtual void SetTile(Vector3Int position, GenericTile tile, Matrix4x4 transformMatrix)
 {
     tilemap.SetTile(position, tile);
     tilemap.SetTransformMatrix(position, transformMatrix);
     subsystemManager.UpdateAt(position);
 }