24 changed files with 264 additions and 103 deletions
@ -0,0 +1,64 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class ObjectItemSettleManager : Singleton<ObjectItemSettleManager> |
|||
{ |
|||
public List<EnemyNode> readyToActivateEffects = new List<EnemyNode>(); |
|||
|
|||
private void Start() |
|||
{ |
|||
GameManager.Instance.usedCardEvent += StartSettleAllBlocks; |
|||
} |
|||
public void StartSettleAllBlocks() |
|||
{ |
|||
StartCoroutine(SettleAllBlocks(readyToActivateEffects)); |
|||
} |
|||
public IEnumerator SettleAllBlocks(List<EnemyNode> blockNodes) |
|||
{ |
|||
yield return new WaitForSeconds(0.5f);//开始先等待确认伤害已经打出,或者更改伤害打出的携程确保伤害输出后再开启结算
|
|||
|
|||
List<EnemyNode> blockNodesNew = new List<EnemyNode>(); |
|||
for (int i = 0; i < blockNodes.Count; i++) |
|||
{ |
|||
Debug.Log("范围地块血量" + blockNodes[i].EnemyState.currentNumberOfHits); |
|||
if (blockNodes[i].EnemyState.currentNumberOfHits <= 0) |
|||
{ |
|||
List<MapUnity> mapUnities = blockNodes[i].PreviewColorRange(); |
|||
if (mapUnities != null) |
|||
{ |
|||
foreach (var node in mapUnities) |
|||
{ |
|||
if (node.enemyNode != null && blockNodesNew.Contains(node.enemyNode) == false&&node .enemyNode != blockNodes[i]) |
|||
{ |
|||
blockNodesNew.Add(node.enemyNode); |
|||
} |
|||
} |
|||
} |
|||
|
|||
yield return StartCoroutine(blockNodes[i].ActiveEffect()); |
|||
if (mapUnities != null) |
|||
{ |
|||
Debug.Log("范围" + mapUnities.Count); |
|||
} |
|||
else |
|||
{ |
|||
Debug.Log("范围空"); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
if(blockNodesNew .Count >0) |
|||
{ |
|||
StartCoroutine(SettleAllBlocks(blockNodesNew)); |
|||
} |
|||
|
|||
} |
|||
|
|||
public void ActivateEffects(EnemyNode enemyNode) |
|||
{ |
|||
//enemyNode .
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 90ef6bc6f4b6bb14287b411057d7c3f3 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue