Add energy bolt splash effect and fade out.

This commit is contained in:
2023-07-05 05:34:21 -05:00
parent 8c34640e52
commit ba6bc74f1f
11 changed files with 95 additions and 35 deletions
+2 -2
View File
@@ -147,7 +147,7 @@ bool Warrior::Ability3(){
p.UpdateAnimation(AnimationState::WARRIOR_SWINGSONICSWORD_S);
}break;
}
PLAYER_BULLET_LIST.push_back(std::make_unique<Bullet>(p.pos,bulletVel,30,p.GetAttack()*8,AnimationState::SONICSLASH,true,2.25,true));
PLAYER_BULLET_LIST.push_back(std::make_unique<Bullet>(p.pos,bulletVel,30,p.GetAttack()*8,AnimationState::SONICSLASH,true,2.25,true,true,WHITE));
game->SetupWorldShake(0.5);
return true;
}
@@ -283,7 +283,7 @@ bool Wizard::AutoAttack(){
ACCESS_PLAYER
p.attack_cooldown_timer=p.MAGIC_ATTACK_COOLDOWN;
float angleToCursor=atan2(game->GetWorldMousePos().y-p.pos.y,game->GetWorldMousePos().x-p.pos.x);
PLAYER_BULLET_LIST.push_back(std::make_unique<EnergyBolt>(EnergyBolt(p.pos,{cos(angleToCursor)*200,sin(angleToCursor)*200},12,p.GetAttack())));
PLAYER_BULLET_LIST.push_back(std::make_unique<EnergyBolt>(EnergyBolt(p.pos,{cos(angleToCursor)*200,sin(angleToCursor)*200},12,p.GetAttack(),true,WHITE)));
return true;
}