Show / Hide Table of Contents

Class WeaverNPC

A custom NPC that the player can talk to

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
WeaverNPC
Namespace: WeaverCore.Assets.Components
Assembly: WeaverCore.dll
Syntax
public class WeaverNPC : MonoBehaviour

Properties

| Edit this page View Source

CanTalk

Is the player able to talk to this NPC?

Declaration
public bool CanTalk { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

FacePlayerWhenInRange

Should the NPC be looking towards the player when in range?

Declaration
public bool FacePlayerWhenInRange { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

PlayerInRange

Is the player in range of this NPC to start a conversation?

Declaration
public bool PlayerInRange { get; }
Property Value
Type Description
bool
| Edit this page View Source

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
| Edit this page View Source

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
| Edit this page View Source

Talking

Is the player currently talking to this NPC?

Declaration
public bool Talking { get; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

FacePlayer(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

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