加入很多新内容,这波一块交了
This commit is contained in:
@@ -15,6 +15,7 @@ using TMPro;
|
||||
/// </summary>
|
||||
public class AllyCombatant : MonoBehaviour, ICombatant
|
||||
{
|
||||
private static AllyHero_SO[] cachedAllAllyHeroes;
|
||||
public int slotIndex = 0; // Documentation text normalized.
|
||||
|
||||
// runtime stats
|
||||
@@ -989,8 +990,8 @@ public class AllyCombatant : MonoBehaviour, ICombatant
|
||||
|
||||
if (id > 0)
|
||||
{
|
||||
var all = Resources.LoadAll<AllyHero_SO>("");
|
||||
foreach (var a in all)
|
||||
EnsureAllyHeroCache();
|
||||
foreach (var a in cachedAllAllyHeroes)
|
||||
{
|
||||
if (a != null && a.ally_heroID == id)
|
||||
{
|
||||
@@ -1049,6 +1050,12 @@ public class AllyCombatant : MonoBehaviour, ICombatant
|
||||
}
|
||||
}
|
||||
|
||||
private static void EnsureAllyHeroCache()
|
||||
{
|
||||
if (cachedAllAllyHeroes != null) return;
|
||||
cachedAllAllyHeroes = Resources.LoadAll<AllyHero_SO>("") ?? Array.Empty<AllyHero_SO>();
|
||||
}
|
||||
|
||||
// Documentation text normalized.
|
||||
private static AllyHero_SO.AllyLevelInfo GetEffectiveLevelForExp(AllyHero_SO so, int exp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user