Player HUD should now be ok, color of health still shit tho
This commit is contained in:
@@ -23,26 +23,29 @@ void AbilityCooldownHUDSystem::Update(double dt)
|
||||
|
||||
if (!abilityEntity.Valid()) {
|
||||
//If we dont have a shield ability, we return, since we cannot do anything.
|
||||
if (entity.HasComponent("Sprite")) {
|
||||
(std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures/Test/aM4ME4GR.png";
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
//If we have a shield ability, we set the right icon
|
||||
abilityName = "ShieldAbility";
|
||||
if (entity.HasComponent("Sprite")) {
|
||||
(std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures\\Icons\\Abilities\\SheildDots-01.png";
|
||||
(std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures/Icons/Abilities/Long/SheildDots-01.png";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//If we do have a sprint ability, we change the icon
|
||||
abilityName = "SprintAbility";
|
||||
if (entity.HasComponent("Sprite")) {
|
||||
(std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures\\Icons\\Abilities\\Dash-01.png";
|
||||
(std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures/Icons/Abilities/Long/Dash-01.png";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//If we have a dash ability, we set the icon to the correct one.
|
||||
abilityName = "DashAbility";
|
||||
if (entity.HasComponent("Sprite")) {
|
||||
(std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures\\Icons\\Abilities\\Superman-01.png";
|
||||
(std::string&)entity["Sprite"]["DiffuseTexture"] = "Textures/Icons/Abilities/Long/Superman-01.png";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,12 +66,12 @@ void AbilityCooldownHUDSystem::Update(double dt)
|
||||
}
|
||||
|
||||
if (abilityName == "ShieldAbility") {
|
||||
maxAbilityCD = 0.0;
|
||||
maxAbilityCD = 1.0;
|
||||
currentAbilityCD = 1 - (bool)abilityEntity[abilityName]["Active"];
|
||||
}
|
||||
|
||||
if (abilityName == "SprintAbility") {
|
||||
maxAbilityCD = 0.0;
|
||||
maxAbilityCD = 1.0;
|
||||
currentAbilityCD = 1 - (bool)abilityEntity[abilityName]["Active"];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user