Просмотр исходного кода

Merge branch 'master' of http://git.mokasz.com/zouyong/mk_framework

# Conflicts:
#	mk_framework/assets/resources/game.meta
#	mk_framework/assets/resources/game/uiItem.meta
#	mk_framework/assets/resources/game/uiItem/1.ts
#	mk_framework/assets/resources/game/uiItem/1.ts.meta
#	mk_framework/assets/resources/game/uiPanel.meta
#	mk_framework/assets/resources/game/uiPanel/login.prefab
#	mk_framework/assets/resources/game/uiPanel/login.prefab.meta
#	mk_framework/assets/resources/gamePrefab.meta
#	mk_framework/assets/resources/gamePrefab/uiItem.meta
#	mk_framework/assets/resources/gamePrefab/uiItem/1.ts
#	mk_framework/assets/resources/gamePrefab/uiItem/1.ts.meta
#	mk_framework/assets/resources/gamePrefab/uiPanel.meta
#	mk_framework/assets/resources/module/login/login.prefab
#	mk_framework/assets/resources/module/login/login.prefab.meta
#	mk_framework/assets/resources/prefab.meta
#	mk_framework/assets/resources/prefab/uiItem.meta
#	mk_framework/assets/resources/prefab/uiItem/1.ts
#	mk_framework/assets/resources/prefab/uiItem/1.ts.meta
#	mk_framework/assets/resources/prefab/uiPanel.meta
#	mk_framework/assets/resources/prefab/uiPanel/login.prefab
#	mk_framework/assets/resources/prefab/uiPanel/login.prefab.meta
#	mk_framework/assets/script/Main.ts
zouyong 5 лет назад
Родитель
Сommit
5d61881b4b
34 измененных файлов с 850 добавлено и 497 удалено
  1. 1 1
      mk_framework/assets/resources/game/prefab.meta
  2. 194 0
      mk_framework/assets/resources/game/prefab/game.prefab
  3. 8 0
      mk_framework/assets/resources/game/prefab/game.prefab.meta
  4. 1 1
      mk_framework/assets/resources/game/texture.meta
  5. BIN
      mk_framework/assets/resources/game/texture/icon_circle.png
  6. 36 0
      mk_framework/assets/resources/game/texture/icon_circle.png.meta
  7. 0 28
      mk_framework/assets/resources/game/uiItem/1.ts
  8. 0 392
      mk_framework/assets/resources/game/uiPanel/login.prefab
  9. 207 0
      mk_framework/assets/resources/module/login/login.prefab
  10. 1 1
      mk_framework/assets/resources/module/login/login.prefab.meta
  11. 2 2
      mk_framework/assets/script/Main.ts
  12. 28 0
      mk_framework/assets/script/game/component/BtnOpenPanel.ts
  13. 1 1
      mk_framework/assets/script/game/component/BtnOpenPanel.ts.meta
  14. 69 0
      mk_framework/assets/script/game/component/UIBG.ts
  15. 0 0
      mk_framework/assets/script/game/component/UIBG.ts.meta
  16. 0 37
      mk_framework/assets/script/game/component/UIMask.ts
  17. 7 4
      mk_framework/assets/script/game/component/tween/ClickMoveBy.ts
  18. 4 4
      mk_framework/assets/script/game/component/tween/FrameAnimation.ts
  19. 195 0
      mk_framework/assets/script/game/data/LoginData.ts
  20. 9 0
      mk_framework/assets/script/game/data/LoginData.ts.meta
  21. 1 1
      mk_framework/assets/script/game/data/g.ts
  22. 0 5
      mk_framework/assets/script/game/module/cash/turntable/Tur.meta
  23. 0 12
      mk_framework/assets/script/game/module/common.meta
  24. 1 1
      mk_framework/assets/script/game/module/module.meta
  25. 1 1
      mk_framework/assets/script/game/module/module/login.meta
  26. 26 0
      mk_framework/assets/script/game/module/module/login/Login.ts
  27. 9 0
      mk_framework/assets/script/game/module/module/login/Login.ts.meta
  28. 0 0
      mk_framework/assets/script/game/module/module/sign.meta
  29. 0 0
      mk_framework/assets/script/game/module/module/sign/Sign.ts
  30. 9 0
      mk_framework/assets/script/game/module/module/sign/Sign.ts.meta
  31. 0 0
      mk_framework/assets/script/game/module/module/turntable.meta
  32. 0 0
      mk_framework/assets/script/game/module/module/turntable/Turnable.ts
  33. 9 0
      mk_framework/assets/script/game/module/module/turntable/Turnable.ts.meta
  34. 31 6
      mk_framework/assets/script/mk/system/UISystem.ts

+ 1 - 1
mk_framework/assets/resources/game.meta → mk_framework/assets/resources/game/prefab.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.1.2",
-  "uuid": "c873fa74-25f1-4900-ba54-7971a0652801",
+  "uuid": "2d4ad4b3-9c5b-4375-add3-0ee3cf7676a9",
   "isBundle": false,
   "bundleName": "",
   "priority": 1,

+ 194 - 0
mk_framework/assets/resources/game/prefab/game.prefab

@@ -0,0 +1,194 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "game",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
+    "_active": true,
+    "_components": [],
+    "_prefab": {
+      "__id__": 5
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "背景",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 3
+      }
+    ],
+    "_prefab": {
+      "__id__": 4
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 191,
+      "g": 38,
+      "b": 38,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
+    },
+    "fileId": "c8eI8ckdVLvLyS4s/EGv2d",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd"
+    },
+    "fileId": "",
+    "sync": false
+  }
+]

+ 8 - 0
mk_framework/assets/resources/game/prefab/game.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.9",
+  "uuid": "b4dea4a9-29c8-46bc-a50d-5754afa7a2bd",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 1 - 1
mk_framework/assets/resources/game/uiItem.meta → mk_framework/assets/resources/game/texture.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.1.2",
-  "uuid": "2fdc9c29-4a46-40ba-bba3-61adbae081f9",
+  "uuid": "fd533531-c4f4-4fec-ac8a-be59da1de9b3",
   "isBundle": false,
   "bundleName": "",
   "priority": 1,

BIN
mk_framework/assets/resources/game/texture/icon_circle.png


+ 36 - 0
mk_framework/assets/resources/game/texture/icon_circle.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "a502b798-831b-406b-95af-04a460add5dc",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 84,
+  "height": 84,
+  "platformSettings": {},
+  "subMetas": {
+    "icon_circle": {
+      "ver": "1.0.4",
+      "uuid": "30d93536-d53e-4466-94c1-d2056cca405c",
+      "rawTextureUuid": "a502b798-831b-406b-95af-04a460add5dc",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": -0.5,
+      "trimX": 2,
+      "trimY": 3,
+      "width": 80,
+      "height": 79,
+      "rawWidth": 84,
+      "rawHeight": 84,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 0 - 28
mk_framework/assets/resources/game/uiItem/1.ts

@@ -1,28 +0,0 @@
-// Learn TypeScript:
-//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
-// Learn Attribute:
-//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
-// Learn life-cycle callbacks:
-//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
-
-const {ccclass, property} = cc._decorator;
-
-@ccclass
-export default class NewClass extends cc.Component {
-
-    @property(cc.Label)
-    label: cc.Label = null;
-
-    @property
-    text: string = 'hello';
-
-    // LIFE-CYCLE CALLBACKS:
-
-    // onLoad () {}
-
-    start () {
-
-    }
-
-    // update (dt) {}
-}

+ 0 - 392
mk_framework/assets/resources/game/uiPanel/login.prefab

@@ -1,392 +0,0 @@
-[
-  {
-    "__type__": "cc.Prefab",
-    "_name": "",
-    "_objFlags": 0,
-    "_native": "",
-    "data": {
-      "__id__": 1
-    },
-    "optimizationPolicy": 0,
-    "asyncLoadAssets": false,
-    "readonly": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "load",
-    "_objFlags": 0,
-    "_parent": null,
-    "_children": [
-      {
-        "__id__": 2
-      },
-      {
-        "__id__": 5
-      },
-      {
-        "__id__": 8
-      }
-    ],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 10
-      }
-    ],
-    "_prefab": {
-      "__id__": 11
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 750,
-      "height": 1334
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        0,
-        0,
-        0,
-        0,
-        0,
-        1,
-        1,
-        1,
-        1
-      ]
-    },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_is3DNode": false,
-    "_groupIndex": 0,
-    "groupIndex": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "背景",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 3
-      }
-    ],
-    "_prefab": {
-      "__id__": 4
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 69,
-      "g": 170,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 750,
-      "height": 1334
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        0,
-        0,
-        0,
-        0,
-        0,
-        1,
-        1,
-        1,
-        1
-      ]
-    },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_is3DNode": false,
-    "_groupIndex": 0,
-    "groupIndex": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 2
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
-    },
-    "_type": 0,
-    "_sizeMode": 0,
-    "_fillType": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_atlas": null,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "62252503-89e0-44ba-aeab-bf0baac4f65a"
-    },
-    "fileId": "ceUXPj1chIxJ4EuDVb0+hr",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "bg_main",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 6
-      }
-    ],
-    "_prefab": {
-      "__id__": 7
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 750,
-      "height": 1334
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        0,
-        0,
-        0,
-        0,
-        0,
-        1,
-        1,
-        1,
-        1
-      ]
-    },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_is3DNode": false,
-    "_groupIndex": 0,
-    "groupIndex": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 5
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "0b9148fc-0951-469d-8696-57c6d27ed5b9"
-    },
-    "_type": 0,
-    "_sizeMode": 1,
-    "_fillType": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_atlas": null,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "62252503-89e0-44ba-aeab-bf0baac4f65a"
-    },
-    "fileId": "aetMW6X7JPv4Z6HIRvK41I",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "逻辑",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [],
-    "_prefab": {
-      "__id__": 9
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 0,
-      "height": 0
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        0,
-        0,
-        0,
-        0,
-        0,
-        1,
-        1,
-        1,
-        1
-      ]
-    },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_is3DNode": false,
-    "_groupIndex": 0,
-    "groupIndex": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "62252503-89e0-44ba-aeab-bf0baac4f65a"
-    },
-    "fileId": "efQVwyTkhMY4jCVAZsECCA",
-    "sync": false
-  },
-  {
-    "__type__": "b20adIDCBNOS6FUUweuIhc+",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 1
-    },
-    "_enabled": true,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__uuid__": "62252503-89e0-44ba-aeab-bf0baac4f65a"
-    },
-    "fileId": "",
-    "sync": false
-  }
-]

+ 207 - 0
mk_framework/assets/resources/module/login/login.prefab

@@ -0,0 +1,207 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "login",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
+    "_active": true,
+    "_components": [],
+    "_prefab": {
+      "__id__": 6
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "背景",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": {
+      "__id__": 5
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "0b9148fc-0951-469d-8696-57c6d27ed5b9"
+    },
+    "_type": 0,
+    "_sizeMode": 1,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "6dba2tWf41JpYkegatfLoGC",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f7b563d2-2a35-4ed4-b0b0-05dd74c0033f"
+    },
+    "fileId": "bdEW6BsetPLqcZkJCdiJgS",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "f7b563d2-2a35-4ed4-b0b0-05dd74c0033f"
+    },
+    "fileId": "",
+    "sync": false
+  }
+]

+ 1 - 1
mk_framework/assets/resources/game/uiPanel/login.prefab.meta → mk_framework/assets/resources/module/login/login.prefab.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.2.9",
-  "uuid": "62252503-89e0-44ba-aeab-bf0baac4f65a",
+  "uuid": "f7b563d2-2a35-4ed4-b0b0-05dd74c0033f",
   "optimizationPolicy": "AUTO",
   "asyncLoadAssets": false,
   "readonly": false,

+ 2 - 2
mk_framework/assets/script/Main.ts

@@ -1,4 +1,4 @@
-import UISystem from "./mk/system/UISystem";
+import UISystem, { PanelType } from "./mk/system/UISystem";
 
 const { ccclass, property } = cc._decorator;
 
@@ -11,6 +11,6 @@ export default class Main extends cc.Component {
 
     start() {
         console.log("init");
-        // mk.ui.openPanel("login");
+        mk.ui.openPanel("login",PanelType.Module);
     }
 }

+ 28 - 0
mk_framework/assets/script/game/component/BtnOpenPanel.ts

@@ -0,0 +1,28 @@
+
+const { ccclass, property } = cc._decorator;
+/**
+ * 打开指定名字的面板
+ * @author 薛鸿潇
+ */
+@ccclass
+export default class BtnOpenPanel extends cc.Component {
+
+    @property({ displayName: '界面名字', tooltip: '对应路径:resources/prefab/uiPanel/' })
+    private panel_name = '';
+    @property({ displayName: '完成回调', tooltip: "面板打开完成后触发", type: cc.Component.EventHandler })
+    public onComplete: cc.Component.EventHandler = new cc.Component.EventHandler();
+
+    onLoad() {
+        if (!this.node.getComponent(cc.Button)) this.node.addComponent(cc.Button);
+    }
+
+    start() {
+        this.node.on('click', this.openPanel, this);
+    }
+    
+    private async openPanel() {
+        await mk.ui.openPanel(this.panel_name);
+        if (this.onComplete.handler) this.onComplete.emit([])
+    }
+    // update (dt) {}
+}

+ 1 - 1
mk_framework/assets/resources/game/uiItem/1.ts.meta → mk_framework/assets/script/game/component/BtnOpenPanel.ts.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.0.8",
-  "uuid": "221a271a-4349-4582-9004-a89635b59f5a",
+  "uuid": "b8d2c9ea-f866-4b14-adf4-c5b2c3aabfe6",
   "isPlugin": false,
   "loadPluginInWeb": true,
   "loadPluginInNative": true,

+ 69 - 0
mk_framework/assets/script/game/component/UIBG.ts

@@ -0,0 +1,69 @@
+
+const TopEdgeDistance = 0;
+const BottomEdgeDistance = 0;
+const { ccclass, property } = cc._decorator;
+enum BGType {
+    /**
+     * 无
+     * @property {Number} None
+     */
+    None = 0,
+
+    /**
+     * 半透明
+     * @property {Number} Translucent
+     */
+    Translucent = 1,
+}
+
+/**
+ * 窗口遮罩
+ * - 挂载到节点上
+ * @author 薛鸿潇
+ */
+@ccclass//('UIBG')
+export class UIBG extends cc.Component {
+    @property({ displayName: '背景颜色' })
+    private color = new cc.Color(0, 0, 0, 120);
+    @property({ displayName: '点击关闭' })
+    private bClickClose: boolean = false;
+
+    /** 背景节点 */
+    private node_bg: cc.Node = null;
+
+    onLoad() {
+        this.initBG();
+    }
+
+    private initBG() {
+        const width = mk.game.getWinSize().width;
+        const height = mk.game.getWinSize().height;
+        this.node_bg = this.drawColorRect(new cc.Rect(-width / 2, -height / 2, width, height));
+        this.node_bg.parent = this.node;
+        this.node_bg.zIndex = -10000;
+        this.node_bg.addComponent(cc.Button);
+        this.node_bg.on('click', this.initClick, this);
+    }
+
+    /**
+     * 按钮回调
+     */
+    private initClick() {
+        if (this.bClickClose) mk.ui.closePanel(this.node.name);
+    }
+    /**
+     * 创建背景蒙版 by 绘图组件
+     * @param size 坐标及宽高
+     * @returns 创建的节点
+     */
+    public drawColorRect(size: cc.Rect): cc.Node {//
+        cc.log(size)
+        let node = new cc.Node('colorRect');
+        node.setContentSize(size);
+        let graph = node.addComponent(cc.Graphics);
+        graph.fillColor = this.color;
+        graph.fillRect(size.x, size.y, size.width, size.height);
+        return node;
+    }
+
+}

+ 0 - 0
mk_framework/assets/script/game/component/UIMask.ts.meta → mk_framework/assets/script/game/component/UIBG.ts.meta


+ 0 - 37
mk_framework/assets/script/game/component/UIMask.ts

@@ -1,37 +0,0 @@
-
-const TopEdgeDistance = 0;
-const BottomEdgeDistance = 0;
-const { ccclass, property } = cc._decorator;
-/**
- * 窗口遮罩
- * @author 薛鸿潇
- */
-@ccclass//('UIMask')
-export class UIMask extends cc.Component {
-    @property({ type: cc.Node, tooltip: '遮罩节点' })
-    private node_mask: cc.Node = null;
-
-    start() {
-        this.node.zIndex = -10000;
-        this.adaptTopAndBottomBox();
-        this.node.getComponent(cc.Widget).updateAlignment();
-        this.node_mask.getComponent(cc.Widget).updateAlignment();
-    }
-    /**
-     * 全面屏适配
-     */
-    private adaptTopAndBottomBox() {
-        let widget = this.node.getComponent(cc.Widget);
-        widget.top = TopEdgeDistance;
-        widget.bottom = BottomEdgeDistance;
-    }
-
-    /**
-     * 设置遮罩显示 or 隐藏
-     * @param bVisible {boolen} 显示或隐藏
-     */
-    public setMaskVisible(bVisible: boolean) {
-        this.node_mask.active = bVisible;
-    }
-
-}

+ 7 - 4
mk_framework/assets/script/game/component/tween/ClickMoveBy.ts

@@ -1,6 +1,6 @@
 
 const { ccclass, property } = cc._decorator;
-/** 闪烁可选类型 */
+/** 状态类型 */
 enum StateType {
     /** 出去 */
     out = 0,
@@ -9,6 +9,7 @@ enum StateType {
     /** 回来 */
     back = 2,
 };
+
 /**
  * 点击弹出或返回
  * - 节点需要添加按钮组件
@@ -20,11 +21,13 @@ enum StateType {
 export default class ClickMoveBy extends cc.Component {
     /** 移动的距离 */
     @property({ tooltip: '要移动的距离' })
-    vec_move: cc.Vec2 = cc.Vec2.ZERO;
+    private vec_move: cc.Vec2 = cc.Vec2.ZERO;
+
+
     /** 当前状态 */
-    state: number = StateType.out;
+    private state: number = StateType.out;
     /** 是否要返回 */
-    is_back: boolean = false;
+    private is_back: boolean = false;
     onLoad() {
         this.node.on('click', this.StartMoveBy, this);
     }

+ 4 - 4
mk_framework/assets/script/game/component/tween/FrameAnimation.ts

@@ -92,10 +92,7 @@ export default class FrameAnimation extends cc.Component {
         }
 
     }
-    /**
-     * 更新动画帧
-     * @param dt 
-     */
+    
     update(dt) {
 
         if (!this.running) return;
@@ -121,6 +118,7 @@ export default class FrameAnimation extends cc.Component {
             }
         }
     }
+
     /** 播放中 */
     private playing() {
         this.comp_spr.spriteFrame = this.images[this.frameIndex];
@@ -136,6 +134,7 @@ export default class FrameAnimation extends cc.Component {
             this.frameCallback(this.frameIndex);
         }
     }
+
     /** 播放结束 */
     private playEnd() {
         this.currentTimes++;
@@ -253,6 +252,7 @@ export default class FrameAnimation extends cc.Component {
 
         this.running = false;
     }
+    
     /**
      * 是否播放结束
      * @returns 

+ 195 - 0
mk_framework/assets/script/game/data/LoginData.ts

@@ -0,0 +1,195 @@
+import { StorageKey } from "./StorageData";
+
+/**
+ * @description 登录数据
+ * @author 邹勇
+ */
+export class LoginData {
+
+    /** 是否登录 */
+    public isLogin: boolean = false;
+
+    public sessionKey: string = '';
+
+    /** 玩家唯一id */
+    public uin: string = '';
+
+    /** 玩家临时id */
+    public tempUin: string = '';
+
+    public loginTicket: string = '';
+
+    public isFirstIn: boolean;
+
+    public isNew: boolean;
+
+    /** 是否授权 */
+    public isAuth: boolean;
+
+
+
+    /**
+     * 登录流程 initApp-->initAd-->connect-->wxLogin-->checkLogin-->getAccountInfo
+     */
+    public async login() {
+        this.isLogin = true;
+        g.appData.init();
+        g.adData.init();
+
+        //有登录记录直接跳转到登录流程最后一步
+        if (this.sessionKey != '' && this.uin != '') {
+            this.getAccountInfo();
+            return;
+        }
+
+        let ranKey = mk.encrypt.randomString();
+        let data: any = {
+            "mac": g.appData.mac,
+            "psk": ranKey,
+            "appId": g.appData.appId
+        }
+
+        //connect
+        let response = await mk.http.sendRequest('connectTest', 'POST', JSON.stringify(data));
+        if (response.errcode != 0) {
+            return;
+        }
+        data = mk.encrypt.decrypt(response.encrypt, ranKey, g.appData.appId);
+        this.tempUin = JSON.parse(data).tmp_uin;
+
+        //wxLogin
+        let encode;
+        if (g.wechatData.code != null) {//微信登录
+            encode = mk.encrypt.encrypt(JSON.stringify({ "code": g.wechatData.code }), this.sessionKey, g.appData.appId);
+            data = {
+                "uin": this.uin,
+                "encrypt": encode
+            };
+        }
+        else {//游客登录
+            encode = mk.encrypt.encrypt(JSON.stringify({ "code": g.wechatData.code }), ranKey, g.appData.appId);
+            data = {
+                "uin": this.tempUin,
+                "encrypt": encode
+            };
+        }
+        response = await mk.http.sendRequest('wxlogin', 'POST', JSON.stringify(data), false, false);
+        if (response.errcode != 0) {
+            return;
+        }
+        if (g.wechatData.code != null) {
+            data = mk.encrypt.decrypt(response.encrypt, this.sessionKey, g.appData.appId);
+        }
+        else {
+            data = mk.encrypt.decrypt(response.encrypt, ranKey, g.appData.appId);
+        }
+        data = JSON.parse(data);
+        this.loginTicket = data.login_ticket;
+        mk.storage.setStorage(StorageKey.loginTicket, this.loginTicket);
+
+        let isFirstIn = mk.storage.getStorage('isFirstIn');
+        if (isFirstIn == null) {
+            this.isFirstIn = true;
+            mk.storage.setStorage(StorageKey.isFirstIn, 1);
+        }
+
+        if (this.uin != data.uin) {
+            this.uin = data.uin;
+            this.isNew = false;
+        }
+        else {
+            this.isNew = true;
+        }
+        mk.storage.setStorage('uin', this.uin);
+
+        //checkLogin
+        let tmp_key = '';
+        if (g.wechatData.code != null) {
+            tmp_key = this.sessionKey;
+        }
+        else {
+            tmp_key = mk.encrypt.randomString();
+        }
+
+        data = {
+            "tmp_key": tmp_key,
+            "uin": this.uin,
+            "login_ticket": this.loginTicket,
+            "appId": g.appData.appId
+        }
+        response = await mk.http.sendRequest('checklogin', 'POST', JSON.stringify(data));
+        if (response.errcode != 0) {
+            return;
+        }
+        if (g.wechatData.code != null) {
+            data = mk.encrypt.decrypt(response.encrypt, this.sessionKey, g.appData.appId);
+        }
+        else {
+            data = mk.encrypt.decrypt(response.encrypt, tmp_key, g.appData.appId);
+        }
+
+        data = JSON.parse(data);
+        this.sessionKey = data.session_key;
+
+        mk.storage.setStorage('sessionKey', this.sessionKey);
+
+        if (g.wechatData.code != null) {
+            if (this.isNew) {//玩过此游戏并且本地数据是本机的
+                this.getAccountInfo();
+            }
+            else {//玩过此游戏 但 本地数据不是本账户的 清空数据 重新登录游戏
+                this.isNew = false;
+                g.wechatData.code = null;
+                this.reload();
+            }
+        }
+        else {
+            this.getAccountInfo();
+        }
+    }
+
+    private async getAccountInfo() {
+        let nickname = mk.storage.getStorage(StorageKey.nickname);
+        if (nickname) {
+            g.wechatData.nickName = nickname;
+        }
+        else {
+            let aa = {
+                "uin": this.uin,
+                "login_ticket": this.loginTicket
+            };
+
+            let data: any = {
+                "uin": this.uin,
+                "encrypt": mk.encrypt.encrypt(JSON.stringify(aa), this.sessionKey, g.appData.appId)
+            };
+
+            let response = await mk.http.sendRequest('user', 'POST', JSON.stringify(data), false, false);
+            if (response.errcode != 0) {
+                return;
+            }
+            response = mk.http.checkData(response, true);
+            data = response.data;
+            this.isAuth = data.is_auth;
+            if (this.isAuth) {
+                g.wechatData.nickName = data.nickname;
+                g.wechatData.avatar = data.headimgurl;
+                mk.storage.setStorage(StorageKey.isAuth, 1);
+                mk.storage.setStorage(StorageKey.nickname, g.wechatData.nickName, false);
+                mk.storage.setStorage(StorageKey.avatar, g.wechatData.avatar, false);
+            }
+        }
+
+        //获取游戏数据
+        g.gameData.init();
+    }
+
+
+
+    /**
+     * 本地数据不是本账户的 清空数据 重新登录游戏
+     */
+    private reload() {
+
+    }
+}

+ 9 - 0
mk_framework/assets/script/game/data/LoginData.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "7d48acb0-b75b-4f5c-8d9e-4614735f060f",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 1 - 1
mk_framework/assets/script/game/data/g.ts

@@ -2,7 +2,7 @@ import { AdData } from "./AdData";
 import { AppData } from "./AppData";
 import { GameData } from "./GameData";
 import { HttpData } from "./HttpData";
-import { LoginData } from "../../../resources/module/login/LoginData";
+import { LoginData } from "./LoginData";
 import { StorageData } from "./StorageData";
 import { WechatData } from "./WechatData";
 

+ 0 - 5
mk_framework/assets/script/game/module/cash/turntable/Tur.meta

@@ -1,5 +0,0 @@
-{
-  "ver": "1.0.1",
-  "uuid": "b228b610-53f6-4190-bd39-c23cb3ab8bb7",
-  "subMetas": {}
-}

+ 0 - 12
mk_framework/assets/script/game/module/common.meta

@@ -1,12 +0,0 @@
-{
-  "ver": "1.1.2",
-  "uuid": "311415a3-5342-4e32-abb5-b35907067914",
-  "isBundle": false,
-  "bundleName": "",
-  "priority": 1,
-  "compressionType": {},
-  "optimizeHotUpdate": {},
-  "inlineSpriteFrames": {},
-  "isRemoteBundle": {},
-  "subMetas": {}
-}

+ 1 - 1
mk_framework/assets/resources/game/uiPanel.meta → mk_framework/assets/script/game/module/module.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.1.2",
-  "uuid": "b206b900-d2f8-4d0e-9c8a-cc37444de8aa",
+  "uuid": "44d4b414-9934-4531-99cd-c0259f97704a",
   "isBundle": false,
   "bundleName": "",
   "priority": 1,

+ 1 - 1
mk_framework/assets/script/game/module/cash.meta → mk_framework/assets/script/game/module/module/login.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.1.2",
-  "uuid": "42cbe10f-5b94-498a-af86-aa0e72204c7f",
+  "uuid": "9e14cf5e-18f0-4458-a635-93bd67f52a83",
   "isBundle": false,
   "bundleName": "",
   "priority": 1,

+ 26 - 0
mk_framework/assets/script/game/module/module/login/Login.ts

@@ -0,0 +1,26 @@
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Login extends cc.Component {
+
+    onLoad() {
+        
+    }
+
+    start() {
+
+
+    }
+
+
+
+    update() {
+        if (!g.loginData.isLogin) {
+            g.loginData.login();
+        }
+        if(g.gameData.dataFinish){//登录流程完毕
+            console.log('isLoginSuccess...');
+            this.destroy();
+        }
+    }
+}

+ 9 - 0
mk_framework/assets/script/game/module/module/login/Login.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "6dba2b56-7f8d-49a5-891e-81ab5f2e8182",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 0 - 0
mk_framework/assets/script/game/module/cash/sign.meta → mk_framework/assets/script/game/module/module/sign.meta


+ 0 - 0
mk_framework/assets/script/game/module/cash/turntable/Tur → mk_framework/assets/script/game/module/module/sign/Sign.ts


+ 9 - 0
mk_framework/assets/script/game/module/module/sign/Sign.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "b1fd499a-3020-458a-887c-43e7ced7b256",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 0 - 0
mk_framework/assets/script/game/module/cash/turntable.meta → mk_framework/assets/script/game/module/module/turntable.meta


+ 0 - 0
mk_framework/assets/script/game/module/module/turntable/Turnable.ts


+ 9 - 0
mk_framework/assets/script/game/module/module/turntable/Turnable.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "c59724a2-e07d-4c32-9eee-8277deaeaefb",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 31 - 6
mk_framework/assets/script/mk/system/UISystem.ts

@@ -10,7 +10,9 @@ export default class UISystem extends cc.Component {
     /** panel父节点 */
     private panelParent: cc.Node = null;
     /** 界面预制体路径 */
-    private panelPrefanbUrl: string = './prefab/uiPanel/'
+    private gamePanelbUrl: string = './game/prefab/';
+    /** 模块界面预制体路径 */
+    private modulPanelUrl: string = './module/';
     /** 是否正在打开界面 */
     private isPanelOpening: boolean = false;
     /** 是否界面正在关闭 */
@@ -19,11 +21,11 @@ export default class UISystem extends cc.Component {
     private curOnPanelDic: { [key: string]: cc.Node } = {};
     /** 上一个打开的界面名称 */
     private lastOpenPanelName: string = "";
-    
+
     onLoad() {
         mk.ui = this;
     }
-  
+
     start() {
         if (!this.panelParent) {
             this.panelParent = this.node;
@@ -33,9 +35,12 @@ export default class UISystem extends cc.Component {
     /**
      * 打开panel界面
      * @param panelName  界面名称
+     * @param panelType  界面类型
      * @param openAction 打开之后的操(需不需要关闭其他界面)
      */
-    openPanel(panelName: string, openAction: OpenActionType = OpenActionType.normal): Promise<any> {
+    openPanel(panelName: string, panelType: PanelType, openAction: OpenActionType = OpenActionType.normal): Promise<any> {
+
+        let panelUrl = this.getUrlByPanelType(panelName, panelType);
 
         let self = this;
         if (self.isPanelOpening || self.getCurOnPanel(panelName)) {
@@ -46,7 +51,7 @@ export default class UISystem extends cc.Component {
 
         return new Promise((resolve, reject) => {
 
-            mk.loader.load(`${self.panelPrefanbUrl}` + panelName, cc.Prefab)
+            mk.loader.load(`${panelUrl}`, cc.Prefab)
                 .then((prefab) => {
 
                     self.isPanelOpening = false;
@@ -113,11 +118,29 @@ export default class UISystem extends cc.Component {
         this.isPanelClosing = true;
 
         let node_panel = this.getCurOnPanel(panelName);
-        node_panel.removeFromParent();
+        node_panel.destroy();
         delete this.curOnPanelDic[panelName];
 
         this.isPanelClosing = false;
     }
+
+    /**
+     * 根据界面类型获取url
+     * @param panelName 界面名称
+     * @param panelType 界面类型
+     */
+    getUrlByPanelType(pannelName: string, panelType: PanelType): string {
+        let url: string = "";
+        switch (panelType) {
+            case PanelType.Game:
+                url = `${this.gamePanelbUrl}${pannelName}`
+                break;
+            case PanelType.Module:
+                url = `${this.modulPanelUrl}${pannelName}/${pannelName}`
+                break;
+        }
+        return url;
+    }
 }
 
 /** 界面打开操作 */
@@ -132,6 +155,8 @@ export enum OpenActionType {
 
 /** */
 export enum PanelType {
+    /**游戏界面 */
     Game = 1,
+    /**模块界面 */
     Module = 2,
 }