Skip to content

Commit

Permalink
Merge branch 'main' into VeErA
Browse files Browse the repository at this point in the history
  • Loading branch information
Parallaxes authored Mar 4, 2025
2 parents 82df2de + 9c55562 commit 8c55031
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 16 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
10 changes: 6 additions & 4 deletions assets/js/platformer/GameSetterSkibidi.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ const assets = {
},
escaper: {
src: "/images/platformer/sprites/skibidiMan.png",
width: 54,
height: 60,
width: 53,
height: 61,
scaleSize: 110,
speedRatio: 0.9,
animationSpeed: 5.5, // How fast it goes through displaying each frame in specified row below:
idle: {row: 0, frames: 4 }, // idle animation
idle: {row: 3, frames: 4 }, // idle animation
walk: { row: 1, frames: 6 }, // walking animation
run: { row: 2, frames: 6}, // running animation
jump: {row: 4, frames: 6 }, // jumping animation
Expand Down Expand Up @@ -509,7 +509,9 @@ const assets = {
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.6, yPercentage: 0.71 } ,
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.14, yPercentage: 0.84 },
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.7, yPercentage: 0.84 },
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.3, yPercentage: 0.4 },
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.4, yPercentage: 0.4 },
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.36, yPercentage: 0.4 },
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.38, yPercentage: 0.4 },
///{ name: 'coin', id: 'coin', class: Coin, data: assets.obstacles.vbucks, xPercentage: 0.475, yPercentage: 0.5 },
// { name: 'itemBlock2', id: 'jumpPlatform', class: JumpPlatform2, data: assets.platforms.itemBlock2, xPercentage: 0.56, yPercentage: 0.8 }, //item block is a platform
//{ name: 'itemBlock2', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.itemBlock2, xPercentage: 0.56, yPercentage: 0.8 }, //item block is a platform
Expand Down
5 changes: 3 additions & 2 deletions assets/js/platformer/PlayerGreece.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ export class PlayerGreece extends PlayerBase {
}
break;
case "flyingIsland":
if(this.collisionData.touchPoints.this.top && GameEnv.hasFlag.length === 1){
//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
break;
}
// console.log("finish line checks")
// console.log(GameEnv.gameObjects)
Expand Down
28 changes: 20 additions & 8 deletions assets/js/platformer/PlayerSkibidi.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,28 @@ export class PlayerSkibidi extends PlayerBaseOneD {
GameEnv.playerAttack = false;
break;
case 'b':
this.state.animation = 'attack'; // Always trigger attack when b is pressed
GameEnv.playerAttack = true;
break;
default:
this.state.animation = 'idle';
GameEnv.playerAttack = false;
break;
}
// Trigger attack once per key press, no holding allowed
if (!this.state.isAttacking) { // Check if player isn't already attacking
this.state.animation = 'attack'; // Set the animation to attack
GameEnv.playerAttack = true; // Set player attack state to true
this.state.isAttacking = true; // Set the player as attacking

// Reset the attack state after the animation ends (set it to 500ms for now)
setTimeout(() => {
this.state.isAttacking = false;
GameEnv.playerAttack = false;
}, 500); // 500ms delay for one attack per key tap (adjust timing based on animation)
}
break;
default:
this.state.animation = 'idle';
GameEnv.playerAttack = false;
break;
}
}



/**
* @override
* gameloop: Handles additional Player reaction / state updates to the collision for game level
Expand Down
2 changes: 1 addition & 1 deletion assets/js/platformer/SkibidiTitan.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class skibidiTitan extends Character {

hpLoss() {
if (GameEnv.playerAttack && !this.state.isDead) {
this.currentHp -= 1;
this.currentHp -= 2.5;
}
}

Expand Down
Binary file added images/platformer/sprites/beta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/platformer/sprites/luffy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8c55031

Please # to comment.