//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using System.Runtime.InteropServices;
namespace GameFramework.Resource
{
public partial struct LocalVersionList
{
///
/// 文件系统。
///
[StructLayout(LayoutKind.Auto)]
public struct FileSystem
{
private static readonly int[] EmptyIntArray = new int[] { };
private readonly string m_Name;
private readonly int[] m_ResourceIndexes;
///
/// 初始化文件系统的新实例。
///
/// 文件系统名称。
/// 文件系统包含的资源索引集合。
public FileSystem(string name, int[] resourceIndexes)
{
if (name == null)
{
throw new GameFrameworkException("Name is invalid.");
}
m_Name = name;
m_ResourceIndexes = resourceIndexes ?? EmptyIntArray;
}
///
/// 获取文件系统名称。
///
public string Name
{
get
{
return m_Name;
}
}
///
/// 获取文件系统包含的资源索引集合。
///
/// 文件系统包含的资源索引集合。
public int[] GetResourceIndexes()
{
return m_ResourceIndexes;
}
}
}
}