fix: kitties
This commit is contained in:
parent
19ec755e67
commit
3c2bf6d6a9
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"frameRate": 0.3,
|
||||
"frameRate": 0.12,
|
||||
"frameCount": 3,
|
||||
"frameSize": [16, 16],
|
||||
"directionCount": 4,
|
||||
|
|
|
@ -45,9 +45,14 @@ const behaviorInvoke = (path, args) => {
|
|||
|
||||
// Behaviors!
|
||||
const move = behaviorInvoke(['entity', 'moveFor'], [
|
||||
behaviorInvoke(['global', 'randomNumber'], [0.25, 1, false])
|
||||
behaviorInvoke(['global', 'randomNumber'], [0.25, 2.5, false])
|
||||
]);
|
||||
|
||||
const stopAnimating = behaviorTraversal(
|
||||
['entity', 'isAnimating'],
|
||||
false
|
||||
);
|
||||
|
||||
const firstWait = behaviorInvoke(['global', 'wait'], [
|
||||
behaviorInvoke(['global', 'randomNumber'], [1, 4, false])
|
||||
]);
|
||||
|
@ -61,6 +66,10 @@ const secondWait = behaviorInvoke(['global', 'wait'], [
|
|||
behaviorInvoke(['global', 'randomNumber'], [0.5, 3, false])
|
||||
]);
|
||||
|
||||
const startAnimating = behaviorTraversal(
|
||||
['entity', 'isAnimating'],
|
||||
true
|
||||
);
|
||||
|
||||
// A fire.
|
||||
function fireJSON(position) {
|
||||
|
@ -206,9 +215,11 @@ function kittyJSON(position) {
|
|||
type: 'actions',
|
||||
traversals: [
|
||||
move,
|
||||
stopAnimating,
|
||||
firstWait,
|
||||
turn,
|
||||
secondWait,
|
||||
startAnimating,
|
||||
],
|
||||
}
|
||||
},
|
||||
|
@ -297,16 +308,12 @@ function mamaKittyJSON(position) {
|
|||
maxLife: 5000,
|
||||
};
|
||||
traits.animated.params.animations.idle.offset = [0, -8];
|
||||
traits.behaved.params.routines.routines.initial.routine.traversals = [
|
||||
move,
|
||||
firstWait,
|
||||
turn,
|
||||
traits.behaved.params.routines.routines.initial.routine.traversals.push(...[
|
||||
storeJSON,
|
||||
setJSONX,
|
||||
setJSONY,
|
||||
spawn,
|
||||
secondWait,
|
||||
];
|
||||
]);
|
||||
traits.visible.state.visibleScale = [2, 2];
|
||||
traits.shaped.params.shape.size = [16, 8];
|
||||
traits.spawner = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user