Files
com.misaki.ao-volume/Runtime/Models/VolumeEntity.cs
2025-02-22 03:04:15 +09:00

34 lines
919 B
C#

namespace Misaki.AoVolume
{
internal readonly struct VolumeEntity
{
private const int _INVALID_INDEX = -1;
public readonly int entityIndex;
public readonly bool IsValid => entityIndex != _INVALID_INDEX;
public static readonly VolumeEntity Invalid = new(_INVALID_INDEX);
public VolumeEntity(int index)
{
this.entityIndex = index;
}
}
// Intermediate struct which holds the data index of an entity and other information.
internal readonly struct VolumeEntityInfo
{
private const int _INVALID_INDEX = -1;
public readonly int dataIndex;
public static readonly VolumeEntityInfo Invalid = new VolumeEntityInfo(_INVALID_INDEX);
public bool IsValid => dataIndex != _INVALID_INDEX;
public VolumeEntityInfo(int dataIndex)
{
this.dataIndex = dataIndex;
}
}
}