index.ts 562 字节
Newer Older
6
UPDATE  
622eda98dfef6c4fdb84ccca 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
export enum Mode {
  walking = 'walking',
  sprinting = 'sprinting',
  flying = 'flying',
  sprintFlying = 'sprintFlying',
  sneaking = 'sneaking'
}

export enum Speed {
  // walking = 4.317,
  walking = 5.612,
  sprinting = 5.612,
  // flying = 10.89,
  flying = 21.78,
  sprintFlying = 21.78,
  sneaking = 1.95
}
export default class Player {
  mode = Mode.walking
  speed = Speed[this.mode]

  setMode(Mode: Mode) {
    this.mode = Mode
    this.speed = Speed[this.mode]
  }
  falling = 38.4

  jump = 1.2522

  body = {
    height: 1.8,
    width: 0.5
  }
}