feat: some application of source code generator

This commit is contained in:
redglow
2026-07-19 19:18:01 +02:00
parent aae9c083d9
commit 036e4af431
6 changed files with 14 additions and 34 deletions
+1
View File
@@ -0,0 +1 @@
uid://c4pr1lc7ikb4h
+6 -1
View File
@@ -1,7 +1,9 @@
using System;
using Godot;
using GodotHostTest.AetherBind;
using GodotHostTest.Interfaces;
using OwofGames.AetherBind;
using OwofGames.GodotLume;
namespace GodotHostTest.Game.Root;
@@ -17,6 +19,9 @@ public partial class Root : Node2D
{
var levelData = _levelDataProvider.GetLevelData(_currentLevel.LevelNumber);
AddChild(_sceneInstantiator.Instantiate(_levelScene,
(IValueSetter<ILevel> levelSetter) => { levelSetter.Set(levelData); }));
OnInstantiate(levelValueSetter => levelValueSetter.Set(levelData))));
}
[ServiceMethod]
private partial Action<IProvider> OnInstantiate(Action<IValueSetter<ILevel>> a);
}