Class AIController
- Namespace
- VoxelPlayground.AI
- Assembly
- GamePlay.dll
public class AIController : MonoBehaviour
- Inheritance
-
object
AIController
- Extension Methods
-
Fields
actions
[Header("越往上优先级越高")]
public AIAction[] actions
Field Value
- AIAction[]
context
[ShowInInspector]
public Context context
Field Value
- Context
dashAttackAnimName
public const string dashAttackAnimName = "Zombie_Atk_Dash"
Field Value
- string
disableWhenGrabbed
public bool disableWhenGrabbed
Field Value
- bool
evaluationInterval
public float evaluationInterval
Field Value
- float
LeftHandOriRelativePosToHip
public Vector3 LeftHandOriRelativePosToHip
Field Value
- Vector3
m_AttackTypeMelee
public AIController.MeleeAttackType m_AttackTypeMelee
Field Value
- AIController.MeleeAttackType
m_AttackTypeMeleeChanced
public AIController.MeleeAttackType m_AttackTypeMeleeChanced
Field Value
- AIController.MeleeAttackType
m_AttackTypeMeleeChancedChance
public float m_AttackTypeMeleeChancedChance
Field Value
- float
m_CursorController
public CursorController m_CursorController
Field Value
- CursorController
m_SlashLenMul
public float m_SlashLenMul
Field Value
- float
m_SlashMoveSpeed
public float m_SlashMoveSpeed
Field Value
- float
m_SlashPointBeginOffset
public Vector3 m_SlashPointBeginOffset
Field Value
- Vector3
m_SlashPointBeginXYRadius
public float m_SlashPointBeginXYRadius
Field Value
- float
m_SlashPointBeginZ
public float m_SlashPointBeginZ
Field Value
- float
m_SlashPointMid
[Header("Attack Melee Slash")]
public Vector3 m_SlashPointMid
Field Value
- Vector3
m_SlashProgressCurve
public AnimationCurve m_SlashProgressCurve
Field Value
- AnimationCurve
m_SlashPtBeginYaw
public float m_SlashPtBeginYaw
Field Value
- float
m_SlashRestTime
public float m_SlashRestTime
Field Value
- float
m_SlashRestTimeRandAdd
public float m_SlashRestTimeRandAdd
Field Value
- float
m_SlashTime
Field Value
- float
m_SlashTimeRandAdd
public float m_SlashTimeRandAdd
Field Value
- float
moveController
public MoveController moveController
Field Value
- MoveController
noAttackUntil
[NonSerialized]
public float noAttackUntil
Field Value
- float
ownerEntity
public EntityCharacter ownerEntity
Field Value
- EntityCharacter
public Vector3 rightFootOriRelativePosToHip
Field Value
- Vector3
stretchDistance
public float stretchDistance
Field Value
- float
stretchUpDistance
public float stretchUpDistance
Field Value
- float
Properties
IsActivated
public bool IsActivated { get; }
Property Value
- bool
IsBareHandedAttackWindow
public bool IsBareHandedAttackWindow { get; }
Property Value
- bool
IsBlocked
public bool IsBlocked { get; }
Property Value
- bool
isIKFeetAttack
public bool isIKFeetAttack { get; }
Property Value
- bool
IsIKFeetAttackHitThisCycle
public bool IsIKFeetAttackHitThisCycle { get; }
Property Value
- bool
isPlayingBareHandedAttackAnimation
public bool isPlayingBareHandedAttackAnimation { get; }
Property Value
- bool
IsRestraintAttack
public bool IsRestraintAttack { get; }
Property Value
- bool
IsSlashing
public bool IsSlashing { get; }
Property Value
- bool
Methods
AimRangedWeapon(Vector3)
public void AimRangedWeapon(Vector3 targetPos)
Parameters
targetPos Vector3
ClearBlockState(BlockState)
public void ClearBlockState(AIController.BlockState state)
Parameters
state AIController.BlockState
ClearCurrentAction()
public void ClearCurrentAction()
ExitCurrentAction()
public void ExitCurrentAction()
HasBlockState(BlockState)
public bool HasBlockState(AIController.BlockState state)
Parameters
state AIController.BlockState
Returns
- bool
IsRunning()
Returns
- bool
MarkIKFeetHitThisCycle()
public void MarkIKFeetHitThisCycle()
OnAttackAnimHitFrame()
public void OnAttackAnimHitFrame()
OnAttackAnimPrepareFrame()
public void OnAttackAnimPrepareFrame()
OnAttackAnimStartFrame()
public void OnAttackAnimStartFrame()
SetBlockState(BlockState)
public void SetBlockState(AIController.BlockState state)
Parameters
state AIController.BlockState
SetPlayReloadAnimationEnabled(bool)
public void SetPlayReloadAnimationEnabled(bool enabled)
Parameters
enabled bool
Slash()
StopBareHandedAttack()
public void StopBareHandedAttack()
StopDashAttack()
public void StopDashAttack()
StopIKAttack()
public void StopIKAttack()
StopRangeAttack()
public void StopRangeAttack()
StopRestraintAttack()
public void StopRestraintAttack()
TryReleaseSlash(bool)
public void TryReleaseSlash(bool force = false)
Parameters
force bool
TryStartBareHandedAttack(UnityAction<EntityCharacter, Entity, Vector3, Collider>, bool, bool)
public void TryStartBareHandedAttack(UnityAction<EntityCharacter, Entity, Vector3, Collider> onHitEntityCallback, bool isPhysicsEvent = false, bool forceUseAnimEventWhenCrippled = false)
Parameters
onHitEntityCallback UnityAction<EntityCharacter, Entity, Vector3, Collider>
isPhysicsEvent bool
forceUseAnimEventWhenCrippled bool
TryStartDashAttack()
public void TryStartDashAttack()
TryStartIKFeetAttack(float, Entity, UnityAction<EntityCharacter, Entity, Vector3, Collider>)
public void TryStartIKFeetAttack(float deltaTime, Entity targetEntity, UnityAction<EntityCharacter, Entity, Vector3, Collider> onHitTargetCallback)
Parameters
deltaTime float
targetEntity Entity
onHitTargetCallback UnityAction<EntityCharacter, Entity, Vector3, Collider>
TryStartIKHandAttack(float, Entity, UnityAction<EntityCharacter, Entity, Vector3, Collider>)
public void TryStartIKHandAttack(float deltaTime, Entity targetEntity, UnityAction<EntityCharacter, Entity, Vector3, Collider> onHitTargetCallback)
Parameters
deltaTime float
targetEntity Entity
onHitTargetCallback UnityAction<EntityCharacter, Entity, Vector3, Collider>
TryStartRestraintAttack(UnityAction<EntityCharacter, Entity, Vector3, Collider>)
public void TryStartRestraintAttack(UnityAction<EntityCharacter, Entity, Vector3, Collider> onHitEntityCallback)
Parameters
onHitEntityCallback UnityAction<EntityCharacter, Entity, Vector3, Collider>
UpdateRangedAttack()
public void UpdateRangedAttack()