feat: update player position

This commit is contained in:
Renge 2022-04-17 20:23:54 -04:00
parent 1a05c73f8e
commit 5520e91336

View File

@ -263,6 +263,11 @@ export default class GameLevel extends Scene {
//check position of player //check position of player
this.playerFalloff(viewportCenter, baseViewportSize); this.playerFalloff(viewportCenter, baseViewportSize);
// Update player safe position
if (this.player.onGround) {
this.playerSpawn = this.player.position.clone();
}
//TODO - this is for testing //TODO - this is for testing
if(InputWrapper.isSpawnJustPressed()){ if(InputWrapper.isSpawnJustPressed()){
console.log("trying to spawn enemy"); console.log("trying to spawn enemy");