Add this class to a character and it'll be able to have a different gravity than the default one, and will be able to change it via Gravity Zones and Gravity Points Animator parameters : none.
More...
|
| override string | HelpBoxText () |
| | This method is only used to display a helpbox text at the beginning of the ability's inspector.
|
| virtual void | Update () |
| | On process we draw debug and rotate our character if needed.
|
| virtual void | UpdateGravityPointsList () |
| | Called at Init, this grabs all the Gravity Points in the scene and stores them. You can also call this method if you decide to add gravity points at runtime to refresh the list (they'll be ignored otherwise).
|
| virtual bool | ShouldReverseInput () |
| | Returns true if conditions to reverse input are met.
|
| virtual void | SetGravityAngle (float newAngle) |
| | Sets the default gravity angle to the one specified in parameters.
|
| virtual void | ResetGravityToDefault () |
| | Resets the gravity to its default value.
|
| override void | ResetAbility () |
| | On reset ability, we cancel all the changes made.
|
| virtual void | OnMMEvent (CorgiEngineEvent engineEvent) |
| | When we get a Corgi Engine event, we act on it.
|
| virtual void | SetInputManager (InputManager inputManager) |
| | Sets a new input manager for this ability to get input from.
|
| virtual void | BindAnimator () |
| | Binds the animator from the character and initializes the animator parameters.
|
| virtual void | ResetInput () |
| | Resets all input for this ability. Can be overridden for ability specific directives.
|
| virtual void | EarlyProcessAbility () |
| | The first of the 3 passes you can have in your ability. Think of it as EarlyUpdate() if it existed.
|
| virtual void | ProcessAbility () |
| | The second of the 3 passes you can have in your ability. Think of it as Update()
|
| virtual void | LateProcessAbility () |
| | The last of the 3 passes you can have in your ability. Think of it as LateUpdate()
|
| 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().
|
| virtual void | PermitAbility (bool abilityPermitted) |
| | Changes the status of the ability's permission.
|
| virtual void | Flip () |
| | Override this to specify what should happen in this ability when the character flips.
|
| virtual void | PlayAbilityStartFeedbacks () |
| | Plays the ability start feedback.
|
| virtual void | StopStartFeedbacks () |
| | Stops the ability used feedback.
|
| virtual void | PlayAbilityStopFeedbacks () |
| | Plays the ability stop feedback.
|
| virtual void | RegisterAnimatorParameter (string parameterName, AnimatorControllerParameterType parameterType, out int parameter) |
| | Registers a new animator parameter to the list.
|
| void | OnMMEvent (T eventType) |
|
| bool | SubjectToGravityPoints = true |
| | If this is true, this Character's gravity will be overridden when close to Gravity Points.
|
| bool | SubjectToGravityZones = true |
| | If this is true, this Character will have its gravity affected when crossing Gravity Zones.
|
| bool | ReverseHorizontalInputWhenUpsideDown = false |
| | if this is true, horizontal movement input will be reversed when upside down
|
| bool | ReverseVerticalInputWhenUpsideDown = false |
| | if this is true, vertical movement input will be reversed when upside down
|
| bool | ReverseInputOnGravityPoints = false |
| | if this is false, input won't be reversed while on a gravity point (you'll usually want to keep it false so you can run around the point
|
| float | InitialGravityAngle = 0f |
| | the initial gravity angle, that's the gravity angle your character will start at
|
| float | RotationSpeed = 0f |
| | the speed at which the Character rotates to match its new gravity's rotation. 0 means instant.
|
| float | InactiveBufferDuration = 0.1f |
| | the duration (in seconds) during which a zone is ignored when entered/exited, right after the enter/exit, to accomodate for rotation times. If you have a slow rotation speed, increase this.
|
| TransitionForcesModes | TransitionForcesMode = TransitionForcesModes.Reset |
| | if this is set to true, forces will be reset when entering/exiting gravity zones.
|
| bool | ResetCharacterStateOnGravityChange = true |
| | if this is true, the character state will be reset to idle when entering the zone
|
| bool | DrawDebugGravityArrow = true |
| | If this is true, will draw an arrow showing the current target gravity direction.
|
| MMFeedbacks | AbilityStartFeedbacks |
| | the feedbacks to play when the ability starts
|
| MMFeedbacks | AbilityStopFeedbacks |
| | the feedbacks to play when the ability stops
|
| 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
|
| 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.
|
| 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.
|
| 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.
|
|
| override void | Initialization () |
| | On Initialization, we rotate our character to match the initial gravity angle and store it.
|
| virtual void | CleanGravityZones () |
| | Safety measures to make sure we aren't applying the wrong gravity at any given time.
|
| virtual void | ComputeGravityPoints () |
| | Finds the closest gravity point and changes the gravity if needed.
|
| virtual GravityPoint | GetClosestGravityPoint () |
| | Gets the closest gravity point out of all the ones stored in the GravityPoints array.
|
| virtual void | UpdateGravity () |
| | Rotates the Character to match the current target gravity angle.
|
| virtual void | OnTriggerEnter2D (Collider2D collider) |
| | When entering a zone, checks if it's a Gravity Zone, and if yes, sets gravity accordingly.
|
| virtual void | OnTriggerExit2D (Collider2D collider) |
| | When exiting a zone, checks if it was a Gravity Zone, and if yes, resets gravity accordingly.
|
| virtual void | SetGravityZone (GravityZone gravityZone) |
| | Sets the specified gravity zone as the current one, applying its gravity properties to our character.
|
| virtual void | ExitGravityZone (GravityZone gravityZone) |
| | When exiting a gravity zone we reset our gravity and handle transition.
|
| virtual void | StartRotating () |
| | Triggers the need to rotate the character.
|
| virtual void | Transition (bool entering, Vector2 gravityDirection) |
| | Handles the existing forces on a character when entering/exiting a zone.
|
| override void | OnRespawn () |
| | This gets called when the player dies.
|
| virtual void | DrawGravityDebug () |
| | If authorized to, draws a debug arrow showing the direction of the current target gravity.
|
| override void | OnEnable () |
| | On enable we start listening for events.
|
| virtual void | OnDestroy () |
| | On disable we stop listening for events.
|
| virtual void | Start () |
| | On Start(), we call the ability's intialization.
|
| virtual void | InitializeAnimatorParameters () |
| | Adds required animator parameters to the animator parameters list if they exist.
|
| virtual void | InternalHandleInput () |
| | Internal method to check if an input manager is present or not.
|
| virtual void | HandleInput () |
| | Called at the very start of the ability's cycle, and intended to be overridden, looks for input and calls methods if conditions are met.
|
| virtual void | OnDeath () |
| | Override this to describe what should happen to this ability when the character respawns.
|
| virtual void | OnHit () |
| | Override this to describe what should happen to this ability when the character takes a hit.
|
| virtual void | OnDisable () |
| | On disable, we unbind our respawn delegate.
|
Add this class to a character and it'll be able to have a different gravity than the default one, and will be able to change it via Gravity Zones and Gravity Points Animator parameters : none.