Rewrote targetPreview for pulsation effect

This commit is contained in:
aronmal 2023-01-09 01:13:10 +01:00
parent 948a6deb4b
commit e803832812
Signed by: aronmal
GPG key ID: 816B7707426FC612
5 changed files with 67 additions and 55 deletions

View file

@ -35,19 +35,23 @@ export const hitReducer = (formObject: HitType[], action: HitDispatchType) => {
return formObject;
}
}
export const initlialLastLeftTile = {
x: 0,
y: 0
};
export const initlialTarget = {
show: false,
x: 2,
y: 2
};
export const initlialTargetPreview = {
newX: 0,
newY: 0,
shouldShow: false,
appearOK: false,
eventReady: true,
show: false,
x: 2,
y: 2
};
export const initlialTargetPreviewPos = {
shouldShow: false,
x: 0,
y: 0
};
export const isHit = (hits: HitType[], x: number, y: number) => hits.filter(h => h.x === x && h.y === y);