-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multiple city interactions are added (#77)
Relates to #29
- Loading branch information
Showing
5 changed files
with
164 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { displayPermissionBox } from '../../utils'; | ||
|
||
export const boundaryArcadeInteraction = (player, k) => { | ||
player.onCollide('boundary_arcade', async () => { | ||
|
||
let wantToPlay = await displayPermissionBox( | ||
'Hello! Would you like to play some arcade games?' | ||
); | ||
|
||
|
||
if (wantToPlay) { | ||
import('../../scenes/arcade').then((_) => { | ||
k.go('arcade'); | ||
}); | ||
} else { | ||
k.debug.log('Maybe next time!'); | ||
} | ||
}); | ||
}; |
17 changes: 17 additions & 0 deletions
17
src/interactions/map_city/boundaryBurgerBar.interaction.js
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,17 @@ | ||
import { displayPermissionBox } from '../../utils'; | ||
|
||
export const boundaryBurgerBarInteraction = (player, k) => { | ||
player.onCollide('boundary_burger_bar', async () => { | ||
|
||
let wantBurger = await displayPermissionBox( | ||
'Hello! Would you like a burger?' | ||
); | ||
|
||
|
||
if (wantBurger) { | ||
k.debug.log('Enjoy your burger!'); //testing purposes you may uncomment it or add displayPermission box your wish | ||
} else { | ||
k.debug.log('Maybe next time!'); | ||
} | ||
}); | ||
}; |
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,70 @@ | ||
import { displayPermissionBox } from '../../utils'; | ||
|
||
|
||
export const snackBarGreenInteraction = (player, k) => { | ||
player.onCollide('snack_bar_green', async () => { | ||
let ztmSnackDecision = await displayPermissionBox( | ||
'Welcome to Snack Bar Green! Ready to go from zero to snack mastery?' | ||
); | ||
|
||
if (ztmSnackDecision) { | ||
k.debug.log('Congratulations! You’ve mastered the art of snacking, ZTM style!'); | ||
} else { | ||
let secondSnackChance = await displayPermissionBox( | ||
'Are you sure? The path to snack mastery is only one bite away...' | ||
); | ||
|
||
if (secondSnackChance) { | ||
k.debug.log('Great choice! You’re on your way to becoming a Snack Sensei!'); | ||
} else { | ||
k.debug.log('Looks like you missed the Snack Mastery Bootcamp. Better luck next time!'); | ||
} | ||
} | ||
}); | ||
}; | ||
|
||
|
||
export const snackBarRedInteraction = (player, k) => { | ||
player.onCollide('snack_bar_red', async () => { | ||
let snackOffer = await displayPermissionBox( | ||
'Welcome to Snack Bar Red! The *real* masters of snacking... Unlike *ahem* some green wannabes across the street. Ready for the best snack experience?' | ||
); | ||
|
||
if (snackOffer) { | ||
k.debug.log('Excellent choice! You clearly have superior taste. Snack Bar Green can’t compete!'); | ||
} else { | ||
let changeMind = await displayPermissionBox( | ||
'Are you sure? Don’t tell me you’re thinking of going to *that* green place... Their snacks are... well, let’s just say "unimpressive."' | ||
); | ||
|
||
if (changeMind) { | ||
k.debug.log('Wise move! Snack Bar Red – where the real snack mastery happens!'); | ||
} else { | ||
k.debug.log('Suit yourself! But don’t say I didn’t warn you... Snack Bar Green’s snacks are basically "Zero to Mediocrity."'); | ||
} | ||
} | ||
}); | ||
}; | ||
|
||
|
||
export const snackBarStreetInteraction = (player, k) => { | ||
player.onCollide('snack_bar_street', async () => { | ||
let snackDecision = await displayPermissionBox( | ||
'Psst! You look hungry! How about a snack? It’s a secret recipe!' | ||
); | ||
|
||
if (snackDecision) { | ||
k.debug.log('Yum! You just ate the best mystery snack of your life!'); | ||
} else { | ||
let secondChance = await displayPermissionBox( | ||
'Are you sure? It’s low calorie and totally NOT haunted! Still no?' | ||
); | ||
|
||
if (secondChance) { | ||
k.debug.log('Ah, there we go! Enjoy your... totally normal snack.'); | ||
} else { | ||
k.debug.log('Your loss! The snack of the century is only a bite away...'); | ||
} | ||
} | ||
}); | ||
}; |
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,46 @@ | ||
import { displayPermissionBox } from '../../utils'; | ||
|
||
|
||
export const stall1Interaction = (player, k) => { | ||
player.onCollide('stall_1', async () => { | ||
let stall1Offer = await displayPermissionBox( | ||
'🎉 Welcome to Stall 1! Our secret ingredient is... a sprinkle of **joy**! Ready to snack like a champ?' | ||
); | ||
|
||
if (stall1Offer) { | ||
k.debug.log('🚀 Awesome choice! Here’s your snack – made with love and just a hint of magic!'); | ||
} else { | ||
let secondChance = await displayPermissionBox( | ||
'🤔 Are you absolutely sure? Our snacks are scientifically proven to elevate your happiness levels! Or do you prefer sadness-flavored snacks?' | ||
); | ||
|
||
if (secondChance) { | ||
k.debug.log('😋 Yass! You’re now part of the snack elite! Enjoy your crispy delight!'); | ||
} else { | ||
k.debug.log('😢 Your loss! But hey, who am I to judge? Just remember, you’re missing out on epic flavor adventures!'); | ||
} | ||
} | ||
}); | ||
}; | ||
|
||
export const stall2Interaction = (player, k) => { | ||
player.onCollide('stall_2', async () => { | ||
let stall2Offer = await displayPermissionBox( | ||
'🎊 Ahoy! Welcome to Stall 2! We don’t just sell snacks; we sell **memories**! Care to join the flavor revolution?' | ||
); | ||
|
||
if (stall2Offer) { | ||
k.debug.log('🌈 Fantastic! Here’s a snack that might just change your life! Or at least your lunch!'); | ||
} else { | ||
let secondThoughts = await displayPermissionBox( | ||
'🚫 Wait a minute! Are you really about to miss the chance to munch on greatness? Don’t you want to be a snack legend?' | ||
); | ||
|
||
if (secondThoughts) { | ||
k.debug.log('🌟 You’ve made the right call! Enjoy the epic flavors of Stall 2! Snack on, my friend!'); | ||
} else { | ||
k.debug.log('🤷♂️ Suit yourself! But don’t come crying to me when you realize Stall 1’s snacks are just plain!'); | ||
} | ||
} | ||
}); | ||
}; |