GameStates.js 837 B

123456789101112131415161718192021222324252627282930313233343536
  1. let gameConfig = require("GameConfig");
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. topHole: {
  6. default: null,
  7. type: cc.Node,
  8. serializable: true,
  9. },
  10. leftHole: {
  11. default: null,
  12. type: cc.Node,
  13. serializable: true,
  14. },
  15. rightHole: {
  16. default: null,
  17. type: cc.Node,
  18. serializable: true,
  19. },
  20. },
  21. onLoad () {
  22. this.currentTime = gameConfig.roundTime;
  23. this.currentLv = 0;
  24. //progress
  25. this.default=0;
  26. this.playing=1;
  27. this.finished=2;
  28. this.curretState = this.default;
  29. this.appearMouseArr = [];
  30. this.hiddenMouseArr = [this.topHole,this.leftHole,this.rightHole];
  31. this.playerScore = [0,0];
  32. },
  33. });