|
|
|
@ -67,7 +67,7 @@ void Wizard::OnUpdate(float fElapsedTime){ |
|
|
|
|
bool Wizard::AutoAttack(){ |
|
|
|
|
attack_cooldown_timer=MAGIC_ATTACK_COOLDOWN; |
|
|
|
|
float angleToCursor=atan2(game->GetWorldMousePos().y-GetPos().y,game->GetWorldMousePos().x-GetPos().x); |
|
|
|
|
BULLET_LIST.push_back(std::make_unique<EnergyBolt>(EnergyBolt(GetPos(),{cos(angleToCursor)*"Wizard.Auto Attack.Speed"_F,sin(angleToCursor)*"Wizard.Auto Attack.Speed"_F},"Wizard.Auto Attack.Radius"_F/100*12,GetAttack(),upperLevel,true,WHITE))); |
|
|
|
|
BULLET_LIST.push_back(std::make_unique<EnergyBolt>(EnergyBolt(GetPos(),{cos(angleToCursor)*"Wizard.Auto Attack.Speed"_F,sin(angleToCursor)*"Wizard.Auto Attack.Speed"_F},"Wizard.Auto Attack.Radius"_F/100*12,GetAttack()*"Wizard.Auto Attack.DamageMult"_F,upperLevel,true,WHITE))); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
void Wizard::InitializeClassAbilities(){ |
|
|
|
@ -104,7 +104,7 @@ void Wizard::InitializeClassAbilities(){ |
|
|
|
|
Wizard::ability1.action= |
|
|
|
|
[](Player*p,vf2d pos={}){ |
|
|
|
|
float angleToCursor=atan2(game->GetWorldMousePos().y-p->GetPos().y,game->GetWorldMousePos().x-p->GetPos().x); |
|
|
|
|
BULLET_LIST.push_back(std::make_unique<FireBolt>(FireBolt(p->GetPos(),{cos(angleToCursor)*275,sin(angleToCursor)*275},12,p->GetAttack(),p->upperLevel,true,{240,120,60}))); |
|
|
|
|
BULLET_LIST.push_back(std::make_unique<FireBolt>(FireBolt(p->GetPos(),{cos(angleToCursor)*"Wizard.Ability 1.BulletSpeed"_F,sin(angleToCursor)*"Wizard.Ability 1.BulletSpeed"_F},"Wizard.Ability 1.Radius"_F/100*12,p->GetAttack()*"Wizard.Ability 1.InitialDamageMult"_F,p->upperLevel,true,"Wizard.Ability 1.BulletColor"_Pixel))); |
|
|
|
|
return true; |
|
|
|
|
}; |
|
|
|
|
#pragma endregion |
|
|
|
@ -112,7 +112,7 @@ void Wizard::InitializeClassAbilities(){ |
|
|
|
|
Wizard::ability2.action= |
|
|
|
|
[](Player*p,vf2d pos={}){ |
|
|
|
|
float angleToCursor=atan2(game->GetWorldMousePos().y-p->GetPos().y,game->GetWorldMousePos().x-p->GetPos().x); |
|
|
|
|
BULLET_LIST.push_back(std::make_unique<LightningBolt>(LightningBolt(p->GetPos(),{cos(angleToCursor)*230,sin(angleToCursor)*230},12,p->GetAttack()*4,p->upperLevel,true,WHITE))); |
|
|
|
|
BULLET_LIST.push_back(std::make_unique<LightningBolt>(LightningBolt(p->GetPos(),{cos(angleToCursor)*"Wizard.Ability 2.BulletSpeed"_F,sin(angleToCursor)*"Wizard.Ability 2.BulletSpeed"_F},"Wizard.Ability 2.Radius"_F/100*12,p->GetAttack()*"Wizard.Ability 2.DamageMult"_F,p->upperLevel,true,"Wizard.Ability 2.BulletColor"_Pixel))); |
|
|
|
|
return true; |
|
|
|
|
}; |
|
|
|
|
#pragma endregion |
|
|
|
|