Example #1
0
 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());
     }
 }
Example #2
0
 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>());
 }