Switch to smart pointer implementation for damage numbers to handle damage combo'ing quick attack displays.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "Class.h"
|
||||
#include "Buff.h"
|
||||
#include "Pathfinding.h"
|
||||
#include "DamageNumber.h"
|
||||
|
||||
struct CastInfo{
|
||||
std::string name;
|
||||
@@ -48,6 +49,8 @@ struct Player{
|
||||
std::vector<Buff>buffList;
|
||||
CastInfo castInfo={"",0};
|
||||
vf2d movementVelocity={};//This tells us if the player is moving (mostly controlled by user input) since their velocity is not used for regular movement.
|
||||
float lastHitTimer=0; //When this is greater than zero, if we get hit again it adds to our displayed combo number.
|
||||
std::shared_ptr<DamageNumber>damageNumberPtr;
|
||||
protected:
|
||||
const float ATTACK_COOLDOWN=0.35f;
|
||||
const float MAGIC_ATTACK_COOLDOWN=0.85f;
|
||||
|
||||
Reference in New Issue
Block a user