Sending Damage and Damage Type Together??
So here is my damage system...
[Some character script]
adds dmg amount to [list of dmgs] in [Dmg_handler script]
adds dmg_type to [list of dmg_types] in [Dmg_handler script]
[Dmg_handler script] process all dmgs stacks and after that .Clear() both lists.
usually i think they align perfectly. but large scale of battle i'm afraid they might not... :(
is there a fancy way to send float and string together? like a pair of shoes?
any idea :3 ?
A basic program$$anonymous$$g trick is to combine data for one "thing" into a class or struct. In C#, classes are almost always better. Any Intro to Program$$anonymous$$g book explains this (just in case, my explanation is at taxesforcatses in the struct chapter, but the internet has lots.)
If you read about classes, ignore all the stuff about getters/setters, constructors and so on. Just find the part about about to combine 2+ variables into one thing.
What you have now are called parallel arrays, which were state of the art in 1970. And yes, keeping them lined-up, all the time, is a real problem.