private void SpawnSetups() { if (AllowedToComplete(this) && Setups == null && !Config.Setup.IsNullOrEmpty()) { MDebug.Log("SPAWN SETUP"); Setups = M_Math.SpawnFromList(Config.Setup); Setups.ForEach(setup => setup.Init()); } }
private static ActionManager MakeActions(ScriptableUnitConfig data, GameObject base_unit) { UnitActionBase[] Actions = M_Math.SpawnFromList(data.Actions.ToList()).ToArray(); M_Math.SetListAsChild(Actions.ToList(), base_unit.transform); return(base_unit.AddComponent <ActionManager>()); }