Editor slight refactor
This commit is contained in:
parent
285b90f503
commit
8cfbad01cf
23 changed files with 9 additions and 8 deletions
|
|
@ -1,20 +0,0 @@
|
|||
using Godot;
|
||||
using Newlon.Resources;
|
||||
|
||||
|
||||
[Tool]
|
||||
public partial class ZE_AssetBrowser : HBoxContainer
|
||||
{
|
||||
const string ZOMBIE_PATH = "res://assets/zombies/";
|
||||
private PackedScene scene = ResourceLoader.Load<PackedScene>("uid://iwnklc62rni8");
|
||||
public override void _Ready()
|
||||
{
|
||||
foreach (var file in ResourceLoader.ListDirectory(ZOMBIE_PATH))
|
||||
{
|
||||
var data = ResourceLoader.Load<ZombieResource>(ZOMBIE_PATH + file);
|
||||
var button = scene.Instantiate<ZE_AssetBrowserButton>();
|
||||
button.SetData(data);
|
||||
AddChild(button);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue