greg 4 anni fa
parent
commit
01d1ed37d7

+ 24 - 7
assets/d3d/gunFire/zhuodan.fbx.meta

@@ -5,6 +5,23 @@
   "uuid": "7c735b05-1052-417a-bab4-49dbefdbb9fc",
   "files": [],
   "subMetas": {
+    "a55e7": {
+      "importer": "gltf-embeded-image",
+      "uuid": "7c735b05-1052-417a-bab4-49dbefdbb9fc@a55e7",
+      "displayName": "",
+      "id": "a55e7",
+      "name": "5555.png.image",
+      "ver": "1.0.2",
+      "imported": true,
+      "files": [
+        ".png",
+        ".json"
+      ],
+      "subMetas": {},
+      "userData": {
+        "gltfIndex": 0
+      }
+    },
     "e22fe": {
       "importer": "gltf-mesh",
       "uuid": "7c735b05-1052-417a-bab4-49dbefdbb9fc@e22fe",
@@ -80,12 +97,12 @@
         "events": []
       }
     },
-    "a55e7": {
+    "adacb": {
       "importer": "gltf-embeded-image",
-      "uuid": "7c735b05-1052-417a-bab4-49dbefdbb9fc@a55e7",
+      "uuid": "7c735b05-1052-417a-bab4-49dbefdbb9fc@adacb",
       "displayName": "",
-      "id": "a55e7",
-      "name": "5555.png.image",
+      "id": "adacb",
+      "name": "file2.image",
       "ver": "1.0.2",
       "imported": true,
       "files": [
@@ -118,7 +135,7 @@
         "premultiplyAlpha": false,
         "anisotropy": 1,
         "isUuid": true,
-        "imageUuidOrDatabaseUri": "7c735b05-1052-417a-bab4-49dbefdbb9fc@a55e7"
+        "imageUuidOrDatabaseUri": "7c735b05-1052-417a-bab4-49dbefdbb9fc@adacb"
       }
     },
     "826f3": {
@@ -141,8 +158,8 @@
   "userData": {
     "imageMetas": [
       {
-        "name": "5555.png",
-        "uri": "7c735b05-1052-417a-bab4-49dbefdbb9fc@a55e7"
+        "name": "file2",
+        "uri": "7c735b05-1052-417a-bab4-49dbefdbb9fc@adacb"
       }
     ],
     "animationImportSettings": [

+ 18 - 5
assets/scripts/games/ui/fightings/GameController.ts

@@ -259,23 +259,36 @@ export class GameController extends EventDispatcher{
         }
         if(this.currentSkill!=null){
             this.currentSkill.Update(dt);
+            this.DrawingSkillState();
+        }else{
+            this.colorIndex=-1;
+            this.fightingMediator.DrawingBoard.clear(true);
         }
         this.runTime+=dt*1000;
         this.weapon.Update(dt);
         this.CheckMonster();
-
-        this.DrawingSkillState();
     }
 
-    private colorIndex:number=0;
+    private colorIndex:number=-1;
+    private isDown:boolean;
     private DrawingSkillState():void{
         this.fightingMediator.DrawingBoard.clear(true);
+        if(this.colorIndex<0){
+            this.isDown=false;
+        }else if(this.colorIndex>255){
+            this.isDown=true;
+        }
+        if(this.isDown){
+            this.colorIndex-=10;
+        }else{
+            this.colorIndex+=10;
+        }
+        this.colorIndex=this.colorIndex%255;
+
         let VisibleSize:Size=view.getVisibleSize();
         this.fightingMediator.DrawingBoard.fillColor=new Color(255,0,0,this.colorIndex);
         this.fightingMediator.DrawingBoard.rect(0,0,VisibleSize.width,VisibleSize.height);
         this.fightingMediator.DrawingBoard.fill();
-        this.colorIndex++;
-        this.colorIndex=this.colorIndex%255;
     }
 
     /**

+ 0 - 17
assets/scripts/games/ui/fightings/monsters/MonsterBase.ts

@@ -46,10 +46,6 @@ export class MonsterBase extends Component {
      */
     private danHen:AnimationComponent;
     
-    /**
-     * 节点列表
-     */
-    private nodeList:Node[];
 
     start () {
         this.monsterConfig=GameConfigManager.GetMonsterConfig(this.config.monsterId);
@@ -64,15 +60,8 @@ export class MonsterBase extends Component {
         this.InitAnimations();
         this.InitPostitionAndEndPos();
         this.InitScale();
-        this.InitNodeList();
     }
 
-    private InitNodeList():void{
-        this.nodeList=[];
-        //上半身
-        let rootNode:Node=find("RootNode/Root/CATRigHub001/transform5/CATRigSpine2",this.node);
-        this.getChildren(this.node,this.nodeList);
-    }
 
     /**
      * 子节点收集
@@ -323,10 +312,4 @@ export class MonsterBase extends Component {
         let socket:Node=find("RootNode/Root/HpSocket",this.node);
         return socket?socket:this.node;
     }
-
-
-    get randomSocket():Node{
-        let index:number=Math.floor(Math.random()*this.nodeList.length);
-        return this.nodeList[index];
-    }
 }

+ 3 - 1
assets/scripts/games/ui/fightings/weapons/WeaponBase.ts

@@ -234,7 +234,9 @@ export class WeaponBase extends EventDispatcher{
     private _bulletCount:number=0;
     set bulletCount(value:number){
         this._bulletCount=value;
-        if(this._bulletCount<0){
+        if(this._bulletCount<=0){
+            //换弹
+            this.Reload();
             this._bulletCount=0;
         }
         this.DispatchEvent(WeaponBase.EVENT_BULLET_CHANGE);