update spirit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { PlayerMotionModel } from './assets/scripts/logic/PlayerMotionModel';
|
||||
import { PlayerColorState, MOVE_SPEED } from './assets/scripts/common/Constants';
|
||||
|
||||
const m = new PlayerMotionModel({
|
||||
aabb: { x: 0, y: 16, w: 16, h: 32 },
|
||||
platforms: [{ topY: 0, leftX: -500, rightX: 500 }],
|
||||
initialColorState: PlayerColorState.Red,
|
||||
levelLengthPx: 2000,
|
||||
});
|
||||
console.log('after constructor: grounded=', m.isGrounded, 'aabb=', m.aabb, 'vx=', m.vx);
|
||||
m.update(0.016);
|
||||
console.log('after settle: grounded=', m.isGrounded, 'aabb=', m.aabb, 'vx=', m.vx, 'vy=', m.vy);
|
||||
m.setHorizontalInput(1);
|
||||
m.update(1);
|
||||
console.log('after move: aabb.x=', m.aabb.x, 'vx=', m.vx);
|
||||
Reference in New Issue
Block a user