0224995 2 kuukautta sitten
vanhempi
commit
fb8452c034

+ 497 - 35
assets/Scene/MainScene.scene

@@ -23,7 +23,7 @@
     "_active": true,
     "_components": [],
     "_prefab": {
-      "__id__": 110
+      "__id__": 123
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -54,7 +54,7 @@
     },
     "autoReleaseAssets": false,
     "_globals": {
-      "__id__": 111
+      "__id__": 124
     },
     "_id": "c72c6c69-975b-4f6b-a208-9d0dcde54d79"
   },
@@ -77,22 +77,22 @@
         "__id__": 54
       },
       {
-        "__id__": 99
+        "__id__": 112
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 106
+        "__id__": 119
       },
       {
-        "__id__": 107
+        "__id__": 120
       },
       {
-        "__id__": 108
+        "__id__": 121
       },
       {
-        "__id__": 109
+        "__id__": 122
       }
     ],
     "_prefab": null,
@@ -2144,13 +2144,13 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 96
+        "__id__": 109
       },
       {
-        "__id__": 97
+        "__id__": 110
       },
       {
-        "__id__": 98
+        "__id__": 111
       }
     ],
     "_prefab": null,
@@ -2988,6 +2988,10 @@
     },
     "_enabled": true,
     "__prefab": null,
+    "pre": {
+      "__uuid__": "a96db15c-95b1-4bd5-a35e-0c0ca100a03e",
+      "__expectedType__": "cc.Prefab"
+    },
     "_id": "f6gVdsoS9NeImn3q4Fpgfq"
   },
   {
@@ -3347,17 +3351,24 @@
     "_parent": {
       "__id__": 54
     },
-    "_children": [],
-    "_active": true,
-    "_components": [
+    "_children": [
       {
         "__id__": 93
+      }
+    ],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 105
       },
       {
-        "__id__": 94
+        "__id__": 106
       },
       {
-        "__id__": 95
+        "__id__": 107
+      },
+      {
+        "__id__": 108
       }
     ],
     "_prefab": null,
@@ -3390,6 +3401,445 @@
     },
     "_id": "4aPKhRYnJMiIodtXixPx1o"
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "Content",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 92
+    },
+    "_children": [
+      {
+        "__id__": 94
+      },
+      {
+        "__id__": 97
+      },
+      {
+        "__id__": 100
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 103
+      },
+      {
+        "__id__": 104
+      }
+    ],
+    "_prefab": null,
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": -80,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": "39kEfwjrBMIYTTc4EqfGeZ"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Arrow01",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 93
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 95
+      },
+      {
+        "__id__": 96
+      }
+    ],
+    "_prefab": null,
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -116,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": "fce5LZgK1G0rYnKu3R38Ox"
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 94
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 76,
+      "height": 78
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": "d8riuClVtMdYKjdU6FK+Dx"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 94
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "c2172ae4-51e8-4049-8638-a277f74bb203@a6951",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": "b8NMSmwjtG663ZM6uZ5DOt"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Ball01",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 93
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 98
+      },
+      {
+        "__id__": 99
+      }
+    ],
+    "_prefab": null,
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": "456TUh8kJP6LnpNbP68ZUU"
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 97
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 76,
+      "height": 78
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": "0fgYORFBlOu56f56wQd9Sp"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 97
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "a69bd085-9f4f-45e9-8ca7-2167e43b5daf@f11ab",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": "70ouRw8DtI54jzV4+kF38r"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "BStar01",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 93
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 101
+      },
+      {
+        "__id__": 102
+      }
+    ],
+    "_prefab": null,
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 116,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": "6dpLfxKldCR7/Hcc3EimAP"
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 100
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 76,
+      "height": 78
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": "b0u+BYwLpBd4UtQkjLDBl9"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 100
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "007e0eb8-63d0-4a03-8972-0f13c3e2a8df@cbd10",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": "f9HqXyDs9GvLIJ8Uk/yNNU"
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 93
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 308,
+      "height": 100
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": "34Fsgow8xKOI8hDzP9JloN"
+  },
+  {
+    "__type__": "cc.Layout",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 93
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_resizeMode": 1,
+    "_layoutType": 1,
+    "_cellSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 40
+    },
+    "_startAxis": 0,
+    "_paddingLeft": 0,
+    "_paddingRight": 0,
+    "_paddingTop": 0,
+    "_paddingBottom": 0,
+    "_spacingX": 40,
+    "_spacingY": 0,
+    "_verticalDirection": 1,
+    "_horizontalDirection": 0,
+    "_constraint": 0,
+    "_constraintNum": 2,
+    "_affectedByScale": false,
+    "_isAlign": false,
+    "_id": "e9uOcK6g5JnYNbVil0l2xG"
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -3474,6 +3924,18 @@
     },
     "_id": "7fFn/KUeVG+ZcOJO0poPT1"
   },
