Skip to content

Commit

Permalink
feat(leftCorridor): add last pc game
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Sep 7, 2023
1 parent d58b7a3 commit dff1492
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/rooms/leftCorridor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { circleOfVectors } from 'arx-level-generator/utils'
import { MathUtils } from 'three'
import { GameDisplay } from '@/entities/GameDisplay.js'
import { Mirror } from '@/entities/Mirror.js'
import { PCGameVariant, pcGameVariants } from '@/entities/PCGame.js'
import { PCGame, PCGameVariant, pcGameVariants } from '@/entities/PCGame.js'
import { RoomContents } from '@/types.js'

export const createLeftCorridor = async (
Expand Down Expand Up @@ -109,9 +109,22 @@ export const createLeftCorridor = async (
})
})

const game = new PCGame({
variant: gameVariant,
position: new Vector3(-2660, 0, 340),
orientation: new Rotation(
MathUtils.degToRad(-90) + 7 * angle + theta,
MathUtils.degToRad(180),
MathUtils.degToRad(-90),
),
})
game.script?.on('inventoryin', () => {
return `sendevent player_found_a_game ${gameStateManager.ref} ${game.variant}`
})

return {
meshes: [...bases],
entities: [rootMirror, mirror, ...Object.values(gameDisplays)],
entities: [rootMirror, mirror, ...Object.values(gameDisplays), game],
lights: [],
zones: [],
_: {},
Expand Down

0 comments on commit dff1492

Please sign in to comment.