GameStates.js 719 B

123456789101112131415161718192021222324252627282930313233
  1. var gameConfig = require("./GameConfig.js");
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. },
  6. onLoad () {
  7. this.init();
  8. },
  9. init()
  10. {
  11. this.gameMode = this.node.parent.getComponent('GameMode');
  12. this.gameTime = 0;
  13. this.currentHandrailIndex = 0;
  14. this.currentHandrailIndexInLevel = 0;
  15. this.currentHandrailPositionLevel = 0;
  16. this.lastHandrailPosition = 0;
  17. this.drawedhandrailArr = [];
  18. this.handrailGCArr = [];
  19. //startLinePositionX
  20. this.startLinePX = this.gameMode.starting.x;
  21. //arrivedEndPlayerArray
  22. this.arrEndPArr = [];
  23. //Mgobe
  24. // this.playerId = '';
  25. }
  26. });