+  {
+    "__type__": "f4368D51SdMrazjBKElGawn",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 92
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_id": "25hKxthJ9KqKxDgjTTa/DS"
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -3550,16 +4012,16 @@
     },
     "_children": [
       {
-        "__id__": 100
+        "__id__": 113
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 104
+        "__id__": 117
       },
       {
-        "__id__": 105
+        "__id__": 118
       }
     ],
     "_prefab": null,
@@ -3598,19 +4060,19 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 99
+      "__id__": 112
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 101
+        "__id__": 114
       },
       {
-        "__id__": 102
+        "__id__": 115
       },
       {
-        "__id__": 103
+        "__id__": 116
       }
     ],
     "_prefab": null,
@@ -3649,7 +4111,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 100
+      "__id__": 113
     },
     "_enabled": true,
     "__prefab": null,
@@ -3671,7 +4133,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 100
+      "__id__": 113
     },
     "_enabled": true,
     "__prefab": null,
@@ -3710,7 +4172,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 100
+      "__id__": 113
     },
     "_enabled": true,
     "__prefab": null,
@@ -3740,7 +4202,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 99
+      "__id__": 112
     },
     "_enabled": true,
     "__prefab": null,
@@ -3762,7 +4224,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 99
+      "__id__": 112
     },
     "_enabled": true,
     "__prefab": null,
