C# Class NPC, UnderworldExporter

Inheritance: MonoBehaviour
显示文件 Open project: hankmorgan/UnderworldExporter Class Usage Examples

Public Properties

Property Type Description
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

Public Methods

Method Description
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.

Private Methods

Method Description
NPCMoodDesc ( ) : string

Gives a mood string for NPCs

facing ( float angle ) : int

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

Method Details

AI_INIT() public method

public AI_INIT ( ) : void
return void

ApplyAttack() public method

Applies the attack to the NPC
public ApplyAttack ( int damage ) : bool
damage int Damage.
return bool

ApplyAttack() public method

Applies the attack from a known source
public ApplyAttack ( int damage, GameObject source ) : bool
damage int Damage.
source GameObject Source.
return bool

Awake() public method

public Awake ( ) : void
return void

ContextMenuDesc() public method

public ContextMenuDesc ( int item_id ) : string
item_id int
return string

ContextMenuUsedDesc() public method

public ContextMenuUsedDesc ( ) : string
return string

ExecuteAttack() public method

NPC tries to hit the player.
public ExecuteAttack ( ) : void
return void

ExecuteMagicAttack() public method

NPC casts a spell.
public ExecuteMagicAttack ( ) : void
return void

ExecuteRangedAttack() public method

Executes the ranged attack.
public ExecuteRangedAttack ( ) : void
return void

GetImpactPoint() public method

public GetImpactPoint ( ) : Vector3
return Vector3

LookAt() public method

Looks at the NPC
public LookAt ( ) : bool
return bool

OnDeath() public method

Raises the death events for the player.
public OnDeath ( ) : void
return void

TalkTo() public method

Begins a conversation if possible
public TalkTo ( ) : bool
return bool

UpdateSprite() public method

Updates the appearance of the NPC
public UpdateSprite ( ) : void
return void

UseVerb() public method

public UseVerb ( ) : string
return string

playAnimation() public method

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.
return void

Property Details

Ammo public_oe property

public int Ammo
return int

AnimRange public_oe property

public int AnimRange
return int

CalcFacingForDebug public_oe property

public int CalcFacingForDebug
return int

CurrentAnim public_oe property

public string CurrentAnim
return string

Frozen public_oe property

public bool Frozen
return bool

FrozenUpdate public_oe property

public short FrozenUpdate
return short

MagicAttack public_oe property

public bool MagicAttack
return bool

NPCStatusEffects public_oe property

public SpellEffect[] NPCStatusEffects
return SpellEffect[]

NPC_DEAD public_oe property

public bool NPC_DEAD
return bool

NPC_ID public_oe property

public string NPC_ID
return string

NPC_Launcher public_oe property

public GameObject NPC_Launcher
return GameObject

NavMeshRegion public_oe property

public string NavMeshRegion
return string

Poisoned public_oe property

public bool Poisoned
return bool

SpellIndex public_oe property

public int SpellIndex
return int

adj public_oe property

public float adj
return float

anim public_oe property

public Animator anim
return Animator

currentState public_oe property

public int currentState
return int

gtarg public_oe property

public GameObject gtarg
return GameObject

gtargName public_oe property

public string gtargName
return string

isUndead public_oe property

public bool isUndead
return bool

npc_arms public_oe property

public int npc_arms
return int

npc_attitude public_oe property

public int npc_attitude
return int

npc_goal public_oe property

public int npc_goal
return int

npc_gtarg public_oe property

public int npc_gtarg
return int

npc_health public_oe property

public int npc_health
return int

npc_hp public_oe property

public int npc_hp
return int

npc_hunger public_oe property

public int npc_hunger
return int

npc_level public_oe property

public int npc_level
return int

npc_name public_oe property

public int npc_name
return int

npc_power public_oe property

public int npc_power
return int

npc_talkedto public_oe property

public int npc_talkedto
return int

npc_whoami public_oe property

public int npc_whoami
return int

npc_xhome public_oe property

public int npc_xhome
return int

npc_yhome public_oe property

public int npc_yhome
return int

state public_oe property

public int state
return int

testforce public_oe property

public float testforce
return float