fun: fade that sucker out and don't collide

This commit is contained in:
cha0s 2019-06-06 00:21:11 -05:00
parent ad290f6e6a
commit e602c4dfe5

View File

@ -40,10 +40,23 @@ export function rockProjectileJSON() {
0.5, 0.5,
], ],
); );
const setIsNotColliding = buildTraversal(
['entity', 'isColliding'],
false,
);
const setIsNotDamaging = buildTraversal( const setIsNotDamaging = buildTraversal(
['entity', 'isDamaging'], ['entity', 'isDamaging'],
false, false,
); );
const fadeOut = buildInvoke(
['entity', 'transition'],
[
{
opacity: 0,
},
0.2,
],
);
const reflect = buildInvoke( const reflect = buildInvoke(
['entity', 'moveFor'], ['entity', 'moveFor'],
[ [
@ -54,7 +67,19 @@ export function rockProjectileJSON() {
buildTraversal(['obstacle', 'position']), buildTraversal(['obstacle', 'position']),
], ],
), ),
0.05, 0.2,
],
);
const afterImpact = buildInvoke(
['global', 'parallel'],
[
{
type: 'actions',
traversals: [
fadeOut,
reflect,
],
},
], ],
); );
// Destroy. // Destroy.
@ -87,8 +112,9 @@ export function rockProjectileJSON() {
routine: { routine: {
type: 'actions', type: 'actions',
traversals: [ traversals: [
setIsNotColliding,
setIsNotDamaging, setIsNotDamaging,
reflect, afterImpact,
destroy, destroy,
], ],
}, },