RuleRandom
ldtk.rules.RuleRandom (Class)
Deterministic, target independent random helpers for the rule engine.
All arithmetic is done in 32 bits (haxe.Int32) so that JS, C++, C# and every other target produce the same values.
Static Members
Seeded random for a x/y coord. Result range: [0, max) for max>0, always 0 for max<=0.
| Name | Type |
|---|---|
seed |
Int |
x |
Int |
y |
Int |
max |
Int |
| Returns |
|---|
| Int |
Derive a per-layer random seed from a level root seed
| Name | Type |
|---|---|
rootSeed |
Int |
layerDefUid |
Int |
| Returns |
|---|
| Int |