public EngineCommandResult Execute(IEngineCommand c) { var ll = (AshyCore.EngineAPI.EngineCommands.LoadLevel)c; var res = EngineCommandResult.Success; Engine.I.CreateWorld(); foreach (var entity in ll.LoadingLevel.Entities) { res = LevelCmdHelper.InitEntity(entity).Worst(res); } return(res); }
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); }
public EngineCommandResult Execute(IEngineCommand c) { var aec = (AshyCore.EngineAPI.EngineCommands.AddEntity)c; return(LevelCmdHelper.InitEntity(aec.Entity)); }