Переглянути джерело

敌方小怪受我方士兵起手式攻击时闪白

SZAND\msx_2 5 місяців тому
батько
коміт
19d283397f

+ 5 - 1
ActionTowerDefense/Assets/Resources/Spine/Enemy_FireDaoshi/Enemy_FireDaoshi_Material.mat

@@ -8,7 +8,7 @@ Material:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: Enemy_FireDaoshi_Material
-  m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
+  m_Shader: {fileID: 4800000, guid: 45495790b394f894a967dbf44489b57b, type: 3}
   m_ValidKeywords: []
   m_InvalidKeywords:
   - _USE8NEIGHBOURHOOD_ON
@@ -28,7 +28,10 @@ Material:
     m_Ints: []
     m_Floats:
     - _Cutoff: 0.1
+    - _DoubleSidedLighting: 0
     - _Fill: 0
+    - _FillPhase: 0
+    - _LightAffectsAdditive: 0
     - _OutlineMipLevel: 0
     - _OutlineOpaqueAlpha: 1
     - _OutlineReferenceTexWidth: 1024
@@ -41,5 +44,6 @@ Material:
     - _Use8Neighbourhood: 1
     - _UseScreenSpaceOutlineWidth: 0
     m_Colors:
+    - _FillColor: {r: 1, g: 1, b: 1, a: 1}
     - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 3 - 1
ActionTowerDefense/Assets/Resources/Spine/Enemy_Flyzombie/Enemy_Flyzombie_Material.mat

@@ -8,7 +8,7 @@ Material:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: Enemy_Flyzombie_Material
-  m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
+  m_Shader: {fileID: 4800000, guid: 45495790b394f894a967dbf44489b57b, type: 3}
   m_ValidKeywords: []
   m_InvalidKeywords:
   - _USE8NEIGHBOURHOOD_ON
@@ -29,6 +29,7 @@ Material:
     m_Floats:
     - _Cutoff: 0.1
     - _Fill: 0
+    - _FillPhase: 0
     - _OutlineMipLevel: 0
     - _OutlineOpaqueAlpha: 1
     - _OutlineReferenceTexWidth: 1024
@@ -41,5 +42,6 @@ Material:
     - _Use8Neighbourhood: 1
     - _UseScreenSpaceOutlineWidth: 0
     m_Colors:
+    - _FillColor: {r: 1, g: 1, b: 1, a: 1}
     - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 3 - 1
ActionTowerDefense/Assets/Resources/Spine/Enemy_Ghost/Enemy_Ghost_Material.mat

@@ -8,7 +8,7 @@ Material:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: Enemy_Ghost_Material
-  m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
+  m_Shader: {fileID: 4800000, guid: 45495790b394f894a967dbf44489b57b, type: 3}
   m_ValidKeywords: []
   m_InvalidKeywords:
   - _USE8NEIGHBOURHOOD_ON
@@ -29,6 +29,7 @@ Material:
     m_Floats:
     - _Cutoff: 0.1
     - _Fill: 0
+    - _FillPhase: 0
     - _OutlineMipLevel: 0
     - _OutlineOpaqueAlpha: 1
     - _OutlineReferenceTexWidth: 1024
@@ -41,5 +42,6 @@ Material:
     - _Use8Neighbourhood: 1
     - _UseScreenSpaceOutlineWidth: 0
     m_Colors:
+    - _FillColor: {r: 1, g: 1, b: 1, a: 1}
     - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 3 - 1
ActionTowerDefense/Assets/Resources/Spine/Enemy_Ghost2/Enemy_Ghost2_Material.mat

@@ -8,7 +8,7 @@ Material:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: Enemy_Ghost2_Material
-  m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
+  m_Shader: {fileID: 4800000, guid: 45495790b394f894a967dbf44489b57b, type: 3}
   m_ValidKeywords: []
   m_InvalidKeywords:
   - _USE8NEIGHBOURHOOD_ON
@@ -29,6 +29,7 @@ Material:
     m_Floats:
     - _Cutoff: 0.1
     - _Fill: 0
+    - _FillPhase: 0
     - _OutlineMipLevel: 0
     - _OutlineOpaqueAlpha: 1
     - _OutlineReferenceTexWidth: 1024
@@ -41,5 +42,6 @@ Material:
     - _Use8Neighbourhood: 1
     - _UseScreenSpaceOutlineWidth: 0
     m_Colors:
+    - _FillColor: {r: 1, g: 1, b: 1, a: 1}
     - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 3 - 1
ActionTowerDefense/Assets/Resources/Spine/Enemy_Pig/Enemy_Pig_Material.mat

@@ -8,7 +8,7 @@ Material:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: Enemy_Pig_Material
-  m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
+  m_Shader: {fileID: 4800000, guid: 45495790b394f894a967dbf44489b57b, type: 3}
   m_ValidKeywords: []
   m_InvalidKeywords:
   - _USE8NEIGHBOURHOOD_ON
@@ -29,6 +29,7 @@ Material:
     m_Floats:
     - _Cutoff: 0.1
     - _Fill: 0
+    - _FillPhase: 0
     - _OutlineMipLevel: 0
     - _OutlineOpaqueAlpha: 1
     - _OutlineReferenceTexWidth: 1024
@@ -41,5 +42,6 @@ Material:
     - _Use8Neighbourhood: 1
     - _UseScreenSpaceOutlineWidth: 0
     m_Colors:
+    - _FillColor: {r: 1, g: 1, b: 1, a: 1}
     - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 3 - 1
ActionTowerDefense/Assets/Resources/Spine/Enemy_Piggy/Enemy_Piggy_Material.mat

@@ -8,7 +8,7 @@ Material:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: Enemy_Piggy_Material
-  m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
+  m_Shader: {fileID: 4800000, guid: 45495790b394f894a967dbf44489b57b, type: 3}
   m_ValidKeywords: []
   m_InvalidKeywords:
   - _USE8NEIGHBOURHOOD_ON
@@ -29,6 +29,7 @@ Material:
     m_Floats:
     - _Cutoff: 0.1
     - _Fill: 0
+    - _FillPhase: 0
     - _OutlineMipLevel: 0
     - _OutlineOpaqueAlpha: 1
     - _OutlineReferenceTexWidth: 1024
@@ -41,5 +42,6 @@ Material:
     - _Use8Neighbourhood: 1
     - _UseScreenSpaceOutlineWidth: 0
     m_Colors:
+    - _FillColor: {r: 1, g: 1, b: 1, a: 1}
     - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 3 - 1
ActionTowerDefense/Assets/Resources/Spine/Enemy_Shrimp/Enermy_Shrimp_Material.mat

@@ -8,7 +8,7 @@ Material:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_Name: Enermy_Shrimp_Material
-  m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
+  m_Shader: {fileID: 4800000, guid: 45495790b394f894a967dbf44489b57b, type: 3}
   m_ValidKeywords: []
   m_InvalidKeywords:
   - _USE8NEIGHBOURHOOD_ON
@@ -29,6 +29,7 @@ Material:
     m_Floats:
     - _Cutoff: 0.1
     - _Fill: 0
+    - _FillPhase: 0
     - _OutlineMipLevel: 0
     - _OutlineOpaqueAlpha: 1
     - _OutlineReferenceTexWidth: 1024
@@ -41,5 +42,6 @@ Material:
     - _Use8Neighbourhood: 1
     - _UseScreenSpaceOutlineWidth: 0
     m_Colors:
+    - _FillColor: {r: 1, g: 1, b: 1, a: 1}
     - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
   m_BuildTextureStacks: []

+ 11 - 0
ActionTowerDefense/Assets/Scripts/Characters/AttackController.cs

@@ -129,6 +129,9 @@ public class AttackInfo
     [ShowIf("ShowSustainedInjuryValue")][LabelText("³ÖÐøÉ˺¦²ÎÊý")]
     public SustainedInjury sustainedInjury;
 
+    [DisplayOnly] 
+    public bool isDemSummon;
+
     public void CopyTo(AttackInfo ai)
     {
         ai.damage = damage;
@@ -364,6 +367,14 @@ public class AttackController : MonoBehaviour
         }
         attackEffect = curAttackMethod.attackEffect;
         attackDistance = curAttackMethod.attackDistance;
+        if (id == 0 && GetComponent<Demonic>())
+        {
+            attackInfo.isDemSummon = true;
+        }
+        else
+        {
+            attackInfo.isDemSummon = false;
+        }
     }
 
     public void SetNextKeyTimes()

+ 2 - 1
ActionTowerDefense/Assets/Scripts/Characters/AttackTrigger.cs

@@ -61,7 +61,6 @@ public class AttackTrigger : MonoBehaviour
                 {
                     return;
                 }
-                if(trigedObjs.Count == 0 || !trigedObjs.Exists(x => x== hitTrigger))
                 {
                     trigedObjs.Add(hitTrigger);
                     hitTrigger.BeHit(attackInfo, owner);
@@ -106,3 +105,5 @@ public class AttackTrigger : MonoBehaviour
 
     }
 }
+
+//objectQIHSOUJNOUNERN HIHN HUJIJa

+ 31 - 3
ActionTowerDefense/Assets/Scripts/Characters/BeHitTrigger.cs

@@ -13,6 +13,10 @@ public class BeHitTrigger : MonoBehaviour
     [DisplayOnly]
     public int curX;
 
+    //闪白参数
+    private bool isWhite;
+    private float white;
+
     private void Awake()
     {
         owner = GetComponentInParent<Character>();
@@ -26,10 +30,34 @@ public class BeHitTrigger : MonoBehaviour
     public void BeHit(AttackInfo attackInfo, Character attackFrom)
     {
         owner.BeHit(attackInfo,attackFrom);
+        if (attackInfo.isDemSummon)
+        {
+            TurnWhite();        //来自我方士兵攻击机枪手是的并购降价后
+        }
     }
 
-    private void Update()
-    { 
+    public void TurnWhite()
+    {
+        owner.meshRenderer.material.SetFloat("_FillPhase", 0.6f);
+        Invoke("TurnOrigColor", 0.1f);
+    }
 
+    private void TurnOrigColor()
+    {
+        isWhite = true;
+        white = 0.6f;
+    }
+
+    private void Update()
+    {
+        if (isWhite)
+        {
+            white -= 4f * Time.deltaTime;
+            owner.meshRenderer.material.SetFloat("_FillPhase", white);
+            if (white <= 0)
+            {
+                isWhite = false;
+            }
+        }
     }
-}
+}

+ 1 - 0
ActionTowerDefense/Assets/Scripts/Characters/CharacterColliders.cs

@@ -6,6 +6,7 @@ public class CharacterColliders : MonoBehaviour
 {
     public Character owner;
     public float hitRate = 1;
+    public bool isDemSummon;
 
     private void Awake()
     {

+ 0 - 8
ActionTowerDefense/Assets/Scripts/Enemys.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 6a5f056981a9ce940878ff16f0208e16
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

Різницю між файлами не показано, бо вона завелика
+ 41 - 15
ActionTowerDefense/Assets/TextMesh Pro/Resources/Fonts & Materials/AaErMoXingShu-2 SDF.asset


Деякі файли не було показано, через те що забагато файлів було змінено