@@ -3883,28 +4345,28 @@
   {
     "__type__": "cc.SceneGlobals",
     "ambient": {
-      "__id__": 112
+      "__id__": 125
     },
     "shadows": {
-      "__id__": 113
+      "__id__": 126
     },
     "_skybox": {
-      "__id__": 114
+      "__id__": 127
     },
     "fog": {
-      "__id__": 115
+      "__id__": 128
     },
     "octree": {
-      "__id__": 116
+      "__id__": 129
     },
     "skin": {
-      "__id__": 117
+      "__id__": 130
     },
     "lightProbeInfo": {
-      "__id__": 118
+      "__id__": 131
     },
     "postSettings": {
-      "__id__": 119
+      "__id__": 132
     },
     "bakedWithStationaryMainLight": false,
     "bakedWithHighpLightmap": false

+ 49 - 0
assets/Script/Game/GameFrameWork/CardMgr.ts

@@ -0,0 +1,49 @@
+import { _decorator, Component, Node, Sprite, UITransform, Vec2, Vec3, view } from 'cc';
+import { ModulerBase } from './ModulerBase';
+const { ccclass, property } = _decorator;
+
+@ccclass('CardMgr')
+export class CardMgr extends ModulerBase {
+    private _cards: Sprite[] = [];
+    init(): void {
+        this._cards = this.getComponentsInChildren(Sprite);
+    }
+    start() {
+
+    }
+
+    update(deltaTime: number) {
+        
+    }
+
+    touchCard(pos: Vec2):boolean{
+        for(const sprite of this._cards){
+            const box = sprite.getComponent(UITransform).getBoundingBoxToWorld();
+            if(box.contains(pos)){
+                this.hide();
+                return true;
+            }
+        }
+        return false;
+
+    }
+    show(pos: Vec3): boolean{
+        //view.getVisibleSize().width;
+        //view.getVisibleSize().height;
+        if(this.node.active){
+            this.hide();
+            return true;
+
+        }
+        this.node.setPosition(pos);
+        this.node.active = true;
+        return false;
+    }
+
+    hide(){
+        this.node.active = false;
+
+    }
+}
+
+

+ 9 - 0
assets/Script/Game/GameFrameWork/CardMgr.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.23",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "f43680f9-d527-4cad-ace3-04a12519ac27",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 1 - 1
assets/Script/Game/GameFrameWork/GameMgr.ts

@@ -48,7 +48,7 @@ export class GameMgr extends Component {
 
     }
     start() {
-        
+        this.startGame();
     }
     
     update(deltaTime: number) {

+ 22 - 1
assets/Script/Game/GameFrameWork/MapMgr.ts

@@ -1,4 +1,4 @@
-import { _decorator, Size, TiledMap, TiledObjectGroup, Vec3 } from 'cc';
+import { _decorator, Size, TiledMap, TiledObjectGroup, Vec2, Vec3 } from 'cc';
 import { ModulerBase } from './ModulerBase';
 import { ObstacleMgr } from './ObstacleMgr';
 const { ccclass, property } = _decorator;
@@ -57,6 +57,27 @@ export class MapMgr extends ModulerBase {
         )
     }
 
+    getCenterByPos(pos: Vec2): Vec3{
+        //计算点击到了第几行 第几列格子
+
+        return this.getPosByTiled(this.getTiledByPos(pos));
+    }
+
+    getPosByTiled(tiled: Vec2): Vec3{
+        const x = (tiled.x + 0.5) * this._tiledSize.width;
+        const y = (tiled.y + 0.5) * this._tiledSize.height;
+
+        return new Vec3(x,y);
+    }
+
+    //获取某个坐标在地图的第几行 第几列的格子
+    getTiledByPos(pos: Vec2): Vec2{
+        const x = Math.floor(pos.x / this._tiledSize.width);
+        const y = Math.floor(pos.y / this._tiledSize.height);
+
+        return new Vec2(x,y); 
+    }
+
     getPath(): Vec3[]{
         return this._pathPoints;
     }

+ 18 - 7
assets/Script/Game/GameFrameWork/TouchMgr.ts

@@ -1,15 +1,26 @@
-import { _decorator, Component, Node } from 'cc';
+import { _decorator, Component, Node, Vec2, Vec3 } from 'cc';
 import { ModulerBase } from './ModulerBase';
+import { MapMgr } from './MapMgr';
+import { CardMgr } from './CardMgr';
+import { TowerMgr } from './TowerMgr';
 const { ccclass, property } = _decorator;
 
 @ccclass('TouchMgr')
 export class TouchMgr extends ModulerBase {
-    start() {
-
-    }
-
-    update(deltaTime: number) {
-        
+    private _towerPos: Vec3 = null;
+    init(): void{
+        this.node.on(Node.EventType.TOUCH_START,(e)=>{
+            const touchPos: Vec2 = e.getUILocation();
+            const pos: Vec3 = this.getModuler(MapMgr).getCenterByPos(touchPos);
+            if(this.getModuler(CardMgr).touchCard(touchPos)){
+                this.getModuler(TowerMgr).creatTower(this._towerPos);
+                return;
+            }
+            if(!this.getModuler(CardMgr).show(pos)){
+                this._towerPos = pos;
+                return;
+            }
+        })
     }
 }
 

+ 9 - 2
assets/Script/Game/GameFrameWork/TowerMgr.ts

@@ -1,4 +1,4 @@
-import { _decorator } from 'cc';
+import { _decorator, instantiate, Prefab, Vec3 } from 'cc';
 import { ModulerBase } from './ModulerBase';
 import { GameMgr } from './GameMgr';
 import { MapMgr } from './MapMgr';
@@ -6,9 +6,16 @@ const { ccclass, property } = _decorator;
 
 @ccclass('TowerMgr')
 export class TowerMgr extends ModulerBase {
+    @property(Prefab)
+    pre: Prefab = null;
     start() {
         //GameMgr.Instance.getModuler(MapMgr).test();
-        this.getModuler(MapMgr).test();
+        //this.getModuler(MapMgr).test();
+    }
+    creatTower(pos: Vec3){
+        const node = instantiate(this.pre);
+        node.setPosition(pos);
+        node.parent = this.node;
     }
     protected clearSelf(): void {
         

+ 146 - 0
assets/resources/Prefab/Tower.prefab

@@ -0,0 +1,146 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "Tower",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "persistent": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Tower",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": null,
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": {
+      "__id__": 6
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 3
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 66,
+      "height": 66
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "9anUKReONDNJ4bdjdC6era"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 5
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "c2172ae4-51e8-4049-8638-a277f74bb203@b2cc7",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "4fIw2zhLNLBYp4yyfUIXW1"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "99eDxpLMtMIIuOQikWraFN",
+    "targetOverrides": null
+  }
+]

+ 13 - 0
assets/resources/Prefab/Tower.prefab.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.50",
+  "importer": "prefab",
+  "imported": true,
+  "uuid": "a96db15c-95b1-4bd5-a35e-0c0ca100a03e",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {
+    "syncNodeName": "Tower"
+  }
+}