public void addLetter(char c) { if (c == '\\') { escaping = true; } else if (escaping && c == 'n') { // new line! currentLine++; escaping = false; } else if (escaping) { int newEffect = int.Parse (c.ToString ()); switchEffect ((TextEffect)newEffect); escaping = false; } else { TextLetter tl = new TextLetter (c, currentEffect, ra, currentLine); letters.Add (tl); } }
public void addLetter(char c) { if (c == '\\') // next character will be escape { escaping = true; } else if (escaping && c == 'n') { currentLine++; escaping = false; } else if (escaping && c == 'c') // new color! { } else if (escaping) { int newEffect = int.Parse (c.ToString ()); switchEffect ((TextEffect)newEffect); escaping = false; } else { TextLetter tl = new TextLetter (c, currentEffect, letterSize, ra, currentLine); letters.Add (tl); } }