Skip to content

Commit

Permalink
forgot to change game machine to zero-to-mastery#6
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianCheung1 committed Oct 6, 2024
1 parent 4a6a0d5 commit 3785c44
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/interactions/map_arcade/game_machine_6.interactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { scaleFactor } from '../../constants';
import { displayDialogue } from '../../utils';

export const interactionWithGameMachine6 = (player, k, map) => {
player.onCollide('game_machine_2', () => {
player.onCollide('game_machine_6', () => {
player.isInDialog = true;
// Trigger the custom prompt when the player collides with the game machine
showCustomPrompt(
Expand Down Expand Up @@ -91,7 +91,7 @@ function startChromeDinoGame(k) {
const FLOOR_HEIGHT = 48;
const JUMP_FORCE = 800;
const SPEED = 480;
const GRAVITY = 1600
const GRAVITY = 1600;

// Set up the game scene
k.scene('dinoGame', () => {
Expand Down Expand Up @@ -185,12 +185,16 @@ function startChromeDinoGame(k) {
]);

// go back to game with space is pressed
k.onKeyPress('space', () => import('../../scenes/arcade').then((_) => {
k.go('arcade');
}));
k.onClick(() => import('../../scenes/arcade').then((_) => {
k.go('arcade');
}));
k.onKeyPress('space', () =>
import('../../scenes/arcade').then((_) => {
k.go('arcade');
})
);
k.onClick(() =>
import('../../scenes/arcade').then((_) => {
k.go('arcade');
})
);
k.setGravity(0);
});

Expand Down

0 comments on commit 3785c44

Please sign in to comment.