Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.BasicAttacksWithAutoFire Class Reference

Simple extension to basic attacks which checks for button HELD instead of button down. More...

Inheritance diagram for PlatformerPro.BasicAttacksWithAutoFire:
PlatformerPro.BasicAttacks PlatformerPro.Movement

Protected Member Functions

override bool CheckInput (BasicAttackData attackData)
 Is the input correct for the given attack. This implmenetation is simple a key press, but another could be more complex (queueable combo attacks, or complex key combinations). More...
 
- Protected Member Functions inherited from PlatformerPro.BasicAttacks
virtual void PostInit ()
 Init this instance. More...
 
virtual bool CheckLocation (BasicAttackData attackData)
 Is the character in the right place for the given attack. More...
 
virtual bool CheckAmmo (BasicAttackData attackData)
 Checks that the player has enough ammo to fire. More...
 
virtual bool CheckConditions ()
 Checks any additional conditions. More...
 
virtual void ConsumeAmmo (BasicAttackData attackData)
 Consumes ammo. More...
 
virtual void StartAttack (int attackIndex)
 Starts the given attack. More...
 
virtual IEnumerator DoAttack (int attackIndex)
 Do a melee attack. More...
 
virtual IEnumerator DoAnimationSyncedAttack (int attackIndex)
 Do a melee attack with length controlled by the animation. More...
 
virtual void DoAttackStart (int attackIndex)
 Start an attack. More...
 
virtual void DoAttackEnd (int attackIndex)
 Finish an attack. More...
 
virtual IEnumerator DoProjectileAttack (int attackIndex)
 Do a projectile attack. More...
 
virtual void DoPrepare (Projectile projectile, int index)
 Prepares a projectile ready for firing. More...
 
- Protected Member Functions inherited from PlatformerPro.Movement
void AssignReferences (Character character)
 Initialise this movement and return a reference to the ready to use movement. More...
 

Properties

new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
- Properties inherited from PlatformerPro.BasicAttacks
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
virtual bool IsAttacking [get]
 Gets a value indicating whether this instance is attacking. More...
 
virtual string ActiveAttackName [get]
 Gets the name of the active attack or null if no attack is aactive. More...
 
virtual float ActiveAttackNormalisedTime [get]
 Gets the normalised time of the active attack or -1 if no attack is aactive. More...
 
Animator AttackAnimator [get, set]
 Animator used for calculating attack time. More...
 
int AttackAnimatorLayer [get, set]
 Layer to use for attack animations. More...
 
virtual AttackLocation ActiveAttackLocation [get]
 Gets the active attack location or ANY if no activeattack. More...
 
virtual bool ActiveAttackHasHit [get]
 Returns true if the current attacks hit box has hit an enemy. More...
 
virtual bool CanHaveMultipleAttacks [get]
 Used by the inspector to determine if a given attack can have multiple attacks defined in it. More...
 
virtual bool CanUserSetAttackType [get]
 Used by the inspector to determine if a given attack can have multiple attacks defined in it. More...
 
virtual float Charge [get]
 Gets the cahrge amount. More...
 
override AnimationState AnimationState [get]
 Gets the animation state that this movement wants to set. More...
 
override int AnimationPriority [get]
 Gets the priority of the animation state that this movement wants to set. More...
 
override string OverrideState [get]
 Gets the animation override state that this movement wants to set. More...
 
override bool ShouldApplyGravity [get]
 Gets a value indicating whether this PlatformerPro.Movement expects gravity to be applied after its movement finishes. More...
 
- Properties inherited from PlatformerPro.Movement
virtual Character Character [get]
 Sets the character for this movement. More...
 
virtual bool Enabled [get, set]
 A custom enable which base movements can use to pass on enable values. More...
 
virtual Movement Implementation [get]
 Gets the underlying implementation (if not overridden return itself). More...
 
virtual bool ShouldApplyGravity [get]
 Gets a value indicating whether this PlatformerPro.Movement expects gravity to be applied after its movement finishes. More...
 
virtual float CurrentGravity [get]
 Gets a value indicating the current gravity, only used if this movement doesn't apply the default gravity.

See also
ShouldApplyGravity()
More...
 
virtual RaycastType ShouldDoBaseCollisions [get]
 Gets a value indicating whether this PlatformerPro.Movement expects the base collisions to be executed after its movement finishes. More...
 
virtual bool ShouldDoRotations [get]
 Gets a value indicating whether this PlatformerPro.Movement expects the rotations to be calculated and applied by the character. More...
 
virtual AnimationState AnimationState [get]
 Gets the animation state that this movement wants to set. More...
 
virtual string OverrideState [get]
 Gets the animation override state that this movement wants to set. More...
 
virtual int AnimationPriority [get]
 Gets the priority of the animation state that this movement wants to set. More...
 
virtual int FacingDirection [get]
 Returns the direction the character is facing. 0 for none, 1 for right, -1 for left. More...
 
virtual bool PreventXVelocityReset [get]
 If true then don't allow base collisions to reset velocity in X. More...
 
static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
virtual VelocityType VelocityType [get]
 How does this movement use Velocity. More...
 

Additional Inherited Members

- Public Member Functions inherited from PlatformerPro.BasicAttacks
override Movement Init (Character character)
 Initialise this movement and retyrn a reference to the ready to use movement. More...
 
virtual float GetRawChargeForAttack (int index)
 Gets the charge level for a given attack (by index). Returns -1 if not charging. Does not process through the digital charge filters if present. More...
 
virtual float GetChargeForAttack (int index)
 Gets the charge level for a given attack (by index). Returns -1 if not charging. More...
 
virtual int GetIndexForName (string name)
 Gets the index of the givne atack in the attack data or -1 if no match found. More...
 
virtual bool WantsAttack ()
 Gets a value indicating whether this movement wants to initiate an attack. More...
 
