Why is CreatureType a String instead of an enum?
agluszak opened this issue · 1 comments
agluszak commented
evoli/src/components/creatures.rs
Line 18 in 2e3b159
Why is CreatureType defined to be a String instead of an enum? An enum would be more typesafe. As far as I can see, it's only used for an enum-like comparison here:
Line 105 in 2e3b159
sunreef commented
The reason for this is that this way we can keep adding more creatures without modifying the code at all.
All you need is to define a prefab with a Named
component.