C# Класс NPC, UnderworldExporter

Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Ammo int
AnimRange int
CalcFacingForDebug int
CurrentAnim string
Frozen bool
FrozenUpdate short
MagicAttack bool
NPCStatusEffects SpellEffect[]
NPC_DEAD bool
NPC_ID string
NPC_Launcher GameObject
NavMeshRegion string
Poisoned bool
SpellIndex int
adj float
anim Animator
currentState int
gtarg GameObject
gtargName string
isUndead bool
npc_arms int
npc_attitude int
npc_goal int
npc_gtarg int
npc_health int
npc_hp int
npc_hunger int
npc_level int
npc_name int
npc_power int
npc_talkedto int
npc_whoami int
npc_xhome int
npc_yhome int
state int
testforce float

Открытые методы

Метод Описание
AI_INIT ( ) : void
ApplyAttack ( int damage ) : bool

Applies the attack to the NPC

ApplyAttack ( int damage, GameObject source ) : bool

Applies the attack from a known source

Awake ( ) : void
ContextMenuDesc ( int item_id ) : string
ContextMenuUsedDesc ( ) : string
ExecuteAttack ( ) : void

NPC tries to hit the player.

ExecuteMagicAttack ( ) : void

NPC casts a spell.

ExecuteRangedAttack ( ) : void

Executes the ranged attack.

GetImpactPoint ( ) : Vector3
LookAt ( ) : bool

Looks at the NPC

OnDeath ( ) : void

Raises the death events for the player.

TalkTo ( ) : bool

Begins a conversation if possible

UpdateSprite ( ) : void

Updates the appearance of the NPC

UseVerb ( ) : string
playAnimation ( string pAnim, int newState ) : void

Checks if a new animation is needed and if so run it.

Приватные методы

Метод Описание
NPCMoodDesc ( ) : string

Gives a mood string for NPCs

facing ( float angle ) : int

Breaks down the angle in the the facing sector. Clockwise from 0)

Описание методов

AI_INIT() публичный Метод

public AI_INIT ( ) : void
Результат void

ApplyAttack() публичный Метод

Applies the attack to the NPC
public ApplyAttack ( int damage ) : bool
damage int Damage.
Результат bool

ApplyAttack() публичный Метод

Applies the attack from a known source
public ApplyAttack ( int damage, GameObject source ) : bool
damage int Damage.
source GameObject Source.
Результат bool

Awake() публичный Метод

public Awake ( ) : void
Результат void

ContextMenuDesc() публичный Метод

public ContextMenuDesc ( int item_id ) : string
item_id int
Результат string

ContextMenuUsedDesc() публичный Метод

public ContextMenuUsedDesc ( ) : string
Результат string

ExecuteAttack() публичный Метод

NPC tries to hit the player.
public ExecuteAttack ( ) : void
Результат void

ExecuteMagicAttack() публичный Метод

NPC casts a spell.
public ExecuteMagicAttack ( ) : void
Результат void

ExecuteRangedAttack() публичный Метод

Executes the ranged attack.
public ExecuteRangedAttack ( ) : void
Результат void

GetImpactPoint() публичный Метод

public GetImpactPoint ( ) : Vector3
Результат Vector3

LookAt() публичный Метод

Looks at the NPC
public LookAt ( ) : bool
Результат bool

OnDeath() публичный Метод

Raises the death events for the player.
public OnDeath ( ) : void
Результат void

TalkTo() публичный Метод

Begins a conversation if possible
public TalkTo ( ) : bool
Результат bool

UpdateSprite() публичный Метод

Updates the appearance of the NPC
public UpdateSprite ( ) : void
Результат void

UseVerb() публичный Метод

public UseVerb ( ) : string
Результат string

playAnimation() публичный Метод

Checks if a new animation is needed and if so run it.
public playAnimation ( string pAnim, int newState ) : void
pAnim string P animation.
newState int New state.
Результат void

Описание свойств

Ammo публичное свойство

public int Ammo
Результат int

AnimRange публичное свойство

public int AnimRange
Результат int

CalcFacingForDebug публичное свойство

public int CalcFacingForDebug
Результат int

CurrentAnim публичное свойство

public string CurrentAnim
Результат string

Frozen публичное свойство

public bool Frozen
Результат bool

FrozenUpdate публичное свойство

public short FrozenUpdate
Результат short

MagicAttack публичное свойство

public bool MagicAttack
Результат bool

NPCStatusEffects публичное свойство

public SpellEffect[] NPCStatusEffects
Результат SpellEffect[]

NPC_DEAD публичное свойство

public bool NPC_DEAD
Результат bool

NPC_ID публичное свойство

public string NPC_ID
Результат string

NPC_Launcher публичное свойство

public GameObject NPC_Launcher
Результат GameObject

NavMeshRegion публичное свойство

public string NavMeshRegion
Результат string

Poisoned публичное свойство

public bool Poisoned
Результат bool

SpellIndex публичное свойство

public int SpellIndex
Результат int

adj публичное свойство

public float adj
Результат float

anim публичное свойство

public Animator anim
Результат Animator

currentState публичное свойство

public int currentState
Результат int

gtarg публичное свойство

public GameObject gtarg
Результат GameObject

gtargName публичное свойство

public string gtargName
Результат string

isUndead публичное свойство

public bool isUndead
Результат bool

npc_arms публичное свойство

public int npc_arms
Результат int

npc_attitude публичное свойство

public int npc_attitude
Результат int

npc_goal публичное свойство

public int npc_goal
Результат int

npc_gtarg публичное свойство

public int npc_gtarg
Результат int

npc_health публичное свойство

public int npc_health
Результат int

npc_hp публичное свойство

public int npc_hp
Результат int

npc_hunger публичное свойство

public int npc_hunger
Результат int

npc_level публичное свойство

public int npc_level
Результат int

npc_name публичное свойство

public int npc_name
Результат int

npc_power публичное свойство

public int npc_power
Результат int

npc_talkedto публичное свойство

public int npc_talkedto
Результат int

npc_whoami публичное свойство

public int npc_whoami
Результат int

npc_xhome публичное свойство

public int npc_xhome
Результат int

npc_yhome публичное свойство

public int npc_yhome
Результат int

state публичное свойство

public int state
Результат int

testforce публичное свойство

public float testforce
Результат float