parse enemy cols

This commit is contained in:
ethan merchant 2024-12-16 07:02:30 -05:00
parent 8898da47ce
commit 8a0f93090a

View file

@ -25,10 +25,30 @@ static class Arts
{
foreach (ModelNode node in assets_model.Nodes)
{
if (node.Mesh != null)
if (node.Mesh != null && node.Child == null) // [!] sloppy way to differentiate
{
meshes.Add(node.Name, node.Mesh);
}
else
{
// parse enemy cols
for (int i = 0; i < Mono.enemy_types.Length; i++)
{
Enemy enemy_type = Mono.enemy_types[i];
if (node.Name == enemy_type.col_ref)
{
ModelNode sibling = node.Child;
while (sibling != null)
{
enemy_type.cols.Add(new(
sibling.LocalTransform.Pose.position,
sibling.LocalTransform.Scale.x * 2.0f
));
sibling = sibling.Sibling;
}
}
}
}
}
text_style = TextStyle.FromFont(