Merge fixes
This commit is contained in:
@@ -24,28 +24,28 @@ 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";
|
||||
(Field<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/Long/SheildDots-01.png";
|
||||
(Field<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/Long/Dash-01.png";
|
||||
(Field<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/Long/Superman-01.png";
|
||||
(Field<std::string>)entity["Sprite"]["DiffuseTexture"] = "Textures/Icons/Abilities/Long/Superman-01.png";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ void AbilityCooldownHUDSystem::Update(double dt)
|
||||
|
||||
if (cooldownTextEntity.Valid()) {
|
||||
if (cooldownTextEntity.HasComponent("Text")) {
|
||||
std::string t = (std::string&)cooldownTextEntity["Text"]["Content"] = std::to_string(currentAbilityCD).substr(0, 3);
|
||||
(Field<std::string>)cooldownTextEntity["Text"]["Content"] = std::to_string(currentAbilityCD).substr(0, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ void AbilityCooldownHUDSystem::Update(double dt)
|
||||
}
|
||||
|
||||
if (entity.HasComponent("Fill")) {
|
||||
entity["Fill"]["Percentage"] = currentAbilityCD/maxAbilityCD;
|
||||
(Field<double>)entity["Fill"]["Percentage"] = currentAbilityCD/maxAbilityCD;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user