Skip to main content
7 events
when toggle format what by license comment
Mar 4, 2015 at 22:07 comment added dimitris93 @ckzilla or you would have an additional dictionary<string, object> where the key to the dictionary would be the variable name and the result dictionary[key] would give you the variables type, so that you can know each variable's type. so you would store that there to know each variables type
Mar 4, 2015 at 21:57 comment added dimitris93 @ckzilla I misunderstood your comment, if you wanted to add another variable to the tower, that would be pretty tricky to do. i guess you would have to keep a list of objects instead of variables and then cast the variables you have on your text into string/int/float, etc so you would have to specify the variable type and value as well in the .txt. and then you would reference those variables like variablesList(0) would be the damage, etc, but that seems like a strange thing to want to do.
Mar 4, 2015 at 21:37 comment added ckzilla This sounds like a good scalable solution. I had a question though if you had a solution for it. Would it be possible to control almost all the parameters like damage, range, health or even add new ones dynamically controlled from a file as you said a text file. For eg: Say if the designers wanted to add a new type of variable to the Tower say wealth or a completely new type of Tower say Tower D. Instead of coming back and hard coding the new changes, would there be a better way to do this?
Mar 4, 2015 at 21:28 vote accept ckzilla
Mar 4, 2015 at 20:06 history edited dimitris93 CC BY-SA 3.0
added 115 characters in body
Mar 4, 2015 at 19:56 history edited dimitris93 CC BY-SA 3.0
deleted 7 characters in body
Mar 4, 2015 at 19:50 history answered dimitris93 CC BY-SA 3.0