Topic List

LurkerFAQs, Active DB, DB1, DB2, DB3, DB4, DB5, DB6, DB7, DB8, DB9, DB10, DB11, Database 12 ( 11.2023-? ), Clear

grimhilde00

Topics: 14
Last Topic: 5:36:31pm, 09/23/2023
Anyone been to Munich?

Posts: 88
Last Post: 12:30:20am, 10/07/2023
I use plain Nodes as containers a lot too for grouping something of a particular type so I can go like this

-------
generally have a lot of exports for node references and configs

[ExportGroup("Config")]
[Export]
YamlResource _recipeYaml;
Recipe _recipe;

[ExportGroup("References")]
[Export]
Node _equipmentContainer;
Array<Equipment> _equipment = new Array<Equipment>();

------
then on ready do this

public override void _Ready()
{
CacheComponents();
Setup();
ConnectSignals();
}

void CacheComponents()
{
foreach (var child in _equipmentContainer.GetChildren())
{
_equipment.Add((Equipment)child);
}

_recipe = _recipeYaml.Deserialize<Recipe>();
}

-----

apparently spacing doesn't work well even with the code formatting..

---
kriem


Manual Topics: 0
Last Topic:
[none]

Manual Posts: 0
Last Post:
[none]
---