Terrain Engine 2D  1.10
A 2D Block Engine
TerrainEngine2D.FluidBlock Class Reference

A block of fluid More...

Public Member Functions

bool IsSolid ()
 Check if fluid block is solid More...
 
void SetSolid ()
 Sets fluid block to solid More...
 
void SetEmpty ()
 Empties fluid block More...
 
void AddWeight (float amount)
 Adds liquid to the fluid block More...
 
void UnsettleNeighbours ()
 Set all adjacent blocks to unstable More...
 
float GetHeight ()
 Get the height of the fluid block (for mesh generation) More...
 

Public Attributes

const int SOLID_WEIGHT = -100
 Weight used for representing solid blocks More...
 
float Weight
 Amount of liquid in the block More...
 
bool Stable
 If the fluid has settled More...
 
FluidBlock TopBlock
 Adjacent top FluidBlock More...
 
FluidBlock BottomBlock
 Adjacent bottom FluidBlock More...
 
FluidBlock LeftBlock
 Adjacent left FluidBlock More...
 
FluidBlock RightBlock
 Adjacent right FluidBlock More...
 

Detailed Description

A block of fluid

Member Function Documentation

◆ AddWeight()

void TerrainEngine2D.FluidBlock.AddWeight ( float  amount)

Adds liquid to the fluid block

Parameters
amountAmount of fluid to add

◆ GetHeight()

float TerrainEngine2D.FluidBlock.GetHeight ( )

Get the height of the fluid block (for mesh generation)

Returns

◆ IsSolid()

bool TerrainEngine2D.FluidBlock.IsSolid ( )

Check if fluid block is solid

Returns
Returns true if the block is solid

◆ SetEmpty()

void TerrainEngine2D.FluidBlock.SetEmpty ( )

Empties fluid block

◆ SetSolid()

void TerrainEngine2D.FluidBlock.SetSolid ( )

Sets fluid block to solid

◆ UnsettleNeighbours()

void TerrainEngine2D.FluidBlock.UnsettleNeighbours ( )

Set all adjacent blocks to unstable

Member Data Documentation

◆ BottomBlock

FluidBlock TerrainEngine2D.FluidBlock.BottomBlock

Adjacent bottom FluidBlock

◆ LeftBlock

FluidBlock TerrainEngine2D.FluidBlock.LeftBlock

Adjacent left FluidBlock

◆ RightBlock

FluidBlock TerrainEngine2D.FluidBlock.RightBlock

Adjacent right FluidBlock

◆ SOLID_WEIGHT

const int TerrainEngine2D.FluidBlock.SOLID_WEIGHT = -100

Weight used for representing solid blocks

◆ Stable

bool TerrainEngine2D.FluidBlock.Stable

If the fluid has settled

◆ TopBlock

FluidBlock TerrainEngine2D.FluidBlock.TopBlock

Adjacent top FluidBlock

◆ Weight

float TerrainEngine2D.FluidBlock.Weight

Amount of liquid in the block


The documentation for this class was generated from the following file: