Class BaseFluidContainer<TConfig>
- Namespace
- Root
- Assembly
- Game.Content.Features.dll
public abstract class BaseFluidContainer<TConfig> : IFluidContainer where TConfig : IFluidContainerConfiguration
Type Parameters
TConfig
- Inheritance
-
objectBaseFluidContainer<TConfig>
- Implements
- Derived
- Extension Methods
Constructors
BaseFluidContainer(FluidContainerState, TConfig)
protected BaseFluidContainer(FluidContainerState state, TConfig config)
Parameters
stateFluidContainerStateconfigTConfig
Fields
Config
protected readonly TConfig Config
Field Value
- TConfig
State
protected readonly FluidContainerState State
Field Value
Properties
Capacity
public FluidUnit Capacity { get; }
Property Value
Fluid
public IFluid Fluid { get; }
Property Value
IsEmpty
public bool IsEmpty { get; }
Property Value
- bool
IsFull
public bool IsFull { get; }
Property Value
- bool
Level
public float Level { get; }
Property Value
- float
RemainingCapacity
public FluidUnit RemainingCapacity { get; }
Property Value
Value
public FluidUnit Value { get; }
Property Value
Methods
Add(FluidUnit, IFluid)
public void Add(FluidUnit amount, IFluid fluid)
Parameters
CanAdd(FluidUnit, IFluid)
public bool CanAdd(FluidUnit amount, IFluid fluid)
Parameters
Returns
- bool
CanTake(FluidUnit)
public bool CanTake(FluidUnit amount)
Parameters
amountFluidUnit
Returns
- bool
Flush()
public void Flush()
Take(FluidUnit)
public void Take(FluidUnit amount)
Parameters
amountFluidUnit
ToString()
public override string ToString()
Returns
- string
TryAdd(FluidUnit, IFluid)
public bool TryAdd(FluidUnit amount, IFluid fluid)
Parameters
Returns
- bool
TryTake(FluidUnit)
public bool TryTake(FluidUnit amount)
Parameters
amountFluidUnit
Returns
- bool