redbluegames / unity-text-typer

Text typing effect for Unity uGUI Text components
MIT License
307 stars 28 forks source link

Cleanup TypedTextGenerator by doing more operations on SymbolLists #8

Open edwardrowe opened 7 years ago

edwardrowe commented 7 years ago

We could break the symbol list into two lists - one for visible and one for hidden text. Instead of doing operations on text, we should do operations on the symbol lists.

For example: RemoveFirstOccurance(string, text) uses a string operation to take out tags. We could instead just remove it from the symbol list.

So we build the two strings entirely from symbol lists, then just do a ToString() on each SymbolList.

SymbolList should probably be made into a class.

This is all just to make the code a bit cleaner.