0224995 1 сар өмнө
parent
commit
fe9658a07e

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 219 - 134
assets/Scene/MainScene.scene


+ 3 - 0
assets/Script/DataItem/ItemData.ts

@@ -14,6 +14,9 @@ export interface TowerData extends DataBase{
     bulletAniImg: string,
     bulletAniCount: number,
     cardImg: string[],
+    atkRadiums: number[],
+    rotate: boolean,
+    fireType: string
 }
 
 export interface LevelData extends DataBase{

+ 1 - 1
assets/Script/Frames/DataManager.ts

@@ -36,7 +36,7 @@ class DataCtrl{
                 let v;
                 switch(types[j]){
                     case "boolean":
-                        v = Boolean(val);
+                        v = Boolean(Number(val));
                         break;
                     case "string":
                         v = val;

+ 28 - 0
assets/Script/Game/Bullet.ts

@@ -0,0 +1,28 @@
+import { _decorator, AnimationClip, Component, Node, Sprite, SpriteFrame, Vec3 } from 'cc';
+import { Tools } from './Tools/Tools';
+const { ccclass, property } = _decorator;
+
+@ccclass('Bullet')
+export class Bullet extends Component {
+    start() {
+
+    }
+
+    init(pos: Vec3, angle: number, frames: SpriteFrame[]) {
+        this.node.setPosition(pos);
+        this.node.angle = angle;
+        if(frames.length === 1){
+            this.getComponent(Sprite).spriteFrame = frames[0];
+            return;
+        }
+        
+        const ani = Tools.createAnimation(frames, 25, this.node, AnimationClip.WrapMode.Loop);
+        ani.play();
+
+    }
+    update(deltaTime: number) {
+        this.node.translate(new Vec3(0, 5));
+    }
+}
+
+

+ 0 - 0
assets/Script/Game/GameFrameWork/Bullet.ts.meta → assets/Script/Game/Bullet.ts.meta


+ 0 - 14
assets/Script/Game/GameFrameWork/Bullet.ts

@@ -1,14 +0,0 @@
-import { _decorator, Component, Node } from 'cc';
-const { ccclass, property } = _decorator;
-
-@ccclass('Bullet')
-export class Bullet extends Component {
-    start() {
-
-    }
-
-    update(deltaTime: number) {
-        
-    }
-}
-


+ 11 - 2
assets/Script/Game/GameFrameWork/BulletMgr.ts

@@ -1,10 +1,19 @@
-import { _decorator, Component, Node } from 'cc';
+import { _decorator, Component, instantiate, Node, SpriteFrame, Vec3 } from 'cc';
 import { ModulerBase } from './ModulerBase';
+import { resMgr } from '../../Frames/ResourcesMgr';
+import { Bullet } from '../Bullet';
 const { ccclass, property } = _decorator;
 
 @ccclass('BulletMgr')
 export class BulletMgr extends ModulerBase {
-    
+
+    createBullet(pos : Vec3, angle: number, frames: SpriteFrame[]){
+        const bulletNode: Node = instantiate(resMgr.getPrefab("Bullet"));
+        bulletNode.parent = this.node;
+        bulletNode.getComponent(Bullet).init(pos, angle, frames);
+        // bulletNode.setPosition(pos);
+        // bulletNode.angle = angle;
+    }
 }
 
 

+ 74 - 0
assets/Script/Game/GameFrameWork/InsTower.ts

@@ -0,0 +1,74 @@
+import { _decorator, animation, Animation, AnimationClip, macro, Node, Sprite, tween } from 'cc';
+import { Tower } from '../Tower';
+import { GameMgr } from './GameMgr';
+import { BulletMgr } from './BulletMgr';
+import { Tools } from '../Tools/Tools';
+const { ccclass, property } = _decorator;
+@ccclass('InsTower')
+
+//发射子弹类型的塔
+export class ShootTower extends Tower {
+    protected _attack(): void {
+        //发射子弹
+        // this.schedule(() => {
+            //this._ani.play();
+            // this._ani.on(Animation.EventType.FINISHED,()=>{
+            //     GameMgr.Instance.getModuler(BulletMgr).createBullet(
+            //         this.node.position, this._targetAngle, this._bulletFrames);
+            // })
+        // }, 1, macro.REPEAT_FOREVER, 0)
+    }
+
+    protected stopAttack(): void {
+        this.unscheduleAllCallbacks();
+    }
+}
+
+//太阳
+export class ExpandTower extends Tower {
+    private _weapon: Animation = null;
+    protected _attack(): void {
+        if (!this._weapon) {
+            // 创建动画
+            const node = Tools.createSprite(null, this.node);
+            this._weapon = Tools.createAnimation(this._bulletFrames, 15, node);
+            node.active = false;
+            // const node = new Node();
+            // node.addComponent(Sprite);
+            // this._weapon = node.addComponent(Animation)
+            // //添加动画剪辑
+            // const clip = AnimationClip.createWithSpriteFrames(this._bulletFrames, 15);
+            // this._weapon.addClip(clip);
+            // this._weapon.defaultClip = clip;
+            // node.active = false;
+            // node.parent = this.node;
+        }
+        this.schedule(()=>{
+            this._weapon.node.active = true;
+            //tween(this._chassis).by(0.2,{angle: -20}).start();
+            this._weapon.play();
+            //动画组件注册事件
+            this._weapon.on(Animation.EventType.FINISHED,()=>{
+                this._weapon.node.active = false;
+                if(!this._isFire){
+                    this.unscheduleAllCallbacks();
+                }
+            })
+        }, 1)
+        this._weapon.play();
+    }
+}
+
+
+//
+export class LaserTower extends Tower {
+
+}
+
+export class MShootTower extends Tower {
+
+}
+
+export class StickTower extends Tower {
+
+}

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

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.23",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "8d898809-d32c-4b51-afea-8de06fcc5256",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

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

@@ -4,7 +4,7 @@ import { ModulerBase } from './ModulerBase';
 const { ccclass, property } = _decorator;
 
 @ccclass('MonsterMgr')
-export class MonsterMgr extends Component {
+export class MonsterMgr extends ModulerBase {
     @property(Prefab)
     monsterPre: Prefab = null;
     start() {

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

@@ -6,6 +6,7 @@ import { resMgr } from '../../Frames/ResourcesMgr';
 import { TowerData } from '../../DataItem/ItemData';
 import { dataMgr } from '../../Frames/DataManager';
 import { Tower } from '../Tower';
+import { ExpandTower, LaserTower, MShootTower, ShootTower, StickTower } from './InsTower';
 const { ccclass, property } = _decorator;
 
 @ccclass('TowerMgr')
@@ -16,30 +17,50 @@ export class TowerMgr extends ModulerBase {
         //GameMgr.Instance.getModuler(MapMgr).test();
         //this.getModuler(MapMgr).test();
     }
-    creatTower(pos: Vec3, data: TowerData){
+    creatTower(pos: Vec3, data: TowerData) {
         //const data: TowerData = dataMgr.getData(id, "TowerDt");
-        
+
         const node = instantiate(resMgr.getPrefab("Tower"));
         //const node = instantiate(resMgr.getPrefab("Tower"));
-        const tower = node.getComponent(Tower);
-        tower.init(data, pos);
+        //const tower = node.getComponent(Tower);
+        let tower: Tower;
+        switch (data.fireType) {
+            case "shoot":
+                tower = node.addComponent(ShootTower);
+                break;
+            case "expand":
+                tower = node.addComponent(ExpandTower);
+                break;
+            case "mshoot":
+                tower = node.addComponent(MShootTower);
+                break;
+            case "laser":
+                tower = node.addComponent(LaserTower);
+                break;
+            case "stick":
+                tower = node.addComponent(StickTower);
+                break;
+            default:
+                break;
+        }
         node.parent = this.node;
+        tower.init(data, pos);
     }
     protected clearSelf(): void {
-        
+
     }
 
-    bTouchTower(pos: Vec2){
-        for(const towerNode of this.node.children){
+    bTouchTower(pos: Vec2) {
+        for (const towerNode of this.node.children) {
             const tower: Tower = towerNode.getComponent(Tower);
-            if(tower.bTouch(pos)){
+            if (tower.bTouch(pos)) {
                 return true;
             }
         }
         return false;
     }
     update(deltaTime: number) {
-        
+
     }
 }
 

+ 9 - 0
assets/Script/Game/Tools.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.2.0",
+  "importer": "directory",
+  "imported": true,
+  "uuid": "a5e86c5d-08df-4d5a-94d1-028e325023db",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 35 - 0
assets/Script/Game/Tools/Tools.ts

@@ -0,0 +1,35 @@
+import { Animation, AnimationClip, Node, Sprite, SpriteFrame, Vec3 } from "cc";
+
+export class Tools {
+    
+    static createNode(parent?: Node, pos?: Vec3):Node{
+        const node = new Node();
+        parent && node.setParent(parent);
+        pos && node.setPosition(pos);
+        return node;
+    }
+
+    static createSprite(frame: SpriteFrame, parent?: Node, pos?: Vec3): Node{
+        const node = this.createNode(parent, pos);
+        node.addComponent(Sprite).spriteFrame = frame;
+        return node;
+    }
+
+    static createAnimation(frames: SpriteFrame[], sample: number, obj: Node | Animation, mode: AnimationClip.WrapMode = AnimationClip.WrapMode.Normal){
+        let ani: Animation;
+        if(obj instanceof Animation){
+            ani = obj;
+        }else{
+            ani = obj.addComponent(Animation);
+        }
+
+        //添加动画剪辑
+        const clip = AnimationClip.createWithSpriteFrames(frames, sample);
+        clip.wrapMode = mode;
+        ani.addClip(clip);
+        ani.defaultClip = clip;
+        return ani;
+    }
+}
+
+

+ 9 - 0
assets/Script/Game/Tools/Tools.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.23",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "3568e615-edae-4507-a599-385952eec1ef",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 146 - 26
assets/Script/Game/Tower.ts

@@ -1,38 +1,158 @@
-import { _decorator, Component, Sprite, Vec2, Vec3 } from 'cc';
+import { _decorator, Animation, Component, macro, Node, Sprite, SpriteFrame, Vec2, Vec3 } from 'cc';
 import { TowerData } from '../DataItem/ItemData';
 import { resMgr } from '../Frames/ResourcesMgr';
 import { GameMgr } from './GameFrameWork/GameMgr';
 import { MapMgr } from './GameFrameWork/MapMgr';
 import { TowerUI } from './GameFrameWork/TowerUI';
+import { BulletMgr } from './GameFrameWork/BulletMgr';
+import { MonsterMgr } from './GameFrameWork/MonsterMgr';
+import { Tools } from './Tools/Tools';
 const { ccclass, property } = _decorator;
 
 @ccclass('Tower')
 export class Tower extends Component {
-    private _tilePos: Vec2 = null;
-    init(data: TowerData, pos: Vec3){
-        const frame = resMgr.getSpriteFrame(data.chassis[0]);
-        this.node.getComponent(Sprite).spriteFrame = frame;
-        this.node.setPosition(pos);
-
-        //炮的图片
-        this.node.getChildByName("Gun").getComponent(Sprite).spriteFrame
-        = resMgr.getSpriteFrame(data.fireAniImg + "11");
-
-        this._tilePos = GameMgr.Instance.getModuler(MapMgr).getTiledByPos(new Vec2(pos.x, pos.y));
-   }
-
-   bTouch(pos: Vec2): boolean{
-        const tiled = GameMgr.Instance.getModuler(MapMgr).getTiledByPos(new Vec2(pos.x, pos.y));
-        if(this._tilePos.equals(tiled)){
-            this.showUI();
-            return true;
-        };
-        return false;
-   }
-
-   showUI(){
-        GameMgr.Instance.getModuler(TowerUI).show(this.node.position)
-   }
+     private _tilePos: Vec2 = null;
+     private _atkRadiums: number = 0;
+     private _lv: number = 1;
+     private _atkTarget: Node = null;
+     //炮
+     protected _gun: Node = null;
+     //地盘
+     protected _chassis: Node = null;
+     //塔的数据
+     protected _data: TowerData = null;
+     protected _isFire: boolean = false;
+     //保存面向攻击对象的旋转角度
+     protected _targetAngle: number = 0;
+     //子弹的动画精灵帧的数组
+     protected _bulletFrames: SpriteFrame[] = [];
+     //自己的动画的精灵帧
+     protected _aniFrames: SpriteFrame[] = [];
+     //动画组件
+     protected _ani: Animation = null;
+
+     protected onLoad(): void {
+          this._gun = this.node.getChildByName("Gun");
+          this._chassis = this.node.getChildByName("Chassis");
+     }
+
+     protected setAni(){
+          for(let i = 1; i <= this._data.fireAniCount; i++){
+               this._aniFrames.push(resMgr.getSpriteFrame(this._data.fireAniImg + this._lv + i));
+          }
+          this._ani = Tools.createAnimation(this._aniFrames, 20, this._gun);
+     }
+
+     init(data: TowerData, pos: Vec3) {
+
+          this._data = data;
+
+          //子弹动画精灵帧
+          for(let i = 1; i <= data.bulletAniCount; i++){
+               this._bulletFrames.push(resMgr.getSpriteFrame(data.bulletAniImg + this._lv + i));
+          }
+
+          this._atkRadiums = data.atkRadiums[this._lv - 1];
+
+          const frame = resMgr.getSpriteFrame(data.chassis[0]);
+          this._chassis.getComponent(Sprite).spriteFrame = frame;
+          this.node.setPosition(pos);
+
+          //炮的图片
+          this._gun.getComponent(Sprite).spriteFrame
+               = resMgr.getSpriteFrame(data.fireAniImg + this._lv + "1");
+
+          this._tilePos = GameMgr.Instance.getModuler(MapMgr).getTiledByPos(new Vec2(pos.x, pos.y));
+
+          
+     }
+
+     protected _attack(){
+          //一定不要写代码 只是为了产生多态 其实是一个接口 实现不同的派生类的方法
+     }
+
+     protected stopAttack(){
+
+     }
+
+     //开火
+     protected _fire(){
+          this._isFire = true;
+
+          this._attack();
+          
+     }
+
+     protected _unFire(){
+          //this.unscheduleAllCallbacks();
+          this._isFire = false;
+          this.stopAttack();
+     }
+
+     bTouch(pos: Vec2): boolean {
+          const tiled = GameMgr.Instance.getModuler(MapMgr).getTiledByPos(new Vec2(pos.x, pos.y));
+          if (this._tilePos.equals(tiled)) {
+               this.showUI();
+               return true;
+          };
+          return false;
+     }
+
+     showUI() {
+          GameMgr.Instance.getModuler(TowerUI).show(this.node.position)
+     }
+
+     protected update(dt: number): void {
+          if(this._atkTarget){
+               //旋转角度
+               const vec: Vec3 = this._getVec(this._atkTarget).normalize();
+               let angle = Vec3.angle(new Vec3(0, 1), vec);
+               if(vec.x > 0){
+                    angle  *= -1;
+               }
+               //this.unscheduleAllCallbacks();
+               //弧度转角度
+               this._targetAngle = angle / Math.PI * 180;
+               if(this._data.rotate){
+                    this._gun.angle = this._targetAngle;
+               }
+               
+          }
+          if(this._isFire){
+
+               //已经锁定的目标 是否死亡(销毁) 是否走出攻击范围
+               const dis = this._getVec(this._atkTarget).length();
+               if(dis > this._atkRadiums){
+                    this._atkTarget = null;
+                    this._unFire();
+               }
+               return;
+          }
+          if(this._findMonster()){
+               this._fire();
+          }
+          
+     }
+
+     private _findMonster(){
+          const monsters: Node[] = GameMgr.Instance.getModuler(MonsterMgr).node.children;
+          for(const node of monsters){
+               //计算node和自己的距离
+               const dis: number = this._getVec(node).length();
+               if(dis <= this._atkRadiums){
+                    this._atkTarget = node;
+                    return true;
+                    //this._fire();
+               }
+          }
+          return false;
+     }
+
+     protected _getVec(node: Node): Vec3{
+          return node.position.clone().subtract(this.node.position);
+     }
+
+
 }
 
 

+ 15 - 15
assets/resources/Data/TowerDt.csv

@@ -1,15 +1,15 @@
-名称,id,lvIcon,cardImg,chassis,fireAniImg,fireAniCount,effectAni,bulletAniImg,bulletAniCount,buff,fireType
-,number,string,string[],string[],string,number,string[],string,number,string[],string
-绿瓶,1,TBottle,Bottle00;Bottle01,Bottle-11,Bottle,3,PBottle01;PBottle02,PBottle,3,none,shoot
-屎,2,TShit,Shit00;Shit01,Shit-11;Shit-12;Shit-13,Shit,3,PShit01;PShit02,PShit,2,PShit-11;PShit-12,shoot
-叶子,3,TLeaf,Fan00;Fan01,Fan-11;Fan-12;Fan-13,Fan,3,PFan01;PFan02,PFan,1,none,shoot
-金色五角星,4,TRedStart,Star00;Star01,Star-11;Star-12;Star-13,Star,3,PStar01;PStar02,PStar,1,PStar-11;PStar-12;PStar-13;PStar-14;PStar-15;PStar-16,shoot
-电球,5,TThunder,Ball00;Ball01,Ball-11;Ball-12;Ball-13,Ball,4,PBall01;PBall02,PBall,4,none,stick
-火瓶子,6,TFireBottle,FBottle00;FBottle01,FBottle-11,FBottle,3,PFBottle01;PFBottle02,PFBottle,2,none,stick
-冰五角,7,TBlueStart,BStar00;BStar01,BStar-11;BStar-12;BStar-13,BStar,3,PBStar01;PBStar02,PBStar,1,PBStar-11;PBStar-12;PBStar-13;PBStar-14;PBStar-15;PBStar-16,shoot
-太阳,8,TSun,Sun00;Sun01,Sun-11;Sun-12;Sun-13,Sun,1,PSun01;PSun02;PSun03;PSun04;PSun05;PSun06;PSun07;PSun08;PSun09,PSun,5,none,expand
-火箭,9,TRocket,Rocket00;Rocket01,Rocket-11;Rocket-12;Rocket-13,Rocket,3,PRocket01;PRocket02,PRocket,5,PRocket-11;PRocket-12;PRocket-13;PRocket-14;PRocket-15;PRocket-16,shoot
-毒针,10,TPin,Pin00;Pin01,Pin-11;Pin-12;Pin-13,Pin,3,PPin01;PPin02;PPin03;PPin04,PPin,2,none,shoot
-弩,11,TBow,Arrow00;Arrow01,Arrow-11;Arrow-12;Arrow-13,Arrow,3,PArrow01;PArrow02,PArrow,2,none,mshoot
-雪花,12,TIce,Snow00;Snow01,Snow-11;Snow-12;Snow-13,Snow,3,none,PSnow,5,PSnow-21,expand
-飞机,13,TPlane,Plane00;Plane01,Plane-11,Plane,3,PPlane01;PPlane02;PPlane03;PPlane04;PPlane05,PPlane,3,none,laser
+名称,id,lvIcon,cardImg,chassis,fireAniImg,fireAniCount,effectAni,bulletAniImg,bulletAniCount,buff,fireType,atkRadiums,rotate
+,number,string,string[],string[],string,number,string[],string,number,string[],string,number[],boolean
+绿瓶,1,TBottle,Bottle00;Bottle01,Bottle-11,Bottle,3,PBottle01;PBottle02,PBottle,3,none,shoot,120;160;200,1
+屎,2,TShit,Shit00;Shit01,Shit-11;Shit-12;Shit-13,Shit,3,PShit01;PShit02,PShit,2,PShit-11;PShit-12,shoot,120;160;200,0
+叶子,3,TLeaf,Fan00;Fan01,Fan-11;Fan-12;Fan-13,Fan,3,PFan01;PFan02,PFan,1,none,shoot,120;160;200,0
+金色五角星,4,TRedStart,Star00;Star01,Star-11;Star-12;Star-13,Star,3,PStar01;PStar02,PStar,1,PStar-11;PStar-12;PStar-13;PStar-14;PStar-15;PStar-16,shoot,120;160;200,0
+电球,5,TThunder,Ball00;Ball01,Ball-11;Ball-12;Ball-13,Ball,4,PBall01;PBall02,PBall,4,none,stick,120;160;200,0
+火瓶子,6,TFireBottle,FBottle00;FBottle01,FBottle-11,FBottle,3,PFBottle01;PFBottle02,PFBottle,2,none,stick,120;160;200,1
+冰五角,7,TBlueStart,BStar00;BStar01,BStar-11;BStar-12;BStar-13,BStar,3,PBStar01;PBStar02,PBStar,1,PBStar-11;PBStar-12;PBStar-13;PBStar-14;PBStar-15;PBStar-16,shoot,120;160;200,0
+太阳,8,TSun,Sun00;Sun01,Sun11;Sun12;Sun13,Sun-,1,PSun01;PSun02;PSun03;PSun04;PSun05;PSun06;PSun07;PSun08;PSun09,PSun,5,none,expand,120;160;200,0
+火箭,9,TRocket,Rocket00;Rocket01,Rocket-11;Rocket-12;Rocket-13,Rocket,3,PRocket01;PRocket02,PRocket,5,PRocket-11;PRocket-12;PRocket-13;PRocket-14;PRocket-15;PRocket-16,shoot,120;160;200,1
+毒针,10,TPin,Pin00;Pin01,Pin-11;Pin-12;Pin-13,Pin,3,PPin01;PPin02;PPin03;PPin04,PPin,2,none,shoot,120;160;200,1
+弩,11,TBow,Arrow00;Arrow01,Arrow-11;Arrow-12;Arrow-13,Arrow,3,PArrow01;PArrow02,PArrow,2,none,mshoot,120;160;200,1
+雪花,12,TIce,Snow00;Snow01,Snow-11;Snow-12;Snow-13,Snow,3,none,PSnow,5,PSnow-21,expand,120;160;200,0
+飞机,13,TPlane,Plane00;Plane01,Plane-11,Plane,3,PPlane01;PPlane02;PPlane03;PPlane04;PPlane05,PPlane,3,none,laser,120;160;200,1

+ 23 - 1
assets/resources/Res/Prefab/Bullet.prefab

@@ -25,10 +25,13 @@
       },
       {
         "__id__": 4
+      },
+      {
+        "__id__": 6
       }
     ],
     "_prefab": {
-      "__id__": 6
+      "__id__": 8
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -132,6 +135,24 @@
     "__type__": "cc.CompPrefabInfo",
     "fileId": "04ZVQ5OyVE47OSONuslZ4Z"
   },
+  {
+    "__type__": "f47ebPVttlIYL9tkWbStBb7",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 7
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "dcos+NZKxJy7KJsb7UNALe"
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -141,6 +162,7 @@
       "__id__": 0
     },
     "fileId": "884FI8BG9Di4Gt00Ud1EXK",
+    "instance": null,
     "targetOverrides": null
   }
 ]

+ 97 - 27
assets/resources/Res/Prefab/Tower.prefab

@@ -20,22 +20,19 @@
     "_children": [
       {
         "__id__": 2
+      },
+      {
+        "__id__": 8
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 8
-      },
-      {
-        "__id__": 10
-      },
-      {
-        "__id__": 12
+        "__id__": 14
       }
     ],
     "_prefab": {
-      "__id__": 14
+      "__id__": 16
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -68,7 +65,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "Gun",
+    "_name": "Chassis",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -130,8 +127,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 26,
-      "height": 56
+      "width": 66,
+      "height": 66
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -142,7 +139,7 @@
   },
   {
     "__type__": "cc.CompPrefabInfo",
-    "fileId": "e9iMce/PZEFJIs2cvQ1seT"
+    "fileId": "e2RJ1QjwZAAY2punQSP2Tx"
   },
   {
     "__type__": "cc.Sprite",
@@ -167,7 +164,7 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "c54f5894-a855-472f-8218-35949e451d24@9e974",
+      "__uuid__": "c2172ae4-51e8-4049-8638-a277f74bb203@b2cc7",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 0,
@@ -187,7 +184,7 @@
   },
   {
     "__type__": "cc.CompPrefabInfo",
-    "fileId": "df6lt2xWZLupYQSJ2NjtJl"
+    "fileId": "ffr/bnMwxA9JL1sa1vX8vL"
   },
   {
     "__type__": "cc.PrefabInfo",
@@ -197,27 +194,77 @@
     "asset": {
       "__id__": 0
     },
-    "fileId": "28rXzlwgxNJpvLTc6SIy1x",
+    "fileId": "d6ynLg5h5JeLksqD2oV9P7",
     "instance": null,
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "Gun",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 9
+      },
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": {
+      "__id__": 13
+    },
+    "_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
+      "__id__": 8
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 9
+      "__id__": 10
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 66,
-      "height": 66
+      "width": 26,
+      "height": 56
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -228,7 +275,7 @@
   },
   {
     "__type__": "cc.CompPrefabInfo",
-    "fileId": "9anUKReONDNJ4bdjdC6era"
+    "fileId": "e9iMce/PZEFJIs2cvQ1seT"
   },
   {
     "__type__": "cc.Sprite",
@@ -236,11 +283,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 1
+      "__id__": 8
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 11
+      "__id__": 12
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -253,7 +300,7 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "c2172ae4-51e8-4049-8638-a277f74bb203@b2cc7",
+      "__uuid__": "c54f5894-a855-472f-8218-35949e451d24@9e974",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 0,
@@ -273,10 +320,23 @@
   },
   {
     "__type__": "cc.CompPrefabInfo",
-    "fileId": "4fIw2zhLNLBYp4yyfUIXW1"
+    "fileId": "df6lt2xWZLupYQSJ2NjtJl"
   },
   {
-    "__type__": "cf295F1lNZFSre5+j0YiRIt",
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "28rXzlwgxNJpvLTc6SIy1x",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
@@ -285,13 +345,23 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 13
+      "__id__": 15
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 66,
+      "height": 66
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
     },
     "_id": ""
   },
   {
     "__type__": "cc.CompPrefabInfo",
-    "fileId": "8fMpGYJRJLaZxL7XOxJHTU"
+    "fileId": "9anUKReONDNJ4bdjdC6era"
   },
   {
     "__type__": "cc.PrefabInfo",

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно