فهرست منبع

场景加入游戏 可以拖动

kaka 4 سال پیش
والد
کامیت
8e58d90721

+ 12 - 0
assets/resources/animation/Main.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "be1fccbf-ec57-4137-81e6-a4e98c84b0db",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 180 - 156
assets/resources/game/coregame/coregame.prefab


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 129 - 255
assets/resources/game/prefab/game.prefab


BIN
assets/resources/game/texture/btn/button.png


+ 0 - 36
assets/resources/game/texture/btn/button.png.meta

@@ -1,36 +0,0 @@
-{
-  "ver": "2.3.5",
-  "uuid": "be3e2064-46a5-4e7e-addd-03598fbe0a7d",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "genMipmaps": false,
-  "packable": true,
-  "width": 343,
-  "height": 127,
-  "platformSettings": {},
-  "subMetas": {
-    "button": {
-      "ver": "1.0.4",
-      "uuid": "af1f5888-985e-490b-9942-6d933bb8f95f",
-      "rawTextureUuid": "be3e2064-46a5-4e7e-addd-03598fbe0a7d",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 0,
-      "trimY": 0,
-      "width": 343,
-      "height": 127,
-      "rawWidth": 343,
-      "rawHeight": 127,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

+ 0 - 146
assets/resources/spine/game/changjing.atlas

@@ -1,146 +0,0 @@
-
-changjing.png
-size: 2041,1011
-format: RGBA8888
-filter: Linear,Linear
-repeat: none
-背景/changjing
-  rotate: true
-  xy: 2, 2
-  size: 750, 2037
-  orig: 750, 2037
-  offset: 0, 0
-  index: -1
-背景/shu
-  rotate: true
-  xy: 904, 754
-  size: 182, 294
-  orig: 182, 294
-  offset: 0, 0
-  index: -1
-背景/wave1
-  rotate: false
-  xy: 373, 954
-  size: 278, 55
-  orig: 300, 300
-  offset: 12, 86
-  index: -1
-背景/wave2
-  rotate: false
-  xy: 603, 851
-  size: 299, 94
-  orig: 300, 300
-  offset: 1, 51
-  index: -1
-背景/wave3
-  rotate: false
-  xy: 303, 869
-  size: 298, 83
-  orig: 300, 300
-  offset: 2, 62
-  index: -1
-背景/wave4
-  rotate: false
-  xy: 2, 877
-  size: 299, 76
-  orig: 300, 300
-  offset: 1, 69
-  index: -1
-背景/wave5
-  rotate: false
-  xy: 1548, 934
-  size: 300, 75
-  orig: 300, 300
-  offset: 0, 73
-  index: -1
-背景/wave6
-  rotate: false
-  xy: 1248, 937
-  size: 298, 72
-  orig: 300, 300
-  offset: 2, 76
-  index: -1
-背景/wave7
-  rotate: false
-  xy: 949, 938
-  size: 297, 71
-  orig: 300, 300
-  offset: 3, 79
-  index: -1
-背景/wave8
-  rotate: false
-  xy: 653, 947
-  size: 294, 62
-  orig: 300, 300
-  offset: 6, 80
-  index: -1
-背景/xie1
-  rotate: false
-  xy: 297, 955
-  size: 74, 54
-  orig: 78, 56
-  offset: 2, 1
-  index: -1
-背景/xie10
-  rotate: false
-  xy: 193, 980
-  size: 102, 29
-  orig: 108, 34
-  offset: 3, 3
-  index: -1
-背景/xie2
-  rotate: true
-  xy: 126, 986
-  size: 23, 32
-  orig: 23, 32
-  offset: 0, 0
-  index: -1
-背景/xie3
-  rotate: true
-  xy: 160, 986
-  size: 23, 31
-  orig: 23, 31
-  offset: 0, 0
-  index: -1
-背景/xie4
-  rotate: true
-  xy: 87, 994
-  size: 15, 17
-  orig: 18, 19
-  offset: 2, 1
-  index: -1
-背景/xie5
-  rotate: true
-  xy: 48, 995
-  size: 14, 17
-  orig: 17, 20
-  offset: 1, 1
-  index: -1
-背景/xie6
-  rotate: false
-  xy: 106, 994
-  size: 18, 15
-  orig: 21, 17
-  offset: 2, 1
-  index: -1
-背景/xie7
-  rotate: false
-  xy: 67, 995
-  size: 18, 14
-  orig: 21, 17
-  offset: 1, 1
-  index: -1
-背景/xie8
-  rotate: false
-  xy: 2, 1001
-  size: 21, 8
-  orig: 24, 10
-  offset: 2, 1
-  index: -1
-背景/xie9
-  rotate: false
-  xy: 25, 1001
-  size: 21, 8
-  orig: 24, 10
-  offset: 1, 1
-  index: -1

+ 0 - 5
assets/resources/spine/game/changjing.atlas.meta

@@ -1,5 +0,0 @@
-{
-  "ver": "1.0.1",
-  "uuid": "de6d99fc-0c32-4fa7-b9ca-137eda682b31",
-  "subMetas": {}
-}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 441
assets/resources/spine/game/changjing.json


+ 0 - 9
assets/resources/spine/game/changjing.json.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.2.3",
-  "uuid": "8fbd7e3c-7aa6-4f14-8950-fad61df23914",
-  "textures": [
-    "c17a5060-6dda-4de7-843c-5fd4f3062899"
-  ],
-  "scale": 1,
-  "subMetas": {}
-}

BIN
assets/resources/spine/game/changjing.png


+ 0 - 36
assets/resources/spine/game/changjing.png.meta

@@ -1,36 +0,0 @@
-{
-  "ver": "2.3.5",
-  "uuid": "c17a5060-6dda-4de7-843c-5fd4f3062899",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "genMipmaps": false,
-  "packable": true,
-  "width": 2041,
-  "height": 1011,
-  "platformSettings": {},
-  "subMetas": {
-    "changjing": {
-      "ver": "1.0.4",
-      "uuid": "feb1b101-5471-4867-9ff9-788d7ea47f99",
-      "rawTextureUuid": "c17a5060-6dda-4de7-843c-5fd4f3062899",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 2,
-      "trimY": 2,
-      "width": 2037,
-      "height": 1007,
-      "rawWidth": 2041,
-      "rawHeight": 1011,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

+ 0 - 244
assets/resources/spine/game/pandan.atlas

@@ -1,244 +0,0 @@
-
-pandan.png
-size: 1848,400
-format: RGBA8888
-filter: Linear,Linear
-repeat: none
-baoxiang
-  rotate: true
-  xy: 692, 162
-  size: 236, 191
-  orig: 236, 191
-  offset: 0, 0
-  index: -1
-body
-  rotate: false
-  xy: 468, 147
-  size: 222, 251
-  orig: 222, 251
-  offset: 0, 0
-  index: -1
-ditan
-  rotate: false
-  xy: 1050, 2
-  size: 464, 164
-  orig: 464, 164
-  offset: 0, 0
-  index: -1
-dudou
-  rotate: true
-  xy: 1113, 238
-  size: 160, 129
-  orig: 162, 131
-  offset: 1, 1
-  index: -1
-erduo
-  rotate: true
-  xy: 310, 37
-  size: 361, 156
-  orig: 361, 156
-  offset: 0, 0
-  index: -1
-eye1-1
-  rotate: true
-  xy: 566, 8
-  size: 137, 145
-  orig: 144, 154
-  offset: 5, 4
-  index: -1
-eye1-2
-  rotate: true
-  xy: 1244, 246
-  size: 152, 151
-  orig: 156, 158
-  offset: 2, 3
-  index: -1
-eye2-1
-  rotate: true
-  xy: 1496, 169
-  size: 97, 110
-  orig: 99, 112
-  offset: 1, 1
-  index: -1
-eye2-2
-  rotate: false
-  xy: 468, 37
-  size: 96, 108
-  orig: 98, 110
-  offset: 1, 1
-  index: -1
-eye2-3
-  rotate: false
-  xy: 1490, 268
-  size: 122, 130
-  orig: 124, 132
-  offset: 1, 1
-  index: -1
-eye3-1
-  rotate: false
-  xy: 1089, 171
-  size: 118, 59
-  orig: 120, 61
-  offset: 1, 1
-  index: -1
-eye3-2
-  rotate: false
-  xy: 1209, 177
-  size: 101, 59
-  orig: 103, 61
-  offset: 1, 1
-  index: -1
-eye4-4
-  rotate: false
-  xy: 1516, 37
-  size: 122, 130
-  orig: 125, 132
-  offset: 2, 1
-  index: -1
-face
-  rotate: true
-  xy: 2, 21
-  size: 377, 306
-  orig: 377, 306
-  offset: 0, 0
-  index: -1
-jinbi
-  rotate: false
-  xy: 480, 12
-  size: 58, 23
-  orig: 59, 23
-  offset: 0, 0
-  index: -1
-jinbi1
-  rotate: false
-  xy: 1640, 113
-  size: 76, 55
-  orig: 76, 55
-  offset: 0, 0
-  index: -1
-meimao1
-  rotate: false
-  xy: 349, 10
-  size: 67, 25
-  orig: 70, 27
-  offset: 1, 1
-  index: -1
-meimao2
-  rotate: false
-  xy: 418, 12
-  size: 60, 23
-  orig: 62, 25
-  offset: 1, 1
-  index: -1
-naiping
-  rotate: false
-  xy: 833, 7
-  size: 215, 153
-  orig: 217, 155
-  offset: 1, 1
-  index: -1
-naizui
-  rotate: true
-  xy: 1608, 170
-  size: 96, 116
-  orig: 99, 118
-  offset: 1, 1
-  index: -1
-shou2
-  rotate: false
-  xy: 1397, 252
-  size: 91, 146
-  orig: 97, 148
-  offset: 1, 1
-  index: -1
-shou3
-  rotate: true
-  xy: 713, 6
-  size: 154, 118
-  orig: 156, 120
-  offset: 1, 1
-  index: -1
-toufa
-  rotate: false
-  xy: 957, 168
-  size: 130, 60
-  orig: 133, 63
-  offset: 1, 2
-  index: -1
-tui1
-  rotate: false
-  xy: 1733, 65
-  size: 112, 96
-  orig: 114, 98
-  offset: 1, 1
-  index: -1
-tui2
-  rotate: true
-  xy: 1614, 268
-  size: 130, 92
-  orig: 132, 94
-  offset: 1, 1
-  index: -1
-xing
-  rotate: true
-  xy: 310, 3
-  size: 32, 37
-  orig: 36, 41
-  offset: 2, 2
-  index: -1
-youshou_1
-  rotate: false
-  xy: 957, 230
-  size: 77, 168
-  orig: 78, 174
-  offset: 0, 6
-  index: -1
-youshouzhang
-  rotate: true
-  xy: 1312, 168
-  size: 76, 90
-  orig: 76, 90
-  offset: 0, 0
-  index: -1
-yy
-  rotate: true
-  xy: 885, 182
-  size: 216, 70
-  orig: 216, 70
-  offset: 0, 0
-  index: -1
-zui1-2
-  rotate: true
-  xy: 1726, 163
-  size: 105, 120
-  orig: 115, 125
-  offset: 3, 4
-  index: -1
-zui1-3
-  rotate: true
-  xy: 1640, 6
-  size: 105, 91
-  orig: 115, 96
-  offset: 3, 4
-  index: -1
-zui2-1
-  rotate: true
-  xy: 1708, 270
-  size: 128, 120
-  orig: 138, 125
-  offset: 5, 4
-  index: -1
-zuoshou_1
-  rotate: false
-  xy: 1036, 232
-  size: 75, 166
-  orig: 78, 174
-  offset: 3, 8
-  index: -1
-zuoshouzhang
-  rotate: true
-  xy: 1404, 174
-  size: 76, 90
-  orig: 76, 90
-  offset: 0, 0
-  index: -1

+ 0 - 5
assets/resources/spine/game/pandan.atlas.meta

@@ -1,5 +0,0 @@
-{
-  "ver": "1.0.1",
-  "uuid": "08a37bfb-eaa0-4f86-bdd1-2ea7b4a30aa6",
-  "subMetas": {}
-}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 132
assets/resources/spine/game/pandan.json


+ 0 - 9
assets/resources/spine/game/pandan.json.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.2.3",
-  "uuid": "8f090d5d-cfa1-40d6-bcce-014cc1aa881e",
-  "textures": [
-    "7eb051c7-86cb-4fe4-b61a-de17da221812"
-  ],
-  "scale": 1,
-  "subMetas": {}
-}

BIN
assets/resources/spine/game/pandan.png


+ 0 - 36
assets/resources/spine/game/pandan.png.meta

@@ -1,36 +0,0 @@
-{
-  "ver": "2.3.5",
-  "uuid": "7eb051c7-86cb-4fe4-b61a-de17da221812",
-  "type": "sprite",
-  "wrapMode": "clamp",
-  "filterMode": "bilinear",
-  "premultiplyAlpha": false,
-  "genMipmaps": false,
-  "packable": true,
-  "width": 1848,
-  "height": 400,
-  "platformSettings": {},
-  "subMetas": {
-    "pandan": {
-      "ver": "1.0.4",
-      "uuid": "0b5b282f-f636-47a6-bbf2-4238e017f1d7",
-      "rawTextureUuid": "7eb051c7-86cb-4fe4-b61a-de17da221812",
-      "trimType": "auto",
-      "trimThreshold": 1,
-      "rotated": false,
-      "offsetX": 0,
-      "offsetY": 0,
-      "trimX": 3,
-      "trimY": 2,
-      "width": 1842,
-      "height": 396,
-      "rawWidth": 1848,
-      "rawHeight": 400,
-      "borderTop": 0,
-      "borderBottom": 0,
-      "borderLeft": 0,
-      "borderRight": 0,
-      "subMetas": {}
-    }
-  }
-}

+ 22 - 22
assets/script/before/main/FarmIcon.ts

@@ -99,28 +99,28 @@ export class FarmIcon extends cc.Component {
         }
     }
     public async onTouch() {
-        // if (this.state != FarmState.Lock) {
-        //     if (this.state == FarmState.Empty) {
-        //         var sound = this.getComponent(Sound);
-        //         sound && sound.play();
-        //         this.getComponent(OpenWindow).open(this.configID);
-        //     } else if (this.state == FarmState.Growing) {
-        //         this.countDown.setCountActive(true);
-        //     } else if (this.state == FarmState.Ripe) {
-        //         WindowManager.open("Prefabs/HarvestWindow", WindowOpenMode.CloseAndCover, this.configID, this.onHarvest.bind(this));
-        //     }
-        // } else {
-        //     let config = gData.configData.configMap.get("build")[this.configID];
-        //     if (config["unlockVideo"] != 1) {
-        //         let lvl = config["lvl"];
-        //         mk.tip.pop(`${lvl}级解锁`);
-        //     } else {
-        //         if (g.gameData.hasBuildData(this.configID - 1)) {
-        //             WindowManager.open("Prefabs/ADUnlockWindow", WindowOpenMode.CloseAndCover, this.configID);
-        //             platform.umUp("videoExpansion");//视频扩充埋点
-        //         }
-        //     }
-        // }
+        if (this.state != FarmState.Lock) {
+            if (this.state == FarmState.Empty) {
+                // var sound = this.getComponent(Sound);
+                // sound && sound.play();
+                // this.getComponent(OpenWindow).open(this.configID);
+            } else if (this.state == FarmState.Growing) {
+                // this.countDown.setCountActive(true);
+            } else if (this.state == FarmState.Ripe) {
+                // WindowManager.open("Prefabs/HarvestWindow", WindowOpenMode.CloseAndCover, this.configID, this.onHarvest.bind(this));
+            }
+        } else {
+            let config = gData.configData.configMap.get("build")[this.configID];
+            if (config["unlockVideo"] != 1) {
+                let lvl = config["lvl"];
+                mk.tip.pop(`${lvl}级解锁`);
+            } else {
+                if (gData.gameData.hasBuildData(this.configID - 1)) {
+                    // WindowManager.open("Prefabs/ADUnlockWindow", WindowOpenMode.CloseAndCover, this.configID);
+                    // platform.umUp("videoExpansion");//视频扩充埋点
+                }
+            }
+        }
     }
 
     public onHarvest(): void {

+ 2 - 2
assets/script/before/main/FarmSystem.ts

@@ -58,9 +58,9 @@ export class FarmSystem extends cc.Component {
             this.isMoved = false;
         }
     }
-    private onTouchMove(e) {
+    private onTouchMove(e: cc.Event.EventTouch) {
         // this.closeWindow();
-        if (e.getAllTouches().length > 1) { this.isMoved = true; return }
+        if (e.getTouches().length > 1) { this.isMoved = true; return }
         this.isMoved = cc.Vec2.distance(e.getStartLocation(), e.getLocation()) > 20;
     }
     private closeWindow() {

+ 3 - 3
assets/script/before/main/TouchHelper.ts

@@ -44,11 +44,11 @@ export class TouchHelper extends cc.Component {
         }
         this.isMoved = false;
     }
-    private onTouchMove(e) {
-        if (e.getAllTouches().length > 1) { this.isMoved = true; return }
+    private onTouchMove(e: cc.Event.EventTouch) {
+        if (e.getTouches().length > 1) { this.isMoved = true; return }
         this.isMoved = cc.Vec2.distance(e.getStartLocation(), e.getLocation()) > 20;
     }
-    private onTouchCancel(e) {
+    private onTouchCancel(e: cc.Event.EventTouch) {
         this.isMoved = false;
     }
 

+ 10 - 10
assets/script/before/map/MapMove.ts

@@ -8,11 +8,11 @@ const { ccclass, property } = cc._decorator;
 @ccclass
 export class MapMove extends cc.Component {
     @property({ type: cc.Node, tooltip: "地图容器" }) map: cc.Node = null;
-    
+
     private canvas: cc.Node = null;
     private startPoint: cc.Vec2;
     start() {
-        this.canvas = cc.find('canvas');
+        this.canvas = cc.find('Canvas');
         this.node.on(cc.Node.EventType.TOUCH_START, this.onMapTouchBegin, this);
     }
 
@@ -28,13 +28,13 @@ export class MapMove extends cc.Component {
         this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
     }
 
-    private onTouchMove(e): void {
-        let touches = e.getAllTouches();
+    private onTouchMove(e: cc.Event.EventTouch): void {
+        let touches = e.getTouches();
         if (touches.length == 1) {
             if (this.isDoubleTouch) {
                 return;
             }
-            let point = e.touch._point;
+            let point = e.touch.getLocation();
             let offsetX = point.x - this.startPoint.x;
             let offsetY = point.y - this.startPoint.y;
             this.move(new cc.Vec2(offsetX, offsetY));
@@ -54,12 +54,12 @@ export class MapMove extends cc.Component {
         }
     }
 
-    private onTouchEnd(e): void {
+    private onTouchEnd(e: cc.Event.EventTouch): void {
         this.startPoint = cc.Vec2.ZERO;
         this.node.off(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
         this.node.off(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
         this.node.off(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
-        if (e.getAllTouches().length == 0) {
+        if (e.getTouches().length == 0) {
             this.isDoubleTouch = false;
         }
     }
@@ -80,8 +80,8 @@ export class MapMove extends cc.Component {
     }
     /**确认移动到的坐标是否合法 */
     private confirmPosition(pos: cc.Vec2): cc.Vec3 {
-        let clampX = Util.clamp(pos.x, -(this.canvas.width * (this.map.scaleX - 0.2) / 2 - this.canvas.width / 2), this.canvas.width * (this.map.scaleX - 0.2) / 2 - this.canvas.width / 2);
-        let clampY = Util.clamp(pos.y, -(this.canvas.height * (this.map.scaleY - 0.2) / 2 - this.canvas.height / 2), this.canvas.height * (this.map.scaleY - 0.2) / 2 - this.canvas.height / 2);
+        let clampX = Util.clamp(pos.x, -(this.map.width * (this.map.scaleX - 0.2) / 2 - this.canvas.width / 2), this.map.width * (this.map.scaleX - 0.2) / 2 - this.canvas.width / 2);
+        let clampY = Util.clamp(pos.y, -(this.map.height * (this.map.scaleY - 0.2) / 2 - this.canvas.height / 2), this.map.height * (this.map.scaleY - 0.2) / 2 - this.canvas.height / 2);
         return new cc.Vec3(clampX, clampY, 0);
     }
 
@@ -90,6 +90,6 @@ export class MapMove extends cc.Component {
         let toPoint = new cc.Vec2(-pos.x * this.map.scaleX, -pos.y * this.map.scaleY);
         cc.tween(this.node).to(0.5, { position: this.confirmPosition(toPoint) }, { easing: "sineOut" }).start();
     }
-    
+
 }
 

+ 12 - 0
assets/script/before/view/ui.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "71ec4ef3-838b-4699-9ef6-3126eb87a343",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 0 - 64
assets/script/game/component/TouchHelper.ts

@@ -1,64 +0,0 @@
-
-// import { _decorator, Component, Vec2, SystemEventType, EventTouch, UITransform, EventHandler, Vec3, v3 } from 'cc';
-const { ccclass, property } = cc._decorator;
-/**
- * @description 触摸辅助器,支持多边形区域点击检测,并且添加ceator不带有的tap事件
- * @author Soonsky
- */
-@ccclass//('TouchHelper')
-export class TouchHelper extends cc.Component {
-    @property({ tooltip: "是否可以点击" }) canTouch: boolean = true;
-    @property({ tooltip: "在多边形范围内产生点击", type: cc.Component.EventHandler }) onInPolygon: cc.Component.EventHandler = new cc.Component.EventHandler();
-    @property({ tooltip: "在多边形范围外产生点击", type: cc.Component.EventHandler }) onOutPolygon: cc.Component.EventHandler = new cc.Component.EventHandler();
-    @property({ tooltip: "在节点范围内产生点击", type: cc.Component.EventHandler }) onTouchTap: cc.Component.EventHandler = new cc.Component.EventHandler();
-    @property({ tooltip: "是否与需要多边形检查" }) needPolygon: boolean = false;
-    @property({ type: [cc.Vec2], tooltip: "多边形定点位置信息(局部坐标,至少3个点)" }) points: Array<cc.Vec2> = [];
-    // @property({ tooltip: "点击在多边形区域内时是否阻止事件冒泡" }) stopPropagation = false;// 无效且报错
-
-    private isMoved = false;
-    start() {
-        this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
-        this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchCancel, this);
-        this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
-    }
-
-    private onTouchEnd(e: cc.Touch): void {
-        if (this.canTouch && this.needPolygon && this.points.length >= 3) {
-            let touchPoint = e.getLocation();
-            let localPoint = this.node.convertToNodeSpaceAR(new cc.Vec2(touchPoint.x, touchPoint.y));
-            let result = this.pointInPoly(localPoint, this.points);
-            if (!this.isMoved) {
-                if (result) {
-                    // if (this.stopPropagation) {
-                    //     e.propagationStopped = true;
-                    // }
-                    this.canTouch && this.onInPolygon && this.onInPolygon.emit([]);
-                } else {
-                    this.canTouch && this.onOutPolygon && this.onOutPolygon.emit([]);
-                }
-            }
-        }
-        if (this.canTouch) {
-            if (!this.isMoved) {
-                this.canTouch && this.onTouchTap && this.onTouchTap.emit([]);
-            }
-        }
-        this.isMoved = false;
-    }
-    private onTouchMove(e: cc.Event.EventTouch) {
-        if (e.getTouches().length > 1) { this.isMoved = true; return }// getAllTouches
-        this.isMoved = cc.Vec2.distance(e.getStartLocation(), e.getLocation()) > 20;
-    }
-    private onTouchCancel(e: cc.Event.EventTouch) {
-        this.isMoved = false;
-    }
-
-    private pointInPoly(point: cc.Vec2 | cc.Vec3, polyPoints: cc.Vec2[]) {
-        for (var c = false, i = -1, l = polyPoints.length, j = l - 1; ++i < l; j = i)
-            ((polyPoints[i].y <= point.y && point.y < polyPoints[j].y) || (polyPoints[j].y <= point.y && point.y < polyPoints[i].y))
-                && (point.x < (polyPoints[j].x - polyPoints[i].x) * (point.y - polyPoints[i].y) / (polyPoints[j].y - polyPoints[i].y) + polyPoints[i].x)
-                && (c = !c);
-        return c;
-    }
-}
-

+ 0 - 9
assets/script/game/component/TouchHelper.ts.meta

@@ -1,9 +0,0 @@
-{
-  "ver": "1.0.8",
-  "uuid": "207f522f-4706-4619-b3ae-7461786df938",
-  "isPlugin": false,
-  "loadPluginInWeb": true,
-  "loadPluginInNative": true,
-  "loadPluginInEditor": false,
-  "subMetas": {}
-}

+ 0 - 2
assets/script/game/game/Game.ts

@@ -44,8 +44,6 @@ export default class Game extends cc.Component {
     @property({ type: cc.Node, displayName: "气泡红包3" })
     btn_getRed3: cc.Node = null;
 
-    @property({ type: cc.Button, displayName: "开始游戏" })
-    btn_start: cc.Button = null;
     @property({ type: cc.Node, displayName: "红包币图标" })
     icon_hb: cc.Node = null;
     @property({ type: cc.Node, displayName: "金猪币图标" })

+ 8 - 3
assets/script/game/module/login/Login.ts

@@ -23,6 +23,7 @@ export default class Login extends cc.Component {
 
     /** 热更脚本(onLoad应先于Login) */
     public hotUpdatePanel: HotUpdatePanel = null;
+    private addCoreGame = false;
 
     onLoad() {
         this.setProgress(0);
@@ -59,10 +60,8 @@ export default class Login extends cc.Component {
                     mk.storage.setStorage("agreementTip", 1, false);
                 }
                 else {
-                    let mainNode = cc.find('Canvas/主容器');
-                    // let coreGame = mk.loader.load
-                    // mainNode.addChild()
                     mk.ui.openPanel("game/prefab/game");
+                    this.loadMain();
                     console.log("===[Jsbsystem 显示开屏广告================================")
                     JsbSystem.showSplash();
                 }
@@ -75,6 +74,12 @@ export default class Login extends cc.Component {
         }
     }
 
+    async loadMain() {
+        let mainNode = cc.find('Canvas/主容器');
+        let coreGame = await mk.loader.load('game/coregame/coregame', cc.Prefab);
+        mainNode.addChild(cc.instantiate(coreGame));
+    }
+
     /** 设置进度 */
     private setProgress(current) {
         this.bar.setProgress(current);

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است