C# Class GameMachine.Npc

Inheritance: UnityEngine.MonoBehaviour
Show file Open project: gamemachine/gamemachine Class Usage Examples

Public Properties

Property Type Description
action System.Action
controller NpcEntityController
gameEntity IGameEntity
group NpcGroup
order int
route WaypointRoute
target UnityEngine.Transform

Public Methods

Method Description
DeathStatusChange ( int status ) : void
GetNpcDef ( ) : NpcDef
RemoveAttackTarget ( ) : void
SetAttackTarget ( Transform attackTarget, float targetDistance ) : void
SetNpcDef ( NpcDef npcDef ) : void
Start ( ) : void
Update ( ) : void

Private Methods

Method Description
CalculateTarget ( ) : void
RunAi ( ) : void
SetPath ( Vector3 pos ) : bool
SetTargetFromWaypoint ( ) : void

Method Details

DeathStatusChange() public method

public DeathStatusChange ( int status ) : void
status int
return void

GetNpcDef() public method

public GetNpcDef ( ) : NpcDef
return NpcDef

RemoveAttackTarget() public method

public RemoveAttackTarget ( ) : void
return void

SetAttackTarget() public method

public SetAttackTarget ( Transform attackTarget, float targetDistance ) : void
attackTarget UnityEngine.Transform
targetDistance float
return void

SetNpcDef() public method

public SetNpcDef ( NpcDef npcDef ) : void
npcDef NpcDef
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

action public property

public Action,System action
return System.Action

controller public property

public NpcEntityController controller
return NpcEntityController

gameEntity public property

public IGameEntity gameEntity
return IGameEntity

group public property

public NpcGroup,GameMachine group
return NpcGroup

order public property

public int order
return int

route public property

public WaypointRoute,GameMachine route
return WaypointRoute

target public property

public Transform,UnityEngine target
return UnityEngine.Transform