/// <summary>
/// 公共属性结构体,支持自定义
/// </summary>
class Attribute
{
private Whole _whole = null;
private bool _isPart = false;
public Attribute()
{
}
public Attribute(Whole who, bool ispart)
{
_whole = who;
_isPart = ispart;
}
private int legth = 1;
private bool isCustom = false;
public int Legth
{
get
{
if (_isPart)
{
if (isCustom)
{
if (_whole != null)
{
return _whole.legth;
}
else
{
return legth;
}
}
else
{
return legth;
}
}
else
{
return legth;
}
}
set
{
isCustom = true;
legth = value;
}
}
}
/// <summary>
/// 整体
/// </summary>
class Whole : Attribute
{
List<Part> m_Parts = new List<Part>();
}
/// <summary>
/// 部分
/// </summary>
class Part : Attribute
{
}
/// 公共属性结构体,支持自定义
/// </summary>
class Attribute
{
private Whole _whole = null;
private bool _isPart = false;
public Attribute()
{
}
public Attribute(Whole who, bool ispart)
{
_whole = who;
_isPart = ispart;
}
private int legth = 1;
private bool isCustom = false;
public int Legth
{
get
{
if (_isPart)
{
if (isCustom)
{
if (_whole != null)
{
return _whole.legth;
}
else
{
return legth;
}
}
else
{
return legth;
}
}
else
{
return legth;
}
}
set
{
isCustom = true;
legth = value;
}
}
}
/// <summary>
/// 整体
/// </summary>
class Whole : Attribute
{
List<Part> m_Parts = new List<Part>();
}
/// <summary>
/// 部分
/// </summary>
class Part : Attribute
{
}