refactor: randomNumber

This commit is contained in:
cha0s 2019-11-03 10:42:48 -06:00
parent 2cf1030dfc
commit 308131449d

View File

@ -9,7 +9,7 @@ export function kittyJSON() {
buildTraversal(['entity', 'direction']),
],
),
buildInvoke(['Math', 'randomNumber'], [0.25, 2.5, false]),
buildInvoke(['Math', 'randomNumber'], [0.25, 2.5]),
]);
const stopAnimating = buildTraversal(
@ -18,16 +18,21 @@ export function kittyJSON() {
);
const firstWait = buildInvoke(['Timing', 'wait'], [
buildInvoke(['Math', 'randomNumber'], [1, 4, false])
buildInvoke(['Math', 'randomNumber'], [1, 4])
]);
const turn = buildTraversal(
['entity', 'direction'],
buildInvoke(['Math', 'randomNumber'], [0, 3])
buildInvoke(
['Math', 'floor'],
[
buildInvoke(['Math', 'randomNumber'], [0, 4])
]
),
);
const secondWait = buildInvoke(['Timing', 'wait'], [
buildInvoke(['Math', 'randomNumber'], [0.5, 3, false])
buildInvoke(['Math', 'randomNumber'], [0.5, 3])
]);
const startAnimating = buildTraversal(