Esempio n. 1
0
 private void Awake()
 {
     map        = GetComponent <GenerateMap>();
     jsonLoader = GetComponent <LoadJsonData>();
     controls   = GetComponent <MapControls>();
     nodeData   = jsonLoader.ReadNodeData();
 }
Esempio n. 2
0
        public async Task Apply(ApplyArgs args)
        {
            ExpandoObject data = new LoadJsonData(args.DataSourcePath).Execute();

            string content = args.TemplateEngine switch
            {
                TemplateEngine.Razor => new RenderRazorTemplate(args.TemplatePath, data).Execute(),
                TemplateEngine.Liquid => new RenderLiquidTemplate(args.TemplatePath, data).Execute(),
                _ => throw new ArgumentException("Invalid template engine selected")
            };

            new SaveFile(args.OutputFilePath, content).Execute();
        }
    }
Esempio n. 3
0
 private void Start()
 {
     audio         = GameObject.FindWithTag("BGM");
     audiosource   = audio.GetComponent <AudioSource>();
     _LoadJsonData = FindObjectOfType <LoadJsonData>();
 }