Corregido un bug con las colisiones entre un punto y una linea diagonal

This commit is contained in:
2022-09-14 21:18:50 +02:00
parent 2ff12f7db1
commit d5e5d142a4
10 changed files with 97 additions and 25 deletions

View File

@@ -45,6 +45,13 @@ void Debug::render()
x += w * text->getCharacterSize() + 2;
}
}
y = 0;
for (auto l : log)
{
text->writeColored(x, y, l, {255, 255, 255});
y += text->getCharacterSize() + 1;
}
}
// Establece la posición donde se colocará la información de debug
@@ -66,6 +73,18 @@ void Debug::clear()
slot.clear();
}
// Añade un texto para mostrar en el apartado log
void Debug::addToLog(std::string text)
{
log.push_back(text);
}
// Borra la información de debug del apartado log
void Debug::clearLog()
{
log.clear();
}
// Establece el valor de la variable
void Debug::setEnabled(bool value)
{