fun: fade that sucker out and don't collide
This commit is contained in:
parent
ad290f6e6a
commit
e602c4dfe5
|
@ -40,10 +40,23 @@ export function rockProjectileJSON() {
|
|||
0.5,
|
||||
],
|
||||
);
|
||||
const setIsNotColliding = buildTraversal(
|
||||
['entity', 'isColliding'],
|
||||
false,
|
||||
);
|
||||
const setIsNotDamaging = buildTraversal(
|
||||
['entity', 'isDamaging'],
|
||||
false,
|
||||
);
|
||||
const fadeOut = buildInvoke(
|
||||
['entity', 'transition'],
|
||||
[
|
||||
{
|
||||
opacity: 0,
|
||||
},
|
||||
0.2,
|
||||
],
|
||||
);
|
||||
const reflect = buildInvoke(
|
||||
['entity', 'moveFor'],
|
||||
[
|
||||
|
@ -54,7 +67,19 @@ export function rockProjectileJSON() {
|
|||
buildTraversal(['obstacle', 'position']),
|
||||
],
|
||||
),
|
||||
0.05,
|
||||
0.2,
|
||||
],
|
||||
);
|
||||
const afterImpact = buildInvoke(
|
||||
['global', 'parallel'],
|
||||
[
|
||||
{
|
||||
type: 'actions',
|
||||
traversals: [
|
||||
fadeOut,
|
||||
reflect,
|
||||
],
|
||||
},
|
||||
],
|
||||
);
|
||||
// Destroy.
|
||||
|
@ -87,8 +112,9 @@ export function rockProjectileJSON() {
|
|||
routine: {
|
||||
type: 'actions',
|
||||
traversals: [
|
||||
setIsNotColliding,
|
||||
setIsNotDamaging,
|
||||
reflect,
|
||||
afterImpact,
|
||||
destroy,
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user