缺氧
   
奖励
收藏
已收藏
取消收藏
2 条留言
Diego Dela Vega  [作者] 2022 年 9 月 28 日 上午 5:04 
And for reference the used function:
Components.Cmps<MinionAssignablesProxy> map = Components.MinionAssignablesProxy;
foreach (MinionAssignablesProxy item in map)
{
GameObject tgo = item.GetTargetGameObject();
MinionIdentity identity = tgo.GetComponent<MinionIdentity>();
AttributeLevels level = tgo.GetComponent<AttributeLevels>();
Attributes attributes = tgo.GetComponent<MinionResume>()?.GetAttributes();
if (level != null && attributes != null)
{
Debug.Log("Minion Resumee: " + identity.name);
foreach (string name in names)
{
Debug.Log(string.Format("\t{0}:\n\t\tFrom Attributes: {1}\n\t\tFrom Levels: {2}", name, (int)attributes.GetValue(name), level.GetAttributeLevel(name).GetLevel()));
}
}
else
{
Debug.Log("Minion Resumee failed");
}
}
Diego Dela Vega  [作者] 2022 年 9 月 28 日 上午 5:02 
[11:52:39.358] [1] [INFO] Minion Resumee: Quinn
[11:52:39.358] [1] [INFO] Strength:
From Attributes: 4
From Levels: 0
[11:52:39.358] [1] [INFO] Caring:
From Attributes: 0
From Levels: 0
[11:52:39.358] [1] [INFO] Construction:
From Attributes: 15
From Levels: 15
[11:52:39.358] [1] [INFO] Digging:
From Attributes: 21
From Levels: 15
[11:52:39.358] [1] [INFO] Machinery:
From Attributes: 25
From Levels: 20
[11:52:39.358] [1] [INFO] Learning:
From Attributes: 7
From Levels: 0
[11:52:39.358] [1] [INFO] Cooking:
From Attributes: 0
From Levels: 0
[11:52:39.358] [1] [INFO] Botanist:
From Attributes: 0
From Levels: 0
[11:52:39.358] [1] [INFO] Art:
From Attributes: 0
From Levels: 0
[11:52:39.358] [1] [INFO] Ranching:
From Attributes: 0
From Levels: 0
[11:52:39.358] [1] [INFO] Athletics:
From Attributes: 27
From Levels: 20
[11:52:39.358] [1] [INFO] SpaceNavigation:
From Attributes: 0
From Levels: 0