internal static EngineCommandResult Process(AshyCore.EngineAPI.EngineCommands.ChangeLevel c) { Engine.I.DestroyWorld(); Engine.I.CreateWorld(); foreach (var entity in c.LoadingLevel.Entities) { LevelCmdHelper.InitEntity(entity); } return(EngineCommandResult.Success); }
internal static EngineCommandResult Process(AshyCore.EngineAPI.EngineCommands.ChangeLevel c) { if (!CoreAPI.I.CheckAllInitialized || c == null) { return(EngineCommandResult.Failed); } Engine.I.DestroyWorld(); Memory.Collect(showLog: true); Engine.I.CreateWorld(); foreach (var entity in c.LoadingLevel.Entities) { LevelCmdHelper.InitEntity(entity); } return(EngineCommandResult.Success); }