您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
21 行
526 B
21 行
526 B
using Unity.Entities;
|
|
|
|
public class InventoryAuthoring
|
|
{
|
|
public static void AddInventoryComponents(Entity entity, EntityManager dstManager,
|
|
GameObjectConversionSystem conversionSystem)
|
|
{
|
|
dstManager.AddBuffer<Inventory.ItemEntry>(entity);
|
|
|
|
dstManager.AddComponentData(entity, new Inventory.State
|
|
{
|
|
activeSlot = 0,
|
|
});
|
|
|
|
dstManager.AddComponentData(entity, new Inventory.InternalState
|
|
{
|
|
lastActiveInventorySlot = -1,
|
|
});
|
|
}
|
|
}
|
|
|