private void Awake() { map = GetComponent <GenerateMap>(); jsonLoader = GetComponent <LoadJsonData>(); controls = GetComponent <MapControls>(); nodeData = jsonLoader.ReadNodeData(); }
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(); } }
private void Start() { audio = GameObject.FindWithTag("BGM"); audiosource = audio.GetComponent <AudioSource>(); _LoadJsonData = FindObjectOfType <LoadJsonData>(); }