Skip to content

Commit

Permalink
Merge pull request #130 from casonpollak/main
Browse files Browse the repository at this point in the history
Finishing greece level
  • Loading branch information
Parallaxes authored Feb 27, 2025
2 parents 8a10fb7 + 268de8a commit 7851171
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/js/platformer/GameSetterQuidditch.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const assets = {

{ name: 'harry', id: 'player', class: PlayerQuidditch, data: assets.players.harry },
{ name: 'tube', id: 'finishline', class: FinishLine, data: assets.obstacles.tube, xPercentage: 0.85, yPercentage: 0.855 },
{ name: 'tubeU', id: 'minifinishline', class: FinishLine, data: assets.obstacles.tubeU, xPercentage: 0.69, yPercentage: 0.9 },
/// { name: 'tubeU', id: 'minifinishline', class: FinishLine, data: assets.obstacles.tubeU, xPercentage: 0.69, yPercentage: 0.9 },
{ name: 'waterEnd', id: 'background', class: BackgroundTransitions, data: assets.transitions.waterEnd },

];
Expand Down
6 changes: 4 additions & 2 deletions assets/js/platformer/PlayerGreece.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ export class PlayerGreece extends PlayerBase {
this.state.movement.right = true;
}
break;
case "finishline":
if(this.collisionData.touchPoints.this.other.id && GameEnv.hasFlag.length == 1){
case "flyingIsland":
//When the flying island is touched whilst the player has the flag, it transitions to the next level
if(this.collisionData.touchPoints.this.top && GameEnv.hasFlag.length == 1){
const index = GameEnv.levels.findIndex(level => level.tag === "Quidditch");
GameControl.transitionToLevel(GameEnv.levels[index]);
break;
}
console.log("finish line checks")
console.log(GameEnv.gameObjects)
Expand Down

0 comments on commit 7851171

Please # to comment.