-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is when u gain a new power up in your hand. To QA this go to `/test` There is the match layout new the top and a button add power up. If you look in the hud, then press add power up. - The number of power ups increase. - The background of the hud flashes white. - A plus one number appears, near the lightning icon. i.e lighting icon x2. This number slides up - A new power up appears, it grows from small to large. Related work items: #19520
- Loading branch information
1 parent
d546fbb
commit 4e9fa78
Showing
14 changed files
with
323 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export const POWER_UPS_IN_VIEW = 5; | ||
|
||
export const powerUp = { | ||
xxs: "clamp(10px, 1.04vw + 0px, 40px)", | ||
xs: "0.5vh", | ||
sm: "1.57vw", | ||
md: "2vw", | ||
lg: "3.63vh", | ||
xl: "4.5vh", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useEffect, useRef } from "react"; | ||
|
||
/** | ||
* This hook is used to check if the component/page has already been mounted. | ||
* It is used when you only want an effect to happen after the component is already mounted. | ||
*/ | ||
|
||
export const useIsMounted = () => { | ||
const isMountRef = useRef(true); | ||
|
||
useEffect(() => { | ||
isMountRef.current = false; | ||
}, []); | ||
|
||
return isMountRef.current; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { useEffect, useState } from "react"; | ||
import { NOTIFICATION_VISIBILITY_TIME } from "../constants"; | ||
|
||
/** | ||
* This hook is used to in conjunction with a timer to return a true value after the timer amount has passed. | ||
* Its initial value is false and will return true once the timer has run out. | ||
*/ | ||
|
||
export const useUpdateValue = () => { | ||
const [show, setShow] = useState(false); | ||
useEffect(() => { | ||
const timeout = setTimeout(() => { | ||
setShow(true); | ||
}, NOTIFICATION_VISIBILITY_TIME); | ||
|
||
return () => clearTimeout(timeout); | ||
}, [show]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.