PlayerStates.js 386 B

1234567891011121314151617181920212223
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. },
  5. onLoad () {
  6. this.state = 0;
  7. this.stateTag = {
  8. defalt: -1,
  9. idle: 0,
  10. run1: 1,
  11. run2: 2,
  12. run3: 3,
  13. };
  14. this.speed = 0;
  15. this.dtSpeed = 0.5;
  16. this.dtDownSpeed = 0.1;
  17. this.lastPucnTime = 0;
  18. },
  19. });