Class MobilePersonMotor
Drives mobile NPCs around town exteriors using the local navgrid.
Namespace: DaggerfallWorkshop.Game
Assembly: Assembly-CSharp.dll
Syntax
public class MobilePersonMotor : MonoBehaviour
Fields
| Improve this Doc View SourcecityNavigation
Declaration
public CityNavigation cityNavigation
Field Value
Type | Description |
---|---|
CityNavigation |
Properties
| Improve this Doc View SourceCurrentDirection
Gets current mobile facing and direction of movement.
Declaration
public MobilePersonMotor.MobileDirection CurrentDirection { get; }
Property Value
Type | Description |
---|---|
MobilePersonMotor.MobileDirection |
CurrentState
Gets current mobile state.
Declaration
public MobilePersonMotor.MobileStates CurrentState { get; }
Property Value
Type | Description |
---|---|
MobilePersonMotor.MobileStates |
DistanceToPlayer
Gets last observed distance between this mobile and player.
Declaration
public float DistanceToPlayer { get; }
Property Value
Type | Description |
---|---|
Single |
DistanceToTarget
Gets distance remaining to target in scene.
Declaration
public float DistanceToTarget { get; }
Property Value
Type | Description |
---|---|
Single |
LastState
Gets last mobile state.
Declaration
public MobilePersonMotor.MobileStates LastState { get; }
Property Value
Type | Description |
---|---|
MobilePersonMotor.MobileStates |
MobileAsset
Declaration
public MobilePersonAsset MobileAsset { get; set; }
Property Value
Type | Description |
---|---|
MobilePersonAsset |
MoveCount
Gets total number of times this mobile has moved to a new time. This count is reset when mobile is recycled.
Declaration
public int MoveCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
SeekCount
Gets consecutive number of times this mobile has searched for a new tile. This count is reset every time mobile moves to a new tile.
Declaration
public int SeekCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
TargetScenePosition
Gets target scene position. If this is Vector3.zero then mobile is not properly on grid.
Declaration
public Vector3 TargetScenePosition { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Methods
| Improve this Doc View SourceClearMotor()
Clear motor when deactivating.
Declaration
public void ClearMotor()
InitMotor()
Initialise motor when activating.
Declaration
public void InitMotor()