Zombie editor
This commit is contained in:
parent
623362e430
commit
7d1ca26baa
23 changed files with 435 additions and 25 deletions
19
addons/pvzadventure/scripts/ZE_AssetBrowser.cs
Normal file
19
addons/pvzadventure/scripts/ZE_AssetBrowser.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using Godot;
|
||||
|
||||
|
||||
[Tool]
|
||||
public partial class ZE_AssetBrowser : HBoxContainer
|
||||
{
|
||||
const string ZOMBIE_PATH = "res://resources/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