generated from remarkablegames/kaplay-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gameobjects): add tween to reward menu
- Loading branch information
1 parent
261db76
commit 31b4cad
Showing
3 changed files
with
24 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
interface Options { | ||
hidden?: boolean | ||
} | ||
|
||
export function addModal(options?: Options) { | ||
export function addModal() { | ||
const modal = add([ | ||
rect(width(), height()), | ||
color(0, 0, 0), | ||
opacity(0.5), | ||
fixed(), | ||
]) | ||
|
||
if (typeof options?.hidden === 'boolean') { | ||
modal.hidden = options.hidden | ||
} | ||
|
||
return modal | ||
} |
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