refactor: targeting ghost
This commit is contained in:
parent
30caab6c9e
commit
93cb69e99a
|
@ -71,16 +71,16 @@ export default function Ecs({camera, monopolizers, particleWorker, scale}) {
|
|||
y={position.y}
|
||||
/>
|
||||
)}
|
||||
<Entities
|
||||
monopolizers={monopolizers}
|
||||
particleWorker={particleWorker}
|
||||
/>
|
||||
{projected?.length > 0 && layers[0] && (
|
||||
<TargetingGhost
|
||||
projected={projected}
|
||||
tileLayer={layers[0]}
|
||||
/>
|
||||
)}
|
||||
<Entities
|
||||
monopolizers={monopolizers}
|
||||
particleWorker={particleWorker}
|
||||
/>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ import {PixiComponent} from '@pixi/react';
|
|||
|
||||
import {useRadians} from '@/react/context/radians.js';
|
||||
|
||||
import {deferredLighting} from './lights.js';
|
||||
|
||||
const tileSize = {x: 16, y: 16};
|
||||
|
||||
const TargetingGhostInternal = PixiComponent('TargetingGhost', {
|
||||
|
@ -25,6 +27,7 @@ const TargetingGhostInternal = PixiComponent('TargetingGhost', {
|
|||
const container = new Container();
|
||||
container.alpha = 0.4;
|
||||
container.addChild(target, targetInner);
|
||||
container.parentGroup = deferredLighting.diffuseGroup;
|
||||
return container;
|
||||
},
|
||||
applyProps: (container, oldProps, {x, y, radians}) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user