nighthawkcoders / game_levels_mp

Engineering game repository
Apache License 2.0
1 stars 13 forks source link

Fixed Goomba and player collision and also added a bounce #124

Open GavinCopley opened 6 months ago

GavinCopley commented 6 months ago

Fixed Goomba and player collision and added a bounce when Mario touches the top of the goomba

Files Changed Fixed Goomba Collision With Mario Added Bounce When Mario Lands on Goomba
GameEnv.js - Added variable "invincible"
- Added variable "goombaInvincible"
- Added variable 'goombaBounce'
Player.js - Remade collision detection with goomba
- Now uses goombaCollision function when referencing Mario death
- Has function that subtracts 125 from
y when variable is true
Goomba.js - Makes Mario invincible after goomba dies to allow time for
animation to play
- When Goomba is stepped on, changes
variable to true
Other - Commented out many 'console.log's in various files
- Added Goomba changes to FlyingGoomba.js