Esempio n. 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.");
            }
        }
Esempio n. 2
0
 public Tiledmap(ModuleInit init) : base(init)
 {
 }
Esempio n. 3
0
 public IModule CreateInstance(ModuleInit settings)
 {
     settings.Type = Type;
     return(Activator.CreateInstance(Type, new object[] { settings }) as IModule);
 }
Esempio n. 4
0
 public ParticleAnim(ModuleInit init) : base(init)
 {
 }
Esempio n. 5
0
 public Image(ModuleInit init) : base(init)
 {
 }
Esempio n. 6
0
 public Font(ModuleInit init) : base(init)
 {
 }
Esempio n. 7
0
 public TileCollision(ModuleInit init) : base(init)
 {
 }
Esempio n. 8
0
 public Animation(ModuleInit init) : base(init)
 {
 }
Esempio n. 9
0
 public Copy(ModuleInit init) : base(init)
 {
 }