OrganismStateIsWithinRect Method |
Used to compute whether or not a given state object is in an adjacent or
overlapping grid cell. The extra radius can be used to extend the area
used for the function to find a match and so can be used for functions
like visibiliy.
Namespace: Terrarium.Sdk.Classes.StateAssembly: Terrarium.Sdk (in Terrarium.Sdk.dll) Version: 1.1.0.0 (1.1.0.0)
Syntaxpublic bool IsWithinRect(
int state1ExtraRadius,
OrganismState state2
)
Public Function IsWithinRect (
state1ExtraRadius As Integer,
state2 As OrganismState
) As Boolean
public:
bool IsWithinRect(
int state1ExtraRadius,
OrganismState^ state2
)
member IsWithinRect :
state1ExtraRadius : int *
state2 : OrganismState -> bool
Parameters
- state1ExtraRadius
- Type: SystemInt32
The amount of extra grid cells to add - state2
- Type: Terrarium.Sdk.Classes.StateOrganismState
The organism state of the creature to use in the area test.
Return Value
Type:
BooleanTrue if the creature is within range, false otherwise.
See Also