parse enemy cols
This commit is contained in:
parent
8898da47ce
commit
8a0f93090a
1 changed files with 21 additions and 1 deletions
22
src/Arts.cs
22
src/Arts.cs
|
@ -25,10 +25,30 @@ static class Arts
|
||||||
{
|
{
|
||||||
foreach (ModelNode node in assets_model.Nodes)
|
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);
|
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(
|
text_style = TextStyle.FromFont(
|
||||||
|
|
Loading…
Add table
Reference in a new issue