Creando contenido. Los items ya pillan el color desde el archivo de mapa

This commit is contained in:
2022-09-20 20:45:08 +02:00
parent 13046d5dcf
commit e7cc5b49ea
23 changed files with 514 additions and 177 deletions

View File

@@ -16,11 +16,16 @@ Item::Item(item_t item)
// Inicia variables
sprite->setSpriteClip((item.tile % 10) * 8, (item.tile / 10) * 8, 8, 8);
collider = sprite->getRect();
colorChangeSpeed = 4;
colorChangeSpeed = 8;
counter = item.counter * colorChangeSpeed;
// Inicializa los colores
color_t c = stringToColor("blue");
color_t c = item.color1;
color.push_back(c);
c = item.color2;
color.push_back(c);
/*color_t c = stringToColor("blue");
color.push_back(c);
c = stringToColor("red");
@@ -36,7 +41,7 @@ Item::Item(item_t item)
color.push_back(c);
c = stringToColor("yellow");
color.push_back(c);
color.push_back(c);*/
}
// Destructor