public void AfterWorldLoad() { StringBuilder sb = new StringBuilder(); APILogger.LogToFile("-------------------Bosses Loaded----------------------"); var i = 0; foreach (var monster in LoadedAssembalies) { if (Activator.CreateInstance(monster) is IPandaBoss pandaBoss && !string.IsNullOrEmpty(pandaBoss.name)) { sb.Append($"{pandaBoss.name}, "); MonsterManager.AddBoss(pandaBoss); i++; if (i > 5) { i = 0; sb.AppendLine(); } } } APILogger.LogToFile(sb.ToString()); APILogger.LogToFile("------------------------------------------------------"); }
private static void ActivateBosses() { foreach (var monster in _monsters) { if (Activator.CreateInstance(monster) is IPandaBoss pandaBoss && !string.IsNullOrEmpty(pandaBoss.Name)) { PandaLogger.Log($"Boss {pandaBoss.Name} Loaded!"); MonsterManager.AddBoss(pandaBoss); } } }