dev:abstract_elements
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dev:abstract_elements [2014/09/23 19:13] – tsmall1 | dev:abstract_elements [2014/09/23 19:35] (current) – [Create abstract class] tsmall1 | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| We should also not define '' | We should also not define '' | ||
| + | |||
| + | We also cannot define **THE_INSTANCE**, | ||
| We need a behavior method which wanders the same for all children. This looks like: | We need a behavior method which wanders the same for all children. This looks like: | ||
| Line 29: | Line 31: | ||
| MDist< | MDist< | ||
| Dir d = (Dir)rand.Create(Dirs:: | Dir d = (Dir)rand.Create(Dirs:: | ||
| - | u32 maxWanderDist = Dirs:: | ||
| - | | ||
| - | maxWanderDist = MAX(GetWanderDistance(), | ||
| - | Dirs::FillPoint(wanderPt, d); | + | Dirs::FillDir(wanderPt, d); |
| - | wanderPt *= maxWanderDist; | + | wanderPt *= Dirs:: |
| - | if(window.GetRelativeAtom(wanderPt).GetType() == | + | if(window.IsLiveSite(wanderPt)) |
| - | | + | |
| { | { | ||
| - | window.SwapAtoms(wanderPt, | + | |
| + | | ||
| + | { | ||
| + | window.SwapAtoms(wanderPt, | ||
| + | } | ||
| + | } | ||
| } | } | ||
| } | } | ||
dev/abstract_elements.1411499594.txt.gz · Last modified: 2014/09/23 19:13 by tsmall1
