-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08b869d
commit a264122
Showing
8 changed files
with
135 additions
and
37 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
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,52 @@ | ||
// vendors | ||
import { Group, Object3D, Vector3 } from 'three'; | ||
// local | ||
import { | ||
ElementName, | ||
createArchGroup, | ||
createWall, | ||
createWallDoor, | ||
positionOnGrid, | ||
} from './levels.utils'; | ||
import { InteractiveArea } from '../elements/InteractiveArea'; | ||
import { Levels, ProjectionLevelState } from '../GameState'; | ||
|
||
export class ProjectionLevel extends Group { | ||
public collidingElements: Object3D[] = []; | ||
public interactiveElements: any[] = []; | ||
public name = 'projection-level'; | ||
|
||
public startPosition = { | ||
light: new Vector3(10, 20, 0), // start level | ||
shadow: new Vector3(200, 20, 0), | ||
}; | ||
|
||
public state: ProjectionLevelState = { | ||
id: Levels.LEARN_TO_FLY, | ||
end_level: [], | ||
}; | ||
|
||
constructor() { | ||
super(); | ||
const wallBlockingLeftPath = createWall( | ||
new Vector3(4, 2, 0), | ||
new Vector3(-2, 0, 2), | ||
new Vector3(0, 90, 0), | ||
); | ||
this.add(wallBlockingLeftPath); | ||
this.collidingElements.push(wallBlockingLeftPath); | ||
|
||
const arches = [ | ||
createArchGroup(1, new Vector3(4, 0, 0)), | ||
createArchGroup(3, new Vector3(5, 0, 0)), | ||
createArchGroup(2, new Vector3(2, 0, 0)), | ||
createArchGroup(3, new Vector3(10, 0, 0)), | ||
]; | ||
|
||
arches.forEach((arch) => { | ||
this.add(arch); | ||
// TODO: Add only the platform to the list of colliding elements | ||
this.collidingElements.push(arch); | ||
}); | ||
} | ||
} |
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,2 +1,3 @@ | ||
export * from './levels.utils'; | ||
export * from './PositionLevel'; | ||
export * from './ProjectionLevel'; |
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