Exemple #1
0
        public ModuleBase(ModuleInit init)
        {
            Init = init;

            var inputFileName = Path.Combine(InputWorkingPath, InputFileName);

            if (File.Exists(inputFileName))
            {
                try
                {
                    if (OpenFileData(inputFileName))
                    {
                        if (!string.IsNullOrEmpty(init.OutputFileName))
                        {
                            OutputFileName = init.OutputFileName;
                        }
                        else
                        {
                            OutputFileName = GetOutputFileName();
                        }

                        InputFileNames = GetSecondaryInputFileNames()
                                         .Union(new[] { InputFileName });
                        OutputFileNames = GetSecondaryOutputFileNames()
                                          .Union(new[] { OutputFileName });
                        IsValid = true;
                    }
                    else
                    {
                        Log.Error($"File {inputFileName} is not recognized as valid.");
                    }
                }
                catch (Exception e)
                {
                    Log.Error($"File {inputFileName} rasied an exception: {e.Message}");
                }
            }
            else
            {
                IsValid = false;
                Log.Error($"File {inputFileName} does not exists.");
            }
        }
Exemple #2
0
 public Tiledmap(ModuleInit init) : base(init)
 {
 }
Exemple #3
0
 public IModule CreateInstance(ModuleInit settings)
 {
     settings.Type = Type;
     return(Activator.CreateInstance(Type, new object[] { settings }) as IModule);
 }
Exemple #4
0
 public ParticleAnim(ModuleInit init) : base(init)
 {
 }
Exemple #5
0
 public Image(ModuleInit init) : base(init)
 {
 }
Exemple #6
0
 public Font(ModuleInit init) : base(init)
 {
 }
Exemple #7
0
 public TileCollision(ModuleInit init) : base(init)
 {
 }
Exemple #8
0
 public Animation(ModuleInit init) : base(init)
 {
 }
Exemple #9
0
 public Copy(ModuleInit init) : base(init)
 {
 }