virtual bool WantsToSetAnimationState ()
 Gets a value indicating whether this movement wants to set the animation state. More...
 
virtual bool Attack ()
 Do whichever attack is available. More...
 
virtual void InterruptAttack ()
 Forces an attack to stop More...
 
virtual void HitEnemy (IMob enemy, DamageInfo info)
 Called when the character hits an enemy. More...
 
virtual float GetAttackCoolDown (int attackIndex)
 Gets the cool down time for an attack. More...
 
virtual float GetAttackCoolDownRemaining (int attackIndex)
 Gets the remaining cool down time for an attack. More...
 
virtual void EnableHitBox ()
 Enable the current attacks hit box immediately. Usually used when using animation events to enable hitboxes. More...
 
virtual void DisableHitBox ()
 Disable the current attacks hit box immediately. Usually used when using animation events to enable hitboxes. More...
 
virtual void InstantiateProjectile ()
 Instantiates the deferred projectile. More...
 
virtual void InstantiateProjectile (int attackIndex)
 Instatiates a projectile. More...
 
virtual void FirePreparedProjectile ()
 Fired a previously prepared projectile. More...
 
virtual int GetAttackDamage (BasicAttackData data)
 Gets the attack damage including modifiers More...
 
virtual float GetAttackTime (BasicAttackData data)
 Gets the attack time including modifiers More...
 
virtual float GetAttackTime (float baseTime)
 
override bool ForceMaintainControl ()
 If the attack is in progress force control. More...
 
virtual bool BlockJump ()
 Should we block jumping movement? More...
 
virtual bool BlockWall ()
 Should we block wall movement? More...
 
virtual bool BlockClimb ()
 Should we block climb movement? More...
 
virtual bool BlockSpecial ()
 Should we block climb movement? More...
 
- Public Member Functions inherited from PlatformerPro.Movement
virtual Movement Init (Character character, MovementVariable[] movementData)
 Initialise the movement with the given movement data. More...
 
virtual string PostInitValidation ()
 Called after initialisation to check if this movement is configured correctly. Typically used to stop wrapper movements being the default and ending up in infinite loops. More...
 
virtual void DoMove ()
 Moves the character. More...
 
virtual void PostCollisionDoMove ()
 Does any movement that MUST be done after collissions are calculated. More...
 
virtual bool CheckAdditionalConditions ()
 If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't. More...
 
virtual void ConditionsActivated ()
 Call activated on each condition. More...
 
virtual void GainControl ()
 Called when the movement gets control. Typically used to do initialisation of velocity and the like. More...
 
virtual void LosingControl ()
 Called when the movement loses control. Override to do any reset type actions. More...
 
virtual bool IsGrounded ()
 Determines whether this character is grounded. Only applied if ShouldDoBaseCollisions returned false this frame. Else the IsGrounded() method from the base collisions will be used. More...
 
- Static Public Member Functions inherited from PlatformerPro.Movement
static bool CheckSideCollisions (Character character, int requiredHits, RaycastType types)
 Utility method which checks for side collissions. More...
 
- Public Attributes inherited from PlatformerPro.BasicAttacks
List< BasicAttackDataattacks
 The attack data. More...
 
bool attackSystemWantsMovementControl
 Does the attack also override movement. If false then the attack system will not control movement and animations handling will depend on attackSystemWantsAnimationStateOverride. More...
 
bool attackSystemWantsAnimationStateOverride
 Does the attack override animation. If false then the attack system will only set an animation override not an animation state. More...
 
- Public Attributes inherited from PlatformerPro.Movement
bool skipEquipmentMultipliers
 If true don't apply equipment multipliers to this movement. More...
 
bool skipUpgradeMultipliers
 If true don't apply upgrade multipliers to this movement. More...
 
bool skipPowerUpMultipliers
 If true don't apply power-up multipliers to this movement. More...
 
- Protected Attributes inherited from PlatformerPro.BasicAttacks
int currentAttack
 Index of the current attack or -1 if no current attack. More...
 
float currentAttackTimer
 The timer for the current attack. More...
 
ProjectileAimer projectileAimer
 Cached reference to a projectile aimer, or null if there is no aimer. More...
 
int deferredAttackIndex
 The index of the deferred attack. More...
 
ItemManager itemManager
 Cached reference to the item manager used for ammo. More...
 
float[] cooldownTimers
 The cooldown timers. More...
 
float[] chargeTimers
 The charge timers. More...
 
Projectile preparedProjectile
 Cached projectile ready to be fired by animation event. More...
 
Vector2 preparedDirection
 Cached direction ready to be used when projectile fired by animation event. More...
 
int preparedAttackData
 Cached attack data index ready to be used when projectile fired by animation event. More...
 
bool attackAnimationStarted
 Tracks if the state named for the current attacks animation has started playing in the animator. More...
 
- Protected Attributes inherited from PlatformerPro.Movement
Character character
 Cached reference to the character. More...
 
AdditionalCondition[] conditions
 Cached list of all additional conditions. More...
 

Detailed Description

Simple extension to basic attacks which checks for button HELD instead of button down.

Member Function Documentation

◆ CheckInput()

override bool PlatformerPro.BasicAttacksWithAutoFire.CheckInput ( BasicAttackData  attackData)
protectedvirtual

Is the input correct for the given attack. This implmenetation is simple a key press, but another could be more complex (queueable combo attacks, or complex key combinations).

Returns
true, if input was checked, false otherwise.
Parameters
attackDataAttack data.

Reimplemented from PlatformerPro.BasicAttacks.

Property Documentation

◆ Info

new static MovementInfo PlatformerPro.BasicAttacksWithAutoFire.Info
staticget

Static movement info used by the editor.


The documentation for this class was generated from the following file: