コード例 #1
0
    public static MaterialType GetPrevMaterial(this MaterialType type)
    {
        int i = type.GetInt() - 1;

        if (i < 0)
        {
            return(type);
        }
        return(i.ToMaterialType());
    }
コード例 #2
0
    public static MaterialType GetNextMaterial(this MaterialType type)
    {
        int i = type.GetInt() + 1;

        if (i >= MaterialType.Total.GetInt())
        {
            return(type);
        }
        return(i.ToMaterialType());
    }