updat core

This commit is contained in:
2024-10-21 17:02:25 +08:00
parent 867dc79f5f
commit 6c950bb377
13 changed files with 71 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
using Sirenix.OdinInspector;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;
namespace Game.Component
@@ -14,6 +15,8 @@ namespace Game.Component
[LabelText ("当前完成数:")] private int _currentConditionNumber = 0;
private List<EnemyEntity> _enemyEntities;
public bool IsComplete => _currentConditionNumber >= completeConditionNumber;
@@ -22,5 +25,21 @@ namespace Game.Component
this._currentConditionNumber += number;
return _currentConditionNumber >= completeConditionNumber;
}
public void RefreshInit ()
{
this._currentConditionNumber = 0;
foreach (var enemyEntity in this._enemyEntities)
{
enemyEntity.ResetState ();
}
}
public void InitPart ()
{
this._enemyEntities = new List<EnemyEntity> ();
this._enemyEntities = new List<EnemyEntity> (transform.GetComponentsInChildren<EnemyEntity> (true));
}
}
}