zouyong 5 лет назад
Родитель
Сommit
b03acdbd5b
58 измененных файлов с 621 добавлено и 1553 удалено
  1. 12 0
      assets/res/audio.meta
  2. BIN
      assets/resources/module/turnable/texture/bg.png
  3. 36 0
      assets/resources/module/turnable/texture/bg.png.meta
  4. BIN
      assets/resources/module/turnable/texture/deng1.png
  5. 36 0
      assets/resources/module/turnable/texture/deng1.png.meta
  6. BIN
      assets/resources/module/turnable/texture/deng2.png
  7. 36 0
      assets/resources/module/turnable/texture/deng2.png.meta
  8. BIN
      assets/resources/module/turnable/texture/deng3.png
  9. 36 0
      assets/resources/module/turnable/texture/deng3.png.meta
  10. BIN
      assets/resources/module/turnable/texture/deng4.png
  11. 36 0
      assets/resources/module/turnable/texture/deng4.png.meta
  12. BIN
      assets/resources/module/turnable/texture/hb.png
  13. 36 0
      assets/resources/module/turnable/texture/hb.png.meta
  14. BIN
      assets/resources/module/turnable/texture/zhuanpan.png
  15. BIN
      assets/resources/module/turnable/texture/zhuanpan1.png
  16. 36 0
      assets/resources/module/turnable/texture/zhuanpan1.png.meta
  17. 124 1382
      assets/resources/module/turnable/turnable.prefab
  18. 5 7
      assets/resources/module/turnable/turnableitem.prefab
  19. BIN
      assets/resources/music/bgm.mp3
  20. 7 0
      assets/resources/music/bgm.mp3.meta
  21. BIN
      assets/resources/music/button.mp3
  22. 7 0
      assets/resources/music/button.mp3.meta
  23. BIN
      assets/resources/music/missionBg.mp3
  24. 7 0
      assets/resources/music/missionBg.mp3.meta
  25. BIN
      assets/resources/music/pigBank.mp3
  26. 7 0
      assets/resources/music/pigBank.mp3.meta
  27. BIN
      assets/resources/music/receiptNotice.mp3
  28. 7 0
      assets/resources/music/receiptNotice.mp3.meta
  29. BIN
      assets/resources/music/reward.mp3
  30. 7 0
      assets/resources/music/reward.mp3.meta
  31. BIN
      assets/resources/music/rewardClose.mp3
  32. 7 0
      assets/resources/music/rewardClose.mp3.meta
  33. BIN
      assets/resources/music/rewardOpen.mp3
  34. 7 0
      assets/resources/music/rewardOpen.mp3.meta
  35. BIN
      assets/resources/music/turnableplay.mp3
  36. 7 0
      assets/resources/music/turnableplay.mp3.meta
  37. 0 80
      assets/resources/music/空文件夹.effect
  38. 0 17
      assets/resources/music/空文件夹.effect.meta
  39. 34 0
      assets/resources/spine/light.atlas
  40. 5 0
      assets/resources/spine/light.atlas.meta
  41. 1 0
      assets/resources/spine/light.json
  42. 9 0
      assets/resources/spine/light.json.meta
  43. BIN
      assets/resources/spine/light.png
  44. 36 0
      assets/resources/spine/light.png.meta
  45. 1 1
      assets/script/Main.ts
  46. 7 6
      assets/script/game/component/Button.ts
  47. 1 1
      assets/script/game/data/AdData.ts
  48. 1 1
      assets/script/game/data/AppData.ts
  49. 12 7
      assets/script/game/data/GameData.ts
  50. 4 3
      assets/script/game/data/LoginData.ts
  51. 10 0
      assets/script/game/data/module/TurnableData.ts
  52. 5 1
      assets/script/game/game/Game.ts
  53. 1 0
      assets/script/game/module/module/pigBank/PigBank.ts
  54. 3 3
      assets/script/game/module/module/receiptNotice/ReceiptNotice.ts
  55. 2 4
      assets/script/game/module/module/redCode/RedCode.ts
  56. 7 0
      assets/script/game/module/module/reward/Reward.ts
  57. 11 1
      assets/script/game/module/module/turntable/Turnable.ts
  58. 15 39
      assets/script/mk/system/AudioSystem.ts

+ 12 - 0
assets/res/audio.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "160477ed-e2d0-4ee6-95f7-965820ef4f7d",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

BIN
assets/resources/module/turnable/texture/bg.png


+ 36 - 0
assets/resources/module/turnable/texture/bg.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "8586c689-42b7-4da3-94e2-9fc8892217f9",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 101,
+  "height": 36,
+  "platformSettings": {},
+  "subMetas": {
+    "bg": {
+      "ver": "1.0.4",
+      "uuid": "598034f1-534e-497f-b577-c518bda732bf",
+      "rawTextureUuid": "8586c689-42b7-4da3-94e2-9fc8892217f9",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 101,
+      "height": 36,
+      "rawWidth": 101,
+      "rawHeight": 36,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/module/turnable/texture/deng1.png


+ 36 - 0
assets/resources/module/turnable/texture/deng1.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "679a7def-b2ea-4617-b8a0-b0c3fc20d0b0",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 683,
+  "height": 692,
+  "platformSettings": {},
+  "subMetas": {
+    "deng1": {
+      "ver": "1.0.4",
+      "uuid": "af4cfdf0-f8de-4eb2-ab4b-0be2eb735cf3",
+      "rawTextureUuid": "679a7def-b2ea-4617-b8a0-b0c3fc20d0b0",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 683,
+      "height": 692,
+      "rawWidth": 683,
+      "rawHeight": 692,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/module/turnable/texture/deng2.png


+ 36 - 0
assets/resources/module/turnable/texture/deng2.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "5b2be0af-7e8e-4c4a-bf55-228238e2bfea",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 683,
+  "height": 692,
+  "platformSettings": {},
+  "subMetas": {
+    "deng2": {
+      "ver": "1.0.4",
+      "uuid": "38c50405-ff17-4877-91ac-69a5e92ab0bc",
+      "rawTextureUuid": "5b2be0af-7e8e-4c4a-bf55-228238e2bfea",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 683,
+      "height": 692,
+      "rawWidth": 683,
+      "rawHeight": 692,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/module/turnable/texture/deng3.png


+ 36 - 0
assets/resources/module/turnable/texture/deng3.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "f933c01a-23aa-4f21-82d7-6364b7825481",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 683,
+  "height": 692,
+  "platformSettings": {},
+  "subMetas": {
+    "deng3": {
+      "ver": "1.0.4",
+      "uuid": "ed54c63b-48b8-42b4-b7ee-ae914d813017",
+      "rawTextureUuid": "f933c01a-23aa-4f21-82d7-6364b7825481",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 683,
+      "height": 692,
+      "rawWidth": 683,
+      "rawHeight": 692,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/module/turnable/texture/deng4.png


+ 36 - 0
assets/resources/module/turnable/texture/deng4.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "0942983e-53db-4f73-a279-038ebee58f0d",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 683,
+  "height": 692,
+  "platformSettings": {},
+  "subMetas": {
+    "deng4": {
+      "ver": "1.0.4",
+      "uuid": "f9117747-1d1a-4eba-b8d3-2c89fbdd9fd9",
+      "rawTextureUuid": "0942983e-53db-4f73-a279-038ebee58f0d",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 683,
+      "height": 692,
+      "rawWidth": 683,
+      "rawHeight": 692,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/module/turnable/texture/hb.png


+ 36 - 0
assets/resources/module/turnable/texture/hb.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "445c238a-baf0-4a31-814e-657f3a83cd19",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 128,
+  "height": 94,
+  "platformSettings": {},
+  "subMetas": {
+    "hb": {
+      "ver": "1.0.4",
+      "uuid": "2685c1f7-9424-4e61-92de-3aeb8d610c9f",
+      "rawTextureUuid": "445c238a-baf0-4a31-814e-657f3a83cd19",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 128,
+      "height": 94,
+      "rawWidth": 128,
+      "rawHeight": 94,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/module/turnable/texture/zhuanpan.png


BIN
assets/resources/module/turnable/texture/zhuanpan1.png


+ 36 - 0
assets/resources/module/turnable/texture/zhuanpan1.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "612f7c78-d201-48ec-af15-8b59b6bee474",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 139,
+  "height": 140,
+  "platformSettings": {},
+  "subMetas": {
+    "zhuanpan1": {
+      "ver": "1.0.4",
+      "uuid": "78a05f16-b43a-494f-ae52-f8bba1d46fee",
+      "rawTextureUuid": "612f7c78-d201-48ec-af15-8b59b6bee474",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 139,
+      "height": 140,
+      "rawWidth": 139,
+      "rawHeight": 140,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

Разница между файлами не показана из-за своего большого размера
+ 124 - 1382
assets/resources/module/turnable/turnable.prefab


+ 5 - 7
assets/resources/module/turnable/turnableitem.prefab

@@ -60,8 +60,8 @@
         0,
         0,
         0,
-        0,
-        1,
+        0.49999999999999994,
+        -0.8660254037844387,
         1,
         1,
         1
@@ -71,7 +71,7 @@
       "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
-      "z": 0
+      "z": 300
     },
     "_skewX": 0,
     "_skewY": 0,
@@ -107,7 +107,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 74,
+      "width": 128,
       "height": 94
     },
     "_anchorPoint": {
@@ -159,9 +159,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
-    "_spriteFrame": {
-      "__uuid__": "62ea210d-7b98-4731-8cc9-607c79a69ff9"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_sizeMode": 1,
     "_fillType": 0,

BIN
assets/resources/music/bgm.mp3


+ 7 - 0
assets/resources/music/bgm.mp3.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "2.0.1",
+  "uuid": "f77ecb31-e3b7-40ef-9acc-6d65df909e02",
+  "downloadMode": 0,
+  "duration": 159.320816,
+  "subMetas": {}
+}

BIN
assets/resources/music/button.mp3


+ 7 - 0
assets/resources/music/button.mp3.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "2.0.1",
+  "uuid": "69844d21-0971-4df8-818a-f17e9b456a8c",
+  "downloadMode": 0,
+  "duration": 0.394,
+  "subMetas": {}
+}

BIN
assets/resources/music/missionBg.mp3


+ 7 - 0
assets/resources/music/missionBg.mp3.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "2.0.1",
+  "uuid": "504574cc-f824-41cf-9ab8-5f97e3a99b25",
+  "downloadMode": 0,
+  "duration": 34.507755,
+  "subMetas": {}
+}

BIN
assets/resources/music/pigBank.mp3


+ 7 - 0
assets/resources/music/pigBank.mp3.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "2.0.1",
+  "uuid": "da2426a6-b953-4f30-bbb2-8259400d5b82",
+  "downloadMode": 0,
+  "duration": 1.097143,
+  "subMetas": {}
+}

BIN
assets/resources/music/receiptNotice.mp3


+ 7 - 0
assets/resources/music/receiptNotice.mp3.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "2.0.1",
+  "uuid": "549acbf2-0efb-42f5-b1a1-44cdcf1da594",
+  "downloadMode": 0,
+  "duration": 0.940408,
+  "subMetas": {}
+}

BIN
assets/resources/music/reward.mp3


+ 7 - 0
assets/resources/music/reward.mp3.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "2.0.1",
+  "uuid": "6eefd9a5-bda1-4c2d-9bbd-16b5caa3d47a",
+  "downloadMode": 0,
+  "duration": 0.86425,
+  "subMetas": {}
+}

BIN
assets/resources/music/rewardClose.mp3


+ 7 - 0
assets/resources/music/rewardClose.mp3.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "2.0.1",
+  "uuid": "21bf80c2-e30b-4273-8c09-001ba0495a9f",
+  "downloadMode": 0,
+  "duration": 2.142041,
+  "subMetas": {}
+}

BIN
assets/resources/music/rewardOpen.mp3


+ 7 - 0
assets/resources/music/rewardOpen.mp3.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "2.0.1",
+  "uuid": "20ed4c7e-22dd-4049-b389-cb945fa56565",
+  "downloadMode": 0,
+  "duration": 0.75975,
+  "subMetas": {}
+}

BIN
assets/resources/music/turnableplay.mp3


+ 7 - 0
assets/resources/music/turnableplay.mp3.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "2.0.1",
+  "uuid": "e0bd683e-7fb4-4919-8901-75537f28842a",
+  "downloadMode": 0,
+  "duration": 4.963265,
+  "subMetas": {}
+}

+ 0 - 80
assets/resources/music/空文件夹.effect

@@ -1,80 +0,0 @@
-// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.  
-
-CCEffect %{
-  techniques:
-  - passes:
-    - vert: vs
-      frag: fs
-      blendState:
-        targets:
-        - blend: true
-      rasterizerState:
-        cullMode: none
-      properties:
-        texture: { value: white }
-        alphaThreshold: { value: 0.5 }
-}%
-
-
-CCProgram vs %{
-  precision highp float;
-
-  #include <cc-global>
-  #include <cc-local>
-
-  in vec3 a_position;
-  in vec4 a_color;
-  out vec4 v_color;
-
-  #if USE_TEXTURE
-  in vec2 a_uv0;
-  out vec2 v_uv0;
-  #endif
-
-  void main () {
-    vec4 pos = vec4(a_position, 1);
-
-    #if CC_USE_MODEL
-    pos = cc_matViewProj * cc_matWorld * pos;
-    #else
-    pos = cc_matViewProj * pos;
-    #endif
-
-    #if USE_TEXTURE
-    v_uv0 = a_uv0;
-    #endif
-
-    v_color = a_color;
-
-    gl_Position = pos;
-  }
-}%
-
-
-CCProgram fs %{
-  precision highp float;
-  
-  #include <alpha-test>
-  #include <texture>
-
-  in vec4 v_color;
-
-  #if USE_TEXTURE
-  in vec2 v_uv0;
-  uniform sampler2D texture;
-  #endif
-
-  void main () {
-    vec4 o = vec4(1, 1, 1, 1);
-
-    #if USE_TEXTURE
-      CCTexture(texture, v_uv0, o);
-    #endif
-
-    o *= v_color;
-
-    ALPHA_TEST(o);
-
-    gl_FragColor = o;
-  }
-}%

+ 0 - 17
assets/resources/music/空文件夹.effect.meta

@@ -1,17 +0,0 @@
-{
-  "ver": "1.0.25",
-  "uuid": "f3007671-64ea-454c-9382-108995a3c465",
-  "compiledShaders": [
-    {
-      "glsl1": {
-        "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n  vec4 pos = vec4(a_position, 1);\n  #if CC_USE_MODEL\n  pos = cc_matViewProj * cc_matWorld * pos;\n  #else\n  pos = cc_matViewProj * pos;\n  #endif\n  #if USE_TEXTURE\n  v_uv0 = a_uv0;\n  #endif\n  v_color = a_color;\n  gl_Position = pos;\n}",
-        "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n  uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n  #if USE_ALPHA_TEST\n      if (color.a < alphaThreshold) discard;\n  #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n  #if USE_ALPHA_TEST\n      if (alpha < alphaThreshold) discard;\n  #endif\n}\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n  vec4 o = vec4(1, 1, 1, 1);\n  #if USE_TEXTURE\n  vec4 texture_tmp = texture2D(texture, v_uv0);\n  #if CC_USE_ALPHA_ATLAS_texture\n      texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n  #endif\n  #if INPUT_IS_GAMMA\n    o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n    o.a *= texture_tmp.a;\n  #else\n    o *= texture_tmp;\n  #endif\n  #endif\n  o *= v_color;\n  ALPHA_TEST(o);\n  gl_FragColor = o;\n}"
-      },
-      "glsl3": {
-        "vert": "\nprecision highp float;\nuniform CCGlobal {\n  mat4 cc_matView;\n  mat4 cc_matViewInv;\n  mat4 cc_matProj;\n  mat4 cc_matProjInv;\n  mat4 cc_matViewProj;\n  mat4 cc_matViewProjInv;\n  vec4 cc_cameraPos;\n  vec4 cc_time;\n  mediump vec4 cc_screenSize;\n  mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n  mat4 cc_matWorld;\n  mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n  vec4 pos = vec4(a_position, 1);\n  #if CC_USE_MODEL\n  pos = cc_matViewProj * cc_matWorld * pos;\n  #else\n  pos = cc_matViewProj * pos;\n  #endif\n  #if USE_TEXTURE\n  v_uv0 = a_uv0;\n  #endif\n  v_color = a_color;\n  gl_Position = pos;\n}",
-        "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n  uniform ALPHA_TEST {\n    float alphaThreshold;\n  };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n  #if USE_ALPHA_TEST\n      if (color.a < alphaThreshold) discard;\n  #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n  #if USE_ALPHA_TEST\n      if (alpha < alphaThreshold) discard;\n  #endif\n}\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n  vec4 o = vec4(1, 1, 1, 1);\n  #if USE_TEXTURE\n  vec4 texture_tmp = texture(texture, v_uv0);\n  #if CC_USE_ALPHA_ATLAS_texture\n      texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n  #endif\n  #if INPUT_IS_GAMMA\n    o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n    o.a *= texture_tmp.a;\n  #else\n    o *= texture_tmp;\n  #endif\n  #endif\n  o *= v_color;\n  ALPHA_TEST(o);\n  gl_FragColor = o;\n}"
-      }
-    }
-  ],
-  "subMetas": {}
-}

+ 34 - 0
assets/resources/spine/light.atlas

@@ -0,0 +1,34 @@
+
+light.png
+size: 1382,1360
+format: RGBA8888
+filter: Linear,Linear
+repeat: none
+deng1
+  rotate: true
+  xy: 2, 2
+  size: 679, 688
+  orig: 683, 692
+  offset: 2, 2
+  index: -1
+deng2
+  rotate: true
+  xy: 688, 683
+  size: 675, 684
+  orig: 683, 692
+  offset: 4, 4
+  index: -1
+deng3
+  rotate: true
+  xy: 692, 2
+  size: 679, 688
+  orig: 683, 692
+  offset: 2, 2
+  index: -1
+deng4
+  rotate: true
+  xy: 2, 683
+  size: 675, 684
+  orig: 683, 692
+  offset: 4, 4
+  index: -1

+ 5 - 0
assets/resources/spine/light.atlas.meta

@@ -0,0 +1,5 @@
+{
+  "ver": "1.0.1",
+  "uuid": "0885da9a-6ef6-466b-8fde-4348308101ee",
+  "subMetas": {}
+}

+ 1 - 0
assets/resources/spine/light.json

@@ -0,0 +1 @@
+{"skeleton":{"hash":"JohK5TUu0lUroLrlSwXiPn4dSGA","spine":"3.8.99","x":-341.5,"y":-346,"width":683,"height":692,"images":"C:/Users/jyh12059/Desktop/donghua/灯动画","audio":""},"bones":[{"name":"root"}],"slots":[{"name":"deng1","bone":"root","attachment":"deng4"}],"skins":[{"name":"default","attachments":{"deng1":{"deng1":{"width":683,"height":692},"deng2":{"width":683,"height":692},"deng3":{"width":683,"height":692},"deng4":{"width":683,"height":692}}}}],"animations":{"animation":{"slots":{"deng1":{"attachment":[{"name":"deng1"},{"time":0.1,"name":"deng2"},{"time":0.2,"name":"deng3"},{"time":0.3,"name":"deng4"},{"time":0.4,"name":"deng1"}]}}}}}

+ 9 - 0
assets/resources/spine/light.json.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.2.3",
+  "uuid": "79de3169-75ed-43f8-abaf-8a5a9b38b727",
+  "textures": [
+    "b36edb37-33e9-4f50-b8ff-16276dfa8211"
+  ],
+  "scale": 1,
+  "subMetas": {}
+}

BIN
assets/resources/spine/light.png


+ 36 - 0
assets/resources/spine/light.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "b36edb37-33e9-4f50-b8ff-16276dfa8211",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 1382,
+  "height": 1360,
+  "platformSettings": {},
+  "subMetas": {
+    "light": {
+      "ver": "1.0.4",
+      "uuid": "687da6d6-6e58-4665-a72e-7f02da1e9b6a",
+      "rawTextureUuid": "b36edb37-33e9-4f50-b8ff-16276dfa8211",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 2,
+      "trimY": 2,
+      "width": 1378,
+      "height": 1356,
+      "rawWidth": 1382,
+      "rawHeight": 1360,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 1 - 1
assets/script/Main.ts

@@ -11,7 +11,7 @@ export default class Main extends cc.Component {
         console.log("init");
         mk.ui.openPanel("module/login/login");
 
-        this.testnew()
+        let a = this.testnew()
     }
 
     async testnew() {

+ 7 - 6
assets/script/game/component/Button.ts

@@ -26,18 +26,19 @@ export default class Button extends cc.Component {
     }
 
     private touchStart() {
-        this.node_normal.active = false;
-        this.node_pressed.active = true;
-        this.node_disabled.active = false;
+        if(this.node_normal) this.node_normal.active = false;
+        if(this.node_pressed) this.node_pressed.active = true;
+        if(this.node_disabled) this.node_disabled.active = false;
     }
 
     private touchEnd() {
-        this.node_normal.active = true;
-        this.node_pressed.active = false;
-        this.node_disabled.active = false;
+        if(this.node_normal) this.node_normal.active = true;
+        if(this.node_pressed) this.node_pressed.active = false;
+        if(this.node_disabled) this.node_disabled.active = false;
     }
 
     private click() {
+        mk.audio.playEffect("button");
         let c_count = this.onClick.length;
         for (let i = 0; i < c_count; i++) {
             if (this.onClick[i].handler) {

+ 1 - 1
assets/script/game/data/AdData.ts

@@ -11,7 +11,7 @@ export class AdData {
     public network_firm_id = '';
     public adsource_id = '';
     public adsource_index = '';
-    public adsource_price = '';
+    public adsource_price = '100';
     public adsource_isheaderbidding = '';
     public publisher_revenue = '';
     public precision = '';

+ 1 - 1
assets/script/game/data/AppData.ts

@@ -17,7 +17,7 @@ export class AppData {
 
     public appId: string = 'wxef592f91d2d13355';
 
-    public mac: string = 'c9:65:e2:1c:b0:23,f6:60:e4:1a:b7:27';
+    public mac: string = 'c9:00:e2:1c:b2:23,f6:60:e4:1a:b7:27';
 
     /** 设备信息 */
     public machineInfo = {

+ 12 - 7
assets/script/game/data/GameData.ts

@@ -29,6 +29,7 @@ export class GameData {
      * @returns 
      */
     public async init() {
+        this.dataFinish = true;
         let data: any = { "versionCode": gData.appData.version };
         let response = await mk.http.sendData('getAllConfigInfo', data);
         if (response.errcode != 0) {
@@ -64,8 +65,8 @@ export class GameData {
             value: value + ''
         };
         await mk.http.sendData('savePlayerProp', data);
-        this.props.set(key, value);
-        this.savePropFinish = true;
+        // this.props.set(key, value);
+        // this.savePropFinish = true;
     }
 
     /**
@@ -183,11 +184,15 @@ export enum RewardType {
  * 音频路径
  */
 export enum AUDIO_TYPE {
-    bgm = 'Background_music1',           //背景音乐
-    button = 'Button_click',            //按钮点击音效
-    turntableDraw = 'turntable1',           //转盘抽奖结束
-    turntableDrawEnd = 'turntable_2',           //转盘抽奖音效
-    getGold = 'Get_gold',       //获取金币音效
+    bgm = 'bgm',                        //主界面背景音乐
+    pigBank = 'pigBank',                //打开存钱罐界面播放一次
+    missionBg = 'missionBg',            //关卡玩法背景音乐
+    rewardClose = 'rewardClose',        //红包币领取界面关闭音效
+    rewardOpen = 'rewardOpen',          //红包币领取界面开启音效
+    reward = 'reward',                  //红包界面打开音效
+    receiptNotice = 'receiptNotice',    //提现到账界面打开播放一次
+    button = 'button',                //通用按钮点击音效
+    turnableplay = 'turnableplay',      //转盘转动音效
 }
 
 type PlayerInfoType = {

+ 4 - 3
assets/script/game/data/LoginData.ts

@@ -6,7 +6,7 @@ import { StorageKey } from "./StorageData";
  */
 export class LoginData {
 
-    public loadResCompelete:boolean = false;
+    public loadResCompelete: boolean = false;
 
     /** 是否登录 */
     public isLogin: boolean = false;
@@ -34,8 +34,8 @@ export class LoginData {
      * 初始化本地配置
      * @returns 
      */
-     public loadLocalRes(){
-        
+    public loadLocalRes() {
+
         this.loadResCompelete = true;
     }
 
@@ -112,6 +112,7 @@ export class LoginData {
         else {
             this.isNew = true;
         }
+        mk.console.log("uin:", this.uin);
         mk.storage.setStorage(StorageKey.uin, this.uin);
 
         //checkLogin

+ 10 - 0
assets/script/game/data/module/TurnableData.ts

@@ -13,6 +13,7 @@ interface TurntableItem {
  */
 export class TurnableData extends Data {
 
+    public requestFinish:boolean = false;
 
     public leftTimes: number = 2;
     public config: TurntableItem[];
@@ -22,6 +23,15 @@ export class TurnableData extends Data {
         this.leftTimes = gData.gameData.gameData.turntableTimes == null ? 0 : gData.gameData.gameData.turntableTimes;
     }
 
+    public async requestData() {
+        let response = await mk.http.sendData('initialTurntable', {});
+        if (response.errcode != 0) {
+            return;
+        }
+        this.leftTimes = response.data.turntableTimes;
+        this.requestFinish = true;
+    }
+
     public setAdData(data) {
         super.setAdData(data);
 

+ 5 - 1
assets/script/game/game/Game.ts

@@ -14,10 +14,14 @@ export default class Game extends cc.Component {
     }
 
     start() {
-
+        this.initMusic();
         this.initBtns();
     }
 
+    private initMusic(){
+        mk.audio.playMusic("bgm");
+    }
+
     /**
      * 根据配置,添加开启的功能按钮
      */

+ 1 - 0
assets/script/game/module/module/pigBank/PigBank.ts

@@ -22,6 +22,7 @@ export default class PigBank extends cc.Component {
 
     start() {
         this.initCashDesc();
+        mk.audio.playEffect("pigBank",false);
     }
 
     update(dt) {

+ 3 - 3
assets/script/game/module/module/receiptNotice/ReceiptNotice.ts

@@ -20,9 +20,9 @@ export default class ReceiptNotice extends cc.Component {
 
     // }
 
-    // start() {
-
-    // }
+    start() {
+        mk.audio.playEffect("receiptNotice");
+    }
 
     update(dt) {
         if (gData.receiptNotice.init_style) {

+ 2 - 4
assets/script/game/module/module/redCode/RedCode.ts

@@ -82,20 +82,18 @@ export default class RedCode extends cc.Component {
         this.videoNode.getChildByName('video').off("completed", this.onCompleted, this)
         this.videoNode.destroy()
         mk.audio.setResumeMusic();
-        mk.audio.setTempEffect(true);
         this.coolTime = false
     }
 
     /** 点击复制红包码 */
     clickCopyRedCode() {
-        mk.audio.playEffect('button');
+        mk.audio.playEffect("button");
         // AdM.setClipboard(this.code)
     }
 
     /** 点击关闭 */
     closeCallBack() {
-        mk.audio.playEffect('button');
+        mk.audio.playEffect("button");
         mk.audio.setResumeMusic();
-        mk.audio.setTempEffect(true);
     }
 }

+ 7 - 0
assets/script/game/module/module/reward/Reward.ts

@@ -70,12 +70,15 @@ export default class Reward extends cc.Component {
             this.node_luck.active = false;
             this.node_mission.active = false;
             this.watchVideoCall();
+            mk.audio.playEffect("rewardOpen");
         } else if (gData.reward.lid_type === gData.reward.type_lid.luck) {
             this.node_luck.active = false;
             this.node_mission.active = true;
+            mk.audio.playEffect("reward");
         } else if (gData.reward.lid_type === gData.reward.type_lid.mission) {
             this.node_luck.active = false;
             this.node_mission.active = true;
+            mk.audio.playEffect("reward");
         }
     }
 
@@ -160,4 +163,8 @@ export default class Reward extends cc.Component {
 
     }
 
+    onDestroy(){
+        mk.audio.playEffect("rewardClose");
+    }
+
 }

+ 11 - 1
assets/script/game/module/module/turntable/Turnable.ts

@@ -12,11 +12,15 @@ export default class Turnable extends cc.Component {
     node_items: cc.Node[] = [];
     @property(cc.Node)
     btn_draw: cc.Node = null;
+    @property(sp.Skeleton)
+    spine_light: sp.Skeleton = null;
     @property(cc.Sprite)
     btn_close: cc.Sprite = null;
     @property(cc.RichText)
     lbl_left: cc.RichText = null;
 
+    private audioId:number;
+
     onLoad() {
         this.initData();
     }
@@ -41,7 +45,8 @@ export default class Turnable extends cc.Component {
         }
     }
 
-    private play() {
+    private async play() {
+        this.audioId = await mk.audio.playEffect("turnableplay", true);
         this.btn_close.getComponent(BtnClosePanel).block_click = true;
         this.node_turn.angle = 1800;
         let index = 2;
@@ -52,6 +57,7 @@ export default class Turnable extends cc.Component {
     }
 
     private playOver() {
+        mk.audio.stopEffect(null);
         this.btn_close.getComponent(BtnClosePanel).block_click = false;
         this.updateLeftTimes();
         mk.ui.openPanel("module/reward/reward");
@@ -62,6 +68,10 @@ export default class Turnable extends cc.Component {
     }
 
     update() {
+        if (gData.turnable.requestFinish) {
+            this.updateLeftTimes();
+            gData.turnable.requestFinish = false;
+        }
         if (gData.turnable.adData) {
             this.play();
             gData.reward.data = gData.turnable.adData;

+ 15 - 39
assets/script/mk/system/AudioSystem.ts

@@ -14,35 +14,16 @@ export default class AudioSystem {
     private _effectVolume: number = 1;
     /** 音乐音量 */
     private _musicVolume: number = 1;
-    /** 暂时音效开关 */
-    private _switchTempEffect: boolean = true;
     /** 音频map */
     private _map_audio: Map<AUDIO_NAME, cc.AudioClip> = new Map();
 
+    private _bg_audio:cc.AudioClip;
+
     /** 初始化 */
     public init() {
         // 获取本地开关设置
-        let effect = cc.sys.localStorage.getItem("switchEffect");
-        if (effect) {
-            if (effect == "true") {
-                this._switchEffect = true;
-            } else {
-                this._switchEffect = false;
-            }
-        }
-
-        let music = cc.sys.localStorage.getItem("switchMusic");
-        if (music) {
-            if (music == "true") {
-                this._switchMusic = true;
-            } else {
-                this._switchMusic = false;
-            }
-        }
-
-        if (this._switchMusic) {
-            this.playMusic('bgm', true)
-        }
+        this._switchEffect = !(cc.sys.localStorage.getItem("switchEffect") == "false");
+        this._switchMusic = !(cc.sys.localStorage.getItem("switchMusic") == "false");
     }
 
     /**
@@ -51,12 +32,13 @@ export default class AudioSystem {
      * @param loop 是否循环【默认循环】
      */
     public async playMusic(audio_name: AUDIO_NAME, loop: boolean = true) {
-        let asset = this._map_audio.get(audio_name);
-        if (!asset) {
-            asset = await mk.loader.load(AUDIO_PATH + audio_name, cc.AudioClip);
-            this._map_audio.set(audio_name, asset);
+        if(!this._switchMusic){
+            return;
         }
-        cc.audioEngine.playMusic(asset, loop);
+        if (!this._bg_audio) {
+            this._bg_audio = await mk.loader.load(AUDIO_PATH + audio_name, cc.AudioClip);
+        }
+        cc.audioEngine.playMusic(this._bg_audio, loop);
     }
 
     /**
@@ -65,14 +47,15 @@ export default class AudioSystem {
      * @param loop 是否循环【默认不循环】
      */
     public async playEffect(audio_name: AUDIO_NAME, loop: boolean = false) {
-        if (this._switchEffect && this._switchTempEffect) {
+        if (this._switchEffect) {
             let asset = this._map_audio.get(audio_name);
             if (!asset) {
                 asset = await mk.loader.load(AUDIO_PATH + audio_name, cc.AudioClip);
                 this._map_audio.set(audio_name, asset);
             }
-            cc.audioEngine.playEffect(asset, loop);
+            return cc.audioEngine.playEffect(asset, loop);
         }
+        return null;
     }
 
     /**
@@ -136,22 +119,15 @@ export default class AudioSystem {
         cc.audioEngine.stopAllEffects();
     }
 
-    /** 暂时开启关闭音效开关
-     * @param state true  打开  false 关闭
-     */
-    public setTempEffect(state: boolean) {
-        this._switchTempEffect = state;
-    }
-
     /**
      * 转换音乐按钮开关
      */
     public switchMusicFunc() {
         this._switchMusic = !this._switchMusic;
         if (!this._switchMusic) {
-            this.stopMusic();
+            this.setPauseMusic();
         } else {
-            this.playMusic('bgm');
+            this.setResumeMusic();
         }
         cc.sys.localStorage.setItem("switchMusic", this._switchMusic.toString());
     }

Некоторые файлы не были показаны из-за большого количества измененных файлов