Class WeaverNPC
A custom NPC that the player can talk to
Namespace: WeaverCore.Assets.Components
Assembly: WeaverCore.dll
Syntax
public class WeaverNPC : MonoBehaviour
Properties
| Edit this page View SourceCanTalk
Is the player able to talk to this NPC?
Declaration
public bool CanTalk { get; set; }
Property Value
Type | Description |
---|---|
bool |
FacePlayerWhenInRange
Should the NPC be looking towards the player when in range?
Declaration
public bool FacePlayerWhenInRange { get; set; }
Property Value
Type | Description |
---|---|
bool |
PlayerInRange
Is the player in range of this NPC to start a conversation?
Declaration
public bool PlayerInRange { get; }
Property Value
Type | Description |
---|---|
bool |
TalkDistance
The distance the player should be away from the NPC when talking to them
Declaration
public float TalkDistance { get; set; }
Property Value
Type | Description |
---|---|
float |
TalkSide
Where should the player be positioned in order to talk to the NPC?
Declaration
public WeaverNPC.PlayerTalkSide TalkSide { get; set; }
Property Value
Type | Description |
---|---|
WeaverNPC.PlayerTalkSide |
Talking
Is the player currently talking to this NPC?
Declaration
public bool Talking { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceFacePlayer(Vector3)
Used to play an animation to "Turn" towards the player
Declaration
protected virtual void FacePlayer(Vector3 playerPos)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | playerPos | The player's current position |