PathManager.js 937 B

1234567891011121314151617181920212223242526272829303132333435
  1. class PathManager {
  2. constructor() {
  3. E(this, "currentArea", "");
  4. E(this, "currentPathName", "");
  5. E(this, "currentAttitude", "");
  6. E(this, "speed", 0)
  7. }
  8. getSpeed(e) {
  9. const t = {
  10. guangchang: {
  11. [MotionType.Walk]: 17,
  12. [MotionType.Run]: 51
  13. },
  14. tower: {
  15. [MotionType.Walk]: 12.5,
  16. [MotionType.Run]: 25
  17. },
  18. zhiboting: {
  19. [MotionType.Walk]: 12.5,
  20. [MotionType.Run]: 25
  21. },
  22. youxiting: {
  23. [MotionType.Walk]: 12.5,
  24. [MotionType.Run]: 25
  25. },
  26. diqing: {
  27. [MotionType.Walk]: 12.5,
  28. [MotionType.Run]: 25
  29. }
  30. }
  31. , r = t[this.currentArea] || t.guangchang;
  32. return this.speed = r[e] * 30,
  33. this.speed
  34. }
  35. }