annotations
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
annotations [2021/12/09 10:44] – maxime | annotations [2021/12/10 11:33] – maxime | ||
---|---|---|---|
Line 27: | Line 27: | ||
} | } | ||
}) | }) | ||
+ | </ | ||
+ | |||
+ | === Lazy-init === | ||
+ | |||
+ | By default, components are always initialized (call of '' | ||
+ | |||
+ | <code lua> | ||
+ | local standardComp = nil | ||
+ | local lazyInitComp = nil | ||
+ | |||
+ | level: | ||
+ | standardComp = _newObject: | ||
+ | standardComp: | ||
+ | | ||
+ | lazyInitComp = _newObject: | ||
+ | lazyInitComp: | ||
+ | end) | ||
+ | -- at the end of createObject, | ||
+ | |||
+ | -- when enabling lazyInitComp, | ||
+ | lazyInitComp: | ||
</ | </ | ||
annotations.txt · Last modified: 2022/08/16 10:56 by maxime