You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`__wurst_forFields` invokes the callback once for every non-static instance field. The callback receives the
899
+
field name and current value and must produce a statement. `__wurst_mapFields` invokes a reader callback and
900
+
assigns its result back to each field. Leave the two callback parameter types inferred; overload the reader or
901
+
writer for the field types used by the state class.
902
+
903
+
These are compile-time transformations, not runtime reflection, and generate equivalent direct accesses in both
904
+
Jass and Lua. Keep serializable state in a small class with mutable instance fields and keep the persistence
905
+
codec separate from the rest of the game logic. See the [Save and Load tutorial](/tutorials/saveload.html) for
906
+
integration with Warcraft III's file API.
907
+
881
908
### Array Members
882
909
883
910
Wurstscript supports sized arrays as classmembers by translating it to SIZE times arrays and then resolve the array in a get/set function via binary search.
0 commit comments