Skip to content

Commit 8c55031

Browse files
authored
Merge branch 'main' into VeErA
2 parents 82df2de + 9c55562 commit 8c55031

File tree

7 files changed

+31
-16
lines changed

7 files changed

+31
-16
lines changed

Diff for: assets/js/platformer/GameSetterQuidditch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const assets = {
189189

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

195195
];

Diff for: assets/js/platformer/GameSetterSkibidi.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ const assets = {
180180
},
181181
escaper: {
182182
src: "/images/platformer/sprites/skibidiMan.png",
183-
width: 54,
184-
height: 60,
183+
width: 53,
184+
height: 61,
185185
scaleSize: 110,
186186
speedRatio: 0.9,
187187
animationSpeed: 5.5, // How fast it goes through displaying each frame in specified row below:
188-
idle: {row: 0, frames: 4 }, // idle animation
188+
idle: {row: 3, frames: 4 }, // idle animation
189189
walk: { row: 1, frames: 6 }, // walking animation
190190
run: { row: 2, frames: 6}, // running animation
191191
jump: {row: 4, frames: 6 }, // jumping animation
@@ -509,7 +509,9 @@ const assets = {
509509
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.6, yPercentage: 0.71 } ,
510510
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.14, yPercentage: 0.84 },
511511
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.7, yPercentage: 0.84 },
512-
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.3, yPercentage: 0.4 },
512+
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.4, yPercentage: 0.4 },
513+
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.36, yPercentage: 0.4 },
514+
{ name: 'blocks', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.sand, xPercentage: 0.38, yPercentage: 0.4 },
513515
///{ name: 'coin', id: 'coin', class: Coin, data: assets.obstacles.vbucks, xPercentage: 0.475, yPercentage: 0.5 },
514516
// { name: 'itemBlock2', id: 'jumpPlatform', class: JumpPlatform2, data: assets.platforms.itemBlock2, xPercentage: 0.56, yPercentage: 0.8 }, //item block is a platform
515517
//{ name: 'itemBlock2', id: 'jumpPlatform', class: BlockPlatform, data: assets.platforms.itemBlock2, xPercentage: 0.56, yPercentage: 0.8 }, //item block is a platform

Diff for: assets/js/platformer/PlayerGreece.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@ export class PlayerGreece extends PlayerBase {
105105
}
106106
break;
107107
case "flyingIsland":
108-
if(this.collisionData.touchPoints.this.top && GameEnv.hasFlag.length === 1){
108+
//When the flying island is touched whilst the player has the flag, it transitions to the next level
109+
if(this.collisionData.touchPoints.this.top && GameEnv.hasFlag.length == 1){
109110
const index = GameEnv.levels.findIndex(level => level.tag === "Quidditch");
110111
GameControl.transitionToLevel(GameEnv.levels[index]);
111-
break
112+
break;
112113
}
113114
// console.log("finish line checks")
114115
// console.log(GameEnv.gameObjects)

Diff for: assets/js/platformer/PlayerSkibidi.js

+20-8
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,28 @@ export class PlayerSkibidi extends PlayerBaseOneD {
127127
GameEnv.playerAttack = false;
128128
break;
129129
case 'b':
130-
this.state.animation = 'attack'; // Always trigger attack when b is pressed
131-
GameEnv.playerAttack = true;
132-
break;
133-
default:
134-
this.state.animation = 'idle';
135-
GameEnv.playerAttack = false;
136-
break;
137-
}
130+
// Trigger attack once per key press, no holding allowed
131+
if (!this.state.isAttacking) { // Check if player isn't already attacking
132+
this.state.animation = 'attack'; // Set the animation to attack
133+
GameEnv.playerAttack = true; // Set player attack state to true
134+
this.state.isAttacking = true; // Set the player as attacking
135+
136+
// Reset the attack state after the animation ends (set it to 500ms for now)
137+
setTimeout(() => {
138+
this.state.isAttacking = false;
139+
GameEnv.playerAttack = false;
140+
}, 500); // 500ms delay for one attack per key tap (adjust timing based on animation)
141+
}
142+
break;
143+
default:
144+
this.state.animation = 'idle';
145+
GameEnv.playerAttack = false;
146+
break;
147+
}
138148
}
139149

150+
151+
140152
/**
141153
* @override
142154
* gameloop: Handles additional Player reaction / state updates to the collision for game level

Diff for: assets/js/platformer/SkibidiTitan.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class skibidiTitan extends Character {
4646

4747
hpLoss() {
4848
if (GameEnv.playerAttack && !this.state.isDead) {
49-
this.currentHp -= 1;
49+
this.currentHp -= 2.5;
5050
}
5151
}
5252

Diff for: images/platformer/sprites/beta.png

83.3 KB
Loading

Diff for: images/platformer/sprites/luffy.png

320 KB
Loading

0 commit comments

Comments
 (0)