Anvil
|
A location in the module, represented by area, position and orientation. More...
Public Member Functions | |
void | ApplyEffect (EffectDuration durationType, Effect effect, TimeSpan duration=default) |
Applies the specified effect at this location. More... | |
void | CreateTrap (TrapBaseType trap, float size=2.0f, string tag="", string disarm="", string triggered="") |
Creates the specified trap. More... | |
float | Distance (Location target) |
Returns the distance to the target. If you only need to compare the distance, you can compare the squared distance using DistanceSquared to avoid a costly sqrt operation. More... | |
float | DistanceSquared (Location target) |
Returns the squared distance to the target. More... | |
IEnumerable< NwCreature > | GetNearestCreatures () |
Gets all creatures near this location, ordered by distance. More... | |
IEnumerable< NwCreature > | GetNearestCreatures (CreatureTypeFilter filter1) |
Gets all creatures near this location, ordered by distance. More... | |
IEnumerable< NwCreature > | GetNearestCreatures (CreatureTypeFilter filter1, CreatureTypeFilter filter2) |
Gets all creatures near this location, ordered by distance. More... | |
IEnumerable< NwCreature > | GetNearestCreatures (CreatureTypeFilter filter1, CreatureTypeFilter filter2, CreatureTypeFilter filter3) |
Gets all creatures near this location, ordered by distance. More... | |
IEnumerable< T > | GetNearestObjectsByType< T > () |
Gets all objects near this location, ordered by distance. More... | |
IEnumerable< NwGameObject > | GetObjectsInShape (Shape shape, float size, bool losCheck, ObjectTypes objTypes=ObjectTypes.Creature, Vector3 origin=default) |
Gets all objects in a shape at this location. More... | |
IEnumerable< T > | GetObjectsInShapeByType< T > (Shape shape, float size, bool losCheck, Vector3 origin=default) |
Gets all objects in a shape at this location of the specified type. More... | |
void | SetTile (int tileId, TileRotation rotation, int height=0, SettleFlags flags=SettleFlags.RecomputeLighting) |
Changes the tile at this location to a new tile. More... | |
void | SetTileAnimationLoops (bool animLoop1, bool animLoop2, bool animLoop3) |
Sets the state of the animation loops of the tile at this location. More... | |
Public Member Functions inherited from Anvil.API.EngineStructure | |
void | Dispose () |
Static Public Member Functions | |
static ? Location | Create (NwArea area, Vector3 position, float orientation) |
Create a new location from the specified area, position and orientation More... | |
static implicit | operator Location? (IntPtr intPtr) |
Static Public Member Functions inherited from Anvil.API.EngineStructure | |
static implicit | operator IntPtr (EngineStructure engineStructure) |
Properties | |
NwArea | Area [get] |
Gets the associated Area of this location. More... | |
float | FlippedRotation [get] |
Gets the inverted rotation value of this location (placeables). More... | |
float | GroundHeight [get] |
Gets the z-offset for the walkmesh at this location. More... | |
bool | IsWalkable [get] |
Gets a value indicating whether the location is walkable. More... | |
Vector3 | Position [get] |
Gets the position Vector of this location. More... | |
float | Rotation [get] |
Gets the rotation value of this location. More... | |
override int | StructureId [get] |
int | SurfaceMaterial [get] |
Gets the surface material index at this location. Returns 0 if the location is invalid or has no surface type. More... | |
int | TileHeight [get] |
Gets the height of the tile set at this location. More... | |
int | TileId [get] |
Gets the id of the tile set at this location. More... | |
TileInfo?? | TileInfo [get] |
Gets the tile information at this location. More... | |
TileMainLightColor | TileMainLightColorOne [get] |
Gets the color of the first main light in the tile containing this location. More... | |
TileMainLightColor | TileMainLightColorTwo [get] |
Gets the color of the second main light in the tile containing this location. More... | |
TileRotation | TileRotation [get] |
Gets the rotation of the tile set at this location. More... | |
TileSourceLightColor | TileSourceLightColorOne [get] |
Gets the color of the first light source in the tile containing this location. More... | |
TileSourceLightColor | TileSourceLightColorTwo [get] |
Gets the color of the second light source in the tile containing this location. More... | |
Properties inherited from Anvil.API.EngineStructure | |
bool | IsValid [get] |
Gets if this object is valid. More... | |
abstract int | StructureId [get] |
Additional Inherited Members | |
Protected Member Functions inherited from Anvil.API.EngineStructure | |
EngineStructure (IntPtr handle, bool memoryOwn) | |
A location in the module, represented by area, position and orientation.
|
inline |
Applies the specified effect at this location.
durationType | The duration type to apply with this effect. |
effect | The effect to apply. |
duration | If duration type is EffectDuration.Temporary, the duration of this effect. |
|
inlinestatic |
Create a new location from the specified area, position and orientation
area | The area of the location. |
position | The position of the location. |
orientation | The rotation of the location. |
|
inline |
Creates the specified trap.
trap | The base type of trap. |
size | The size of the trap. Minimum size allowed is 1.0f. If no value set, defaults to 2.0f. |
tag | The tag of the trap being created. If no value set, defaults to an empty string. |
disarm | The script that will fire when the trap is disarmed. If no value set, defaults to an empty string and no script will fire. |
triggered | The script that will fire when the trap is triggered. If no value set, defaults to an empty string and the default OnTrapTriggered script for the trap type specified will fire instead (as specified in the traps.2da). |
|
inline |
Returns the distance to the target.
If you only need to compare the distance, you can compare the squared distance using DistanceSquared to avoid a costly sqrt operation.
target | The other location to calculate distance between. |
|
inline |
Returns the squared distance to the target.
target | The other location to calculate distance between. |
|
inline |
Gets all creatures near this location, ordered by distance.
|
inline |
Gets all creatures near this location, ordered by distance.
filter1 | A filter for the returned creatures. |
|
inline |
Gets all creatures near this location, ordered by distance.
filter1 | A filter for the returned creatures. |
filter2 | A 2nd filter for the returned creatures. |
|
inline |
Gets all creatures near this location, ordered by distance.
filter1 | A filter for the returned creatures. |
filter2 | A 2nd filter for the returned creatures. |
filter3 | A 3rd filter for the returned creatures. |
|
inline |
Gets all objects near this location, ordered by distance.
T | : | NwGameObject |
|
inline |
Gets all objects in a shape at this location.
|
inline |
Gets all objects in a shape at this location of the specified type.
T | : | NwGameObject |
|
inline |
Changes the tile at this location to a new tile.
tileId | The new tile to apply. |
rotation | How the tile should be rotated. |
height | The height of the tile. |
flags | Additional flags/behaviours to run after the tile is updated. |
|
inline |
Sets the state of the animation loops of the tile at this location.
|
get |
Gets the associated Area of this location.
|
get |
Gets the inverted rotation value of this location (placeables).
|
get |
Gets the z-offset for the walkmesh at this location.
|
get |
Gets a value indicating whether the location is walkable.
|
get |
Gets the position Vector of this location.
|
get |
Gets the rotation value of this location.
|
get |
Gets the surface material index at this location.
Returns 0 if the location is invalid or has no surface type.
|
get |
Gets the height of the tile set at this location.
|
get |
Gets the id of the tile set at this location.
|
get |
Gets the tile information at this location.
|
get |
Gets the color of the first main light in the tile containing this location.
|
get |
Gets the color of the second main light in the tile containing this location.
|
get |
Gets the rotation of the tile set at this location.
|
get |
Gets the color of the first light source in the tile containing this location.
|
get |
Gets the color of the second light source in the tile containing this location.