Click or drag to resize
AnimalStateEnergyRequiredToMove Method

Provides a method for creatures to determine how much energy a specific movement action will cost. The slower a creature moves the less energy they expend moving over a specific distance. With this in mind the developer can determine the optimum speed at which to move to a given location versus time and energy consumption.

Namespace: Terrarium.Sdk.Classes.State
Assembly: Terrarium.Sdk (in Terrarium.Sdk.dll) Version: 1.1.0.0 (1.1.0.0)
Syntax
public double EnergyRequiredToMove(
	double distance,
	int speed
)

Parameters

distance
Type: SystemDouble
The amount of distance your creature is going to move.
speed
Type: SystemInt32

[Missing <param name="speed"/> documentation for "M:Terrarium.Sdk.Classes.State.AnimalState.EnergyRequiredToMove(System.Double,System.Int32)"]

Return Value

Type: Double
System.Double representing the amount of energy required to make the movement action.
See Also