using System.Collections.Generic; namespace ET { [FriendClass(typeof(Fighter))] public class FighterComponentAwakeSystem:AwakeSystem> { public override void Awake(FighterComponent self, Dictionary peopleDic) { foreach (var v in peopleDic.Keys) { var people = peopleDic[v]; var fighter = self.AddChildWithId(people.Id); self.FighterDic[v] = fighter; fighter.FromPeople(people); fighter.Pos = v; } } } [FriendClass(typeof(Fighter))] public static class FighterComponentSystem { public static bool IsFail(this FighterComponent self) { foreach (var v in self.Children.Values) { if (((Fighter) v).IsAlive) { return false; } } return true; } } }