Corgi Engine
v9.0
|
This ability will make your character move automatically, without having to touch the left or right inputs More...
Public Types | |
enum | InitialDirections { InitialDirections.Left, InitialDirections.Right, InitialDirections.None } |
the possible directions the character can start moving in More... | |
Public Member Functions | |
override void | ProcessAbility () |
On process ability we do nothing More... | |
override void | LateProcessAbility () |
On late process, we reset our driven input More... | |
virtual void | PauseMovement () |
Forces a pause in the movement, that can then be resumed More... | |
virtual void | ResumeMovement () |
Resumes movement More... | |
virtual void | SetDrivenInput (float newDrivenInput) |
A method you can call to force a new input when in NoHorizontalInput mode More... | |
virtual void | ChangeDirection () |
Changes direction (left to right, right to left) More... | |
virtual void | ForceDirection (float newDirection) |
Forces a direction (-1 left, 1 right) More... | |
virtual void | ToggleRun () |
Changes the run state (walk > run, run > walk) More... | |
virtual void | ForceRun (bool status) |
Forces run (true) or walk (false) More... | |
Public Member Functions inherited from MoreMountains.CorgiEngine.CharacterAbility | |
virtual string | HelpBoxText () |
This method is only used to display a helpbox text at the beginning of the ability's inspector. More... | |
virtual void | SetInputManager (InputManager inputManager) |
Sets a new input manager for this ability to get input from More... | |
virtual void | BindAnimator () |
Binds the animator from the character and initializes the animator parameters More... | |
virtual void | ResetInput () |
Resets all input for this ability. Can be overridden for ability specific directives More... | |
virtual void | EarlyProcessAbility () |
The first of the 3 passes you can have in your ability. Think of it as EarlyUpdate() if it existed More... | |
virtual void | UpdateAnimator () |
Override this to send parameters to the character's animator. This is called once per cycle, by the Character class, after Early, normal and Late process(). More... | |
virtual void | PermitAbility (bool abilityPermitted) |
Changes the status of the ability's permission More... | |
virtual void | Flip () |
Override this to specify what should happen in this ability when the character flips More... | |
virtual void | ResetAbility () |
Override this to reset this ability's parameters. It'll be automatically called when the character gets killed, in anticipation for its respawn. More... | |
virtual void | PlayAbilityStartFeedbacks () |
Plays the ability start sound effect More... | |
virtual void | StopStartFeedbacks () |
Stops the ability used sound effect More... | |
virtual void | PlayAbilityStopFeedbacks () |
Plays the ability stop sound effect More... | |
virtual void | RegisterAnimatorParameter (string parameterName, AnimatorControllerParameterType parameterType, out int parameter) |
Registers a new animator parameter to the list More... | |
Public Attributes | |
bool | AutoSetup = true |
if this is true, will set other abilities in the appropriate configuration on initialization automatically More... | |
InitialDirections | InitialDirection = InitialDirections.Right |
the initial direction the character should start moving towards More... | |
bool | RunningOnStart = false |
if this is true, the character More... | |
bool | NoHorizontalInput = false |
if this is true, input won't be read More... | |
float | InitialInput = 1f |
if NoHorizontalInput is true, the initial value to apply to input More... | |
bool | ChangeDirectionOnWalljump = true |
if this is true, doing a walljump will also cause a direction change More... | |
bool | ChangeDirectionOnWallCollision = false |
if this is true, the character will change direction when colliding with a wall More... | |
bool | ChangeDirectionOnWallCollisionOnlyIfGrounded = false |
if this is true, the character will change direction when colliding with a wall, but only if grounded - requires ChangeDirectionOnWallCollision to be true More... | |
bool | ChangeDirectionOnFallingDown = false |
if this is true, the character will change direction when falling down, at the start of the fall More... | |
bool | ToggleRunButton |
Test button for ToggleRun. More... | |
bool | ChangeDirectionButton |
Test button for ChangeDirection. More... | |
bool | PauseMovementButton |
Test button for ChangeDirection. More... | |
bool | ResumeMovementButton |
Test button for ChangeDirection. More... | |
Public Attributes inherited from MoreMountains.CorgiEngine.CharacterAbility | |
MMFeedbacks | AbilityStartFeedbacks |
the feedbacks to play when the ability starts More... | |
MMFeedbacks | AbilityStopFeedbacks |
the feedbacks to play when the ability stops More... | |
bool | AbilityPermitted = true |
if true, this ability can perform as usual, if not, it'll be ignored. You can use this to unlock abilities over time for example More... | |
CharacterStates.MovementStates[] | BlockingMovementStates |
an array containing all the blocking movement states. If the Character is in one of these states and tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while Idle or Swimming, for example. More... | |
CharacterStates.CharacterConditions[] | BlockingConditionStates |
an array containing all the blocking condition states. If the Character is in one of these states and tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while dead, for example. More... | |
Weapon.WeaponStates[] | BlockingWeaponStates |
an array containing all the blocking weapon states. If one of the character's weapons is in one of these states and yet the character tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while attacking, for example. More... | |
Protected Member Functions | |
override void | Initialization () |
On init we grab our components and set them if needed, set our initial direction and run state More... | |
override void | HandleInput () |
Forces a current direction and passes it to the CharacterHorizontalMovement ability More... | |
virtual void | TestChangeDirectionOnWallCollision () |
Checks if we should change direction if colliding with a wall More... | |
virtual void | TestChangeDirectionOnFallingDown () |
Checks if we should be changing direction if falling down More... | |
virtual void | OnWallJump () |
When the Character walljumps, we change direction if needed More... | |
Protected Member Functions inherited from MoreMountains.CorgiEngine.CharacterAbility | |
virtual void | Start () |
On Start(), we call the ability's intialization More... | |
virtual void | InitializeAnimatorParameters () |
Adds required animator parameters to the animator parameters list if they exist More... | |
virtual void | InternalHandleInput () |
Internal method to check if an input manager is present or not More... | |
virtual void | OnRespawn () |
Override this to describe what should happen to this ability when the character respawns More... | |
virtual void | OnDeath () |
Override this to describe what should happen to this ability when the character respawns More... | |
virtual void | OnHit () |
Override this to describe what should happen to this ability when the character takes a hit More... | |
virtual void | OnEnable () |
On enable, we bind our respawn delegate More... | |
virtual void | OnDisable () |
On disable, we unbind our respawn delegate More... | |
Protected Attributes | |
CharacterRun | _characterRun |
CharacterWalljump | _characterWallJump |
float | _currentDirection = 1f |
bool | _running = false |
float | _directionBeforePause = 0f |
float | _drivenInput = 1f |
CharacterStates.MovementStates | _movementStateLastFrame |
Protected Attributes inherited from MoreMountains.CorgiEngine.CharacterAbility | |
Character | _character |
Transform | _characterTransform |
Health | _health |
CharacterHorizontalMovement | _characterHorizontalMovement |
CorgiController | _controller |
InputManager | _inputManager |
CameraController | _sceneCamera |
Animator | _animator |
CharacterStates | _state |
SpriteRenderer | _spriteRenderer |
MMStateMachine< CharacterStates.MovementStates > | _movement |
MMStateMachine< CharacterStates.CharacterConditions > | _condition |
bool | _abilityInitialized = false |
CharacterGravity | _characterGravity |
float | _verticalInput |
float | _horizontalInput |
bool | _startFeedbackIsPlaying = false |
List< CharacterHandleWeapon > | _handleWeaponList |
Additional Inherited Members | |
Properties inherited from MoreMountains.CorgiEngine.CharacterAbility | |
virtual bool | AbilityAuthorized [get] |
virtual bool | AbilityInitialized [get] |
true if the ability has already been initialized More... | |
This ability will make your character move automatically, without having to touch the left or right inputs
|
virtual |
Changes direction (left to right, right to left)
|
virtual |
Forces a direction (-1 left, 1 right)
newDirection |
|
virtual |
Forces run (true) or walk (false)
status |
|
protectedvirtual |
Forces a current direction and passes it to the CharacterHorizontalMovement ability
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protectedvirtual |
On init we grab our components and set them if needed, set our initial direction and run state
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
virtual |
On late process, we reset our driven input
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
protectedvirtual |
When the Character walljumps, we change direction if needed
|
virtual |
Forces a pause in the movement, that can then be resumed
|
virtual |
On process ability we do nothing
Reimplemented from MoreMountains.CorgiEngine.CharacterAbility.
|
virtual |
Resumes movement
|
virtual |
A method you can call to force a new input when in NoHorizontalInput mode
newDrivenInput |
|
protectedvirtual |
Checks if we should be changing direction if falling down
|
protectedvirtual |
Checks if we should change direction if colliding with a wall
|
virtual |
Changes the run state (walk > run, run > walk)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
bool MoreMountains.CorgiEngine.CharacterAutoMovement.AutoSetup = true |
if this is true, will set other abilities in the appropriate configuration on initialization automatically
bool MoreMountains.CorgiEngine.CharacterAutoMovement.ChangeDirectionButton |
Test button for ChangeDirection.
bool MoreMountains.CorgiEngine.CharacterAutoMovement.ChangeDirectionOnFallingDown = false |
if this is true, the character will change direction when falling down, at the start of the fall
bool MoreMountains.CorgiEngine.CharacterAutoMovement.ChangeDirectionOnWallCollision = false |
if this is true, the character will change direction when colliding with a wall
bool MoreMountains.CorgiEngine.CharacterAutoMovement.ChangeDirectionOnWallCollisionOnlyIfGrounded = false |
if this is true, the character will change direction when colliding with a wall, but only if grounded - requires ChangeDirectionOnWallCollision to be true
bool MoreMountains.CorgiEngine.CharacterAutoMovement.ChangeDirectionOnWalljump = true |
if this is true, doing a walljump will also cause a direction change
InitialDirections MoreMountains.CorgiEngine.CharacterAutoMovement.InitialDirection = InitialDirections.Right |
the initial direction the character should start moving towards
float MoreMountains.CorgiEngine.CharacterAutoMovement.InitialInput = 1f |
if NoHorizontalInput is true, the initial value to apply to input
bool MoreMountains.CorgiEngine.CharacterAutoMovement.NoHorizontalInput = false |
if this is true, input won't be read
bool MoreMountains.CorgiEngine.CharacterAutoMovement.PauseMovementButton |
Test button for ChangeDirection.
bool MoreMountains.CorgiEngine.CharacterAutoMovement.ResumeMovementButton |
Test button for ChangeDirection.
bool MoreMountains.CorgiEngine.CharacterAutoMovement.RunningOnStart = false |
if this is true, the character
bool MoreMountains.CorgiEngine.CharacterAutoMovement.ToggleRunButton |
Test button for ToggleRun.