Skip to content

ActorController

Cheng Gu edited this page Feb 4, 2020 · 3 revisions

Description

Base Data Class for the Character.

public abstract class ActorController : MonoBehaviour

Fields

Accessibility Type Name Summary
public ActorModel model The core data of actor
protected float aerialThreadhold A delay time to be aerial state
private ActorBehavior nextBehavior The next behavior that is going to execute

Methods

Accessibility Type Name Summary
public void Awake() A virtual method of MonoBehavior's Awake().
public void Init() A virtual method to initialize the ActorController
public void Update() A virtual method of MonoBehavior's Update().
protected void UpdatePlayerLogic() A virtual method to update the Player control logics.
private void UpdatePlayerBehaviorCtrl() Update the Control such as input, condition logics to determine the Next Behavior.
private bool CanStartNextBehavior() Return a bool to determine if meet the next behavior's condition.
private ChainBehavior GetChainBehavior(int index) Get the ChainBehavior by index.
private bool UpdatePriorityLevel(int nextPriority, ref int currentPriority) Check the priority of the Behavior.
protected void UpdateAILogic() A virtual method to update the AI Control.
public void UpdatePhysics() A virtual method to update the physics.
protected void UpdateVelocity() A virtual method to update the overall velocity of the CharacterController
protected void UpdateGroundedCheckInfo A virtual method to update the Infomation based on grounded or not.
protected void UpdateUngroundedInfo() A virtual method to update the Ungroundeded Infomation.
protected void UpdateGroundedInfo() A virtual method to update the Groundeded Infomation.
protected void UpdateFriction() A virtual method to update the friction.
public void GetHit() A virtual method about get hit event.

Clone this wiki locally