Increased Gravity

This commit is contained in:
OfficialCHenry 2022-04-06 21:59:18 -04:00
parent 1b6bbf8444
commit deb90c26ba
3 changed files with 3 additions and 3 deletions

View File

@ -131,6 +131,6 @@ export default class PlayerController extends StateMachineAI {
} else if(this.currentState instanceof Fall){
Debug.log("playerstate", "Player State: Fall");
}
Debug.log("playerspeed", "x: " + this.velocity.x + ", y:" + this.velocity.y);
}
}

View File

@ -22,7 +22,7 @@ export default class OnGround extends PlayerState {
// If we jump, move to the Jump state, give a burst of upwards velocity
if(Input.isJustPressed("jump")){
this.finished("jump");
this.parent.velocity.y = -500;
this.parent.velocity.y = -600; // basically jump height
} else if(!this.owner.onGround){
this.finished("fall");

View File

@ -11,7 +11,7 @@ import PlayerController from "../PlayerController";
export default abstract class PlayerState extends State {
owner: GameNode;
gravity: number = 1000; //TODO - can change later
gravity: number = 1500; //TODO - can change later
parent: PlayerController;
positionTimer: Timer;