Skip to content

Commit

Permalink
Update PlayerGreece to transition to the next level when touching fly…
Browse files Browse the repository at this point in the history
…ing island with flag
  • Loading branch information
casonpollak committed Feb 25, 2025
1 parent 13cb3f1 commit fbdb7d7
Showing 1 changed file with 4 additions and 2 deletions.
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 fbdb7d7

Please # to comment.