From deb90c26ba9861cc49e0ee70cb04b52625947cfe Mon Sep 17 00:00:00 2001 From: OfficialCHenry Date: Wed, 6 Apr 2022 21:59:18 -0400 Subject: [PATCH] Increased Gravity --- src/shattered_sword/Player/PlayerController.ts | 2 +- src/shattered_sword/Player/PlayerStates/OnGround.ts | 2 +- src/shattered_sword/Player/PlayerStates/PlayerState.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shattered_sword/Player/PlayerController.ts b/src/shattered_sword/Player/PlayerController.ts index 0d88073..1660505 100644 --- a/src/shattered_sword/Player/PlayerController.ts +++ b/src/shattered_sword/Player/PlayerController.ts @@ -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); } } \ No newline at end of file diff --git a/src/shattered_sword/Player/PlayerStates/OnGround.ts b/src/shattered_sword/Player/PlayerStates/OnGround.ts index f421dd8..c789576 100644 --- a/src/shattered_sword/Player/PlayerStates/OnGround.ts +++ b/src/shattered_sword/Player/PlayerStates/OnGround.ts @@ -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"); diff --git a/src/shattered_sword/Player/PlayerStates/PlayerState.ts b/src/shattered_sword/Player/PlayerStates/PlayerState.ts index cf46c36..04e9197 100644 --- a/src/shattered_sword/Player/PlayerStates/PlayerState.ts +++ b/src/shattered_sword/Player/PlayerStates/PlayerState.ts @@ -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;