ZY_GameLayer.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. _gamestate: GameState.STATE_STOP,//当前游戏的运行状态
  5. _touchstate: TouchState.TOUCH_TRUE,//触摸状态
  6. score:0, //分数
  7. level:0, //关数
  8. target:0, //目标
  9. hang:0, //行数
  10. stepnumber:0, //步数
  11. _chessInfo: [],//记录棋盘元素的颜色类型
  12. _lastLevelScore: 0,
  13. _selectbox: [],
  14. _eliminatePos: [],//消除
  15. _eliminateNum: 0,
  16. _clicktipvec: [],
  17. _candealwith: true,
  18. _limitproptag: -1,
  19. _clicktiptime: 0,
  20. _selectprop: 0,
  21. _propNode: [],
  22. _propmotion: [],
  23. _proptipsp: [],
  24. _firstsavein:false,
  25. BANER_HEIGHT: 185,//预留Baner位
  26. _guide:false,
  27. _guidenumber:-1,
  28. },
  29. getGameState:function () {
  30. return this._gamestate;
  31. },
  32. setGameState:function (state) {
  33. this._gamestate=state;
  34. },
  35. getTouchState:function () {
  36. return this._touchstate;
  37. },
  38. setTouchState:function (state) {
  39. this._touchstate=state;
  40. },
  41. setScore:function(score){
  42. this.score=score;
  43. },
  44. getScore:function () {
  45. return this.score;
  46. },
  47. setLevel:function(level){
  48. this.level=level;
  49. },
  50. getLevel:function () {
  51. return this.level;
  52. },
  53. setTarget:function (target) {
  54. this.target=target;
  55. },
  56. getTarget:function () {
  57. return this.target;
  58. },
  59. setHang:function (hang) {
  60. this.hang=hang;
  61. },
  62. getHang:function () {
  63. return this.hang;
  64. },
  65. setStepNumber:function (step) {
  66. this.stepnumber=step;
  67. },
  68. getStepNumber:function () {
  69. return this.stepnumber;
  70. },
  71. });