Add this class to a character so it can use weapons Note that this component will trigger animations (if their parameter is present in the Animator), based on the current weapon's Animations Animator parameters : defined from the Weapon's inspector
More...
|
override void | HandleInput () |
| Gets input and triggers methods based on what's been pressed More...
|
|
Protected Member Functions inherited from MoreMountains.TopDownEngine.CharacterHandleWeapon |
override void | PreInitialization () |
| Sets the weapon attachment More...
|
|
override void | Initialization () |
| Gets and stores components for further use More...
|
|
virtual void | HandleCharacterState () |
| Checks character state and stops shooting if not in normal state More...
|
|
virtual void | HandleFeedbacks () |
| Triggers the weapon used feedback if needed More...
|
|
override void | HandleInput () |
| Gets input and triggers methods based on what's been pressed More...
|
|
virtual void | HandleBuffer () |
| Triggers an attack if the weapon is idle and an input has been buffered More...
|
|
virtual void | ExtendBuffer () |
| Extends the duration of the buffer if needed More...
|
|
virtual void | InstantiateWeapon (Weapon newWeapon, string weaponID, bool combo=false) |
| Instantiates the specified weapon More...
|
|
virtual void | HandleWeaponAim () |
| Applies aim if possible More...
|
|
virtual void | HandleWeaponIK () |
| Sets IK handles if needed More...
|
|
virtual void | HandleWeaponModel (Weapon newWeapon, string weaponID, bool combo=false, Weapon weapon=null) |
|
override void | InitializeAnimatorParameters () |
| Adds required animator parameters to the animator parameters list if they exist More...
|
|
override void | OnHit () |
| Override this to describe what should happen to this ability when the character takes a hit More...
|
|
override void | OnDeath () |
| Override this to describe what should happen to this ability when the character respawns More...
|
|
override void | OnRespawn () |
| Override this to describe what should happen to this ability when the character respawns More...
|
|
virtual void | Awake () |
| On awake we proceed to pre initializing our ability More...
|
|
virtual void | Start () |
| On Start(), we call the ability's intialization More...
|
|
virtual void | BindAnimator () |
| Binds the animator from the character and initializes the animator parameters More...
|
|
virtual void | InternalHandleInput () |
| Internal method to check if an input manager is present or not More...
|
|
virtual void | RegisterAnimatorParameter (string parameterName, AnimatorControllerParameterType parameterType, out int parameter) |
| Registers a new animator parameter to the list More...
|
|
virtual void | OnEnable () |
| On enable, we bind our respawn delegate More...
|
|
virtual void | OnDisable () |
| On disable, we unbind our respawn delegate More...
|
|
|
Public Member Functions inherited from MoreMountains.TopDownEngine.CharacterHandleWeapon |
override string | HelpBoxText () |
| This method is only used to display a helpbox text at the beginning of the ability's inspector. More...
|
|
delegate void | OnWeaponChangeDelegate () |
|
virtual void | Setup () |
| Grabs various components and inits stuff More...
|
|
override void | ProcessAbility () |
| Every frame we check if it's needed to update the ammo display More...
|
|
virtual void | ShootStart () |
| Causes the character to start shooting More...
|
|
virtual void | ShootStop () |
| Causes the character to stop shooting More...
|
|
virtual void | ForceStop () |
| Forces the weapon to stop More...
|
|
virtual void | Reload () |
| Reloads the weapon More...
|
|
virtual void | ChangeWeapon (Weapon newWeapon, string weaponID, bool combo=false) |
| Changes the character's current weapon to the one passed as a parameter More...
|
|
override void | Flip () |
| Flips the current weapon if needed More...
|
|
virtual void | UpdateAmmoDisplay () |
| Updates the ammo display bar and text. More...
|
|
override 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...
|
|
delegate void | AbilityEvent () |
|
virtual void | ForceInitialization () |
| Call this any time you want to force this ability to initialize (again) 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 | LateProcessAbility () |
| The last of the 3 passes you can have in your ability. Think of it as LateUpdate() More...
|
|
virtual void | PermitAbility (bool abilityPermitted) |
| Changes the status of the ability's permission 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 | SetInputManager (InputManager newInputManager) |
| Changes the reference to the input manager with the one set in parameters More...
|
|
virtual void | PlayAbilityStartSfx () |
| Plays the ability start sound effect More...
|
|
virtual void | PlayAbilityUsedSfx () |
| Plays the ability used sound effect More...
|
|
virtual void | StopAbilityUsedSfx () |
| Stops the ability used sound effect More...
|
|
virtual void | PlayAbilityStopSfx () |
| Plays the ability stop sound effect 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...
|
|
Public Attributes inherited from MoreMountains.TopDownEngine.CharacterHandleWeapon |
Weapon | InitialWeapon |
| the initial weapon owned by the character More...
|
|
bool | CanPickupWeapons = true |
| if this is set to true, the character can pick up PickableWeapons More...
|
|
MMFeedbacks | WeaponUseFeedback |
| a feedback that gets triggered at the character level everytime the weapon is used More...
|
|
Transform | WeaponAttachment |
| the position the weapon will be attached to. If left blank, will be this.transform. More...
|
|
Transform | ProjectileSpawn |
| the position from which projectiles will be spawned (can be safely left empty) More...
|
|
bool | AutomaticallyBindAnimator = true |
| if this is true this animator will be automatically bound to the weapon More...
|
|
int | AmmoDisplayID = 0 |
| the ID of the AmmoDisplay this ability should update More...
|
|
bool | AutoIK = true |
| if this is true, IK will be automatically setup if possible More...
|
|
bool | ContinuousPress = false |
| if this is true you won't have to release your fire button to auto reload More...
|
|
bool | GettingHitInterruptsAttack = false |
| whether or not this character getting hit should interrupt its attack (will only work if the weapon is marked as interruptable) More...
|
|
bool | UseSecondaryAxisThresholdToShoot = false |
| whether or not pushing the secondary axis above its threshold should cause the weapon to shoot More...
|
|
bool | ForceWeaponAimControl = false |
| if this is true, the ForcedWeaponAimControl mode will be applied to all weapons equipped by this character More...
|
|
WeaponAim.AimControls | ForcedWeaponAimControl = WeaponAim.AimControls.PrimaryMovement |
| if ForceWeaponAimControl is true, the AimControls mode to apply to all weapons equipped by this character More...
|
|
bool | ForceAlwaysShoot = false |
| if this is true, the character will continuously fire its weapon More...
|
|
bool | BufferInput |
| whether or not attack input should be buffered, letting you prepare an attack while another is being performed, making it easier to chain them More...
|
|
bool | NewInputExtendsBuffer |
| if this is true, every new input will prolong the buffer More...
|
|
float | MaximumBufferDuration = 0.25f |
| the maximum duration for the buffer, in seconds More...
|
|
bool | RequiresPerfectTile = false |
| if this is true, and if this character is using GridMovement, then input will only be triggered when on a perfect tile More...
|
|
Weapon | CurrentWeapon |
| the weapon currently equipped by the Character More...
|
|
OnWeaponChangeDelegate | OnWeaponChange |
| a delegate you can hook to, to be notified of weapon changes More...
|
|
AudioClip | AbilityStartSfx |
| the sound fx to play when the ability starts More...
|
|
AudioClip | AbilityInProgressSfx |
| the sound fx to play while the ability is running More...
|
|
AudioClip | AbilityStopSfx |
| the sound fx to play when the ability stops More...
|
|
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...
|
|
AbilityEvent | OnAbilityStart |
|
AbilityEvent | OnAbilityStop |
|
Protected Attributes inherited from MoreMountains.TopDownEngine.CharacterHandleWeapon |
float | _fireTimer = 0f |
|
float | _secondaryHorizontalMovement |
|
float | _secondaryVerticalMovement |
|
WeaponAim | _weaponAim |
|
ProjectileWeapon | _projectileWeapon |
|
WeaponIK | _weaponIK |
|
Transform | _leftHandTarget = null |
|
Transform | _rightHandTarget = null |
|
float | _bufferEndsAt = 0f |
|
bool | _buffering = false |
|
int | _weaponEquippedAnimationParameter |
|
int | _weaponEquippedIDAnimationParameter |
|
CharacterGridMovement | _characterGridMovement |
|
List< WeaponModel > | _weaponModels |
|
Character | _character |
|
TopDownController | _controller |
|
TopDownController2D | _controller2D |
|
TopDownController3D | _controller3D |
|
GameObject | _model |
|
Health | _health |
|
CharacterMovement | _characterMovement |
|
InputManager | _inputManager |
|
Animator | _animator = null |
|
CharacterStates | _state |
|
SpriteRenderer | _spriteRenderer |
|
MMStateMachine< CharacterStates.MovementStates > | _movement |
|
MMStateMachine< CharacterStates.CharacterConditions > | _condition |
|
AudioSource | _abilityInProgressSfx |
|
bool | _abilityInitialized = false |
|
float | _verticalInput |
|
float | _horizontalInput |
|
bool | _startFeedbackIsPlaying = false |
|
List< CharacterHandleWeapon > | _handleWeaponList |
|
Static Protected Attributes inherited from MoreMountains.TopDownEngine.CharacterHandleWeapon |
const string | _weaponEquippedAnimationParameterName = "WeaponEquipped" |
|
const string | _weaponEquippedIDAnimationParameterName = "WeaponEquippedID" |
|
Add this class to a character so it can use weapons Note that this component will trigger animations (if their parameter is present in the Animator), based on the current weapon's Animations Animator parameters : defined from the Weapon's inspector