sqaueUltl.ts 998 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { _decorator, Component, Node } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. enum LvDir {
  4. Up = 0,
  5. Down = 1,
  6. Left = 2,
  7. Right = 3,
  8. }
  9. enum BlockType {
  10. RED = 1,
  11. BLUE,
  12. GREEN,
  13. YELLOW,
  14. }
  15. @ccclass('sqaueUltl')
  16. export class sqaueUltl {
  17. private static _instance: sqaueUltl = null;
  18. public static readonly MAX_TYPES: number = 4
  19. public static readonly ROW_NUM: number = 10
  20. public static readonly COL_NUM: number = 11
  21. public static readonly BLOCK_WIDTH: number = 62
  22. public static readonly BLOCK_HEIGHT: number = 62
  23. public static readonly gridSize: number = 73; // 网格大小
  24. public static readonly spacing: number = 70; // 方块间距
  25. // 单例模式
  26. public static get instance(): sqaueUltl {
  27. if (!this._instance) {
  28. this._instance = new sqaueUltl();
  29. }
  30. return this._instance;
  31. }
  32. private constructor() {
  33. }
  34. start() {
  35. }
  36. update(deltaTime: number) {
  37. }
  38. }