Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
Topic closed
public void saveLevel(string fileName)
{
string text = "";
foreach(block b in blocks.Values)
{
if (b.fg != 0)
{
text += "0,"+b.x+","+b.y+","+b.fg+"|";
}
if (b.bg != 0)
{
text += "1," + b.x + "," + b.y + "," + b.fg+"|";
}
}
using (StreamWriter sw = new StreamWriter(Environment.CurrentDirectory + @"\Levels\" + fileName + ".txt"))
{
sw.Write(text);
}
}
Why is it that when I save a world with this code all bg blocks get a layer of 0?
Offline
Shouldn't text += "1," + b.x + "," + b.y + "," + b.fg+"|";
Be, b.bg?
Offline
Offline
Offline
Pages: 1
Topic closed
[ Started around 1732393909.3499 - Generated in 0.038 seconds, 14 queries executed - Memory usage: 1.39 MiB (Peak: 1.5 MiB) ]