本文整理汇总了C#中ME3Explorer.Unreal.PCCObject.getObjectName方法的典型用法代码示例。如果您正苦于以下问题:C# PCCObject.getObjectName方法的具体用法?C# PCCObject.getObjectName怎么用?C# PCCObject.getObjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ME3Explorer.Unreal.PCCObject
的用法示例。
在下文中一共展示了PCCObject.getObjectName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PropertyToGrid
public static CustomProperty PropertyToGrid(Property p, PCCObject pcc)
{
string cat = p.TypeVal.ToString();
CustomProperty pg;
switch(p.TypeVal)
{
case Type.BoolProperty :
pg = new CustomProperty(pcc.Names[p.Name], cat, (p.Value.IntValue == 1), typeof(bool), false, true);
break;
case Type.FloatProperty:
byte[] buff = BitConverter.GetBytes(p.Value.IntValue);
float f = BitConverter.ToSingle(buff, 0);
pg = new CustomProperty(pcc.Names[p.Name], cat, f, typeof(float), false, true);
break;
case Type.ByteProperty:
case Type.NameProperty:
NameProp pp = new NameProp();
pp.name = pcc.getNameEntry(p.Value.IntValue);
pp.nameindex = p.Value.IntValue;
pg = new CustomProperty(pcc.Names[p.Name], cat, pp, typeof(NameProp), false, true);
break;
case Type.ObjectProperty:
ObjectProp ppo = new ObjectProp();
ppo.name = pcc.getObjectName(p.Value.IntValue);
ppo.nameindex = p.Value.IntValue;
pg = new CustomProperty(pcc.Names[p.Name], cat, ppo, typeof(ObjectProp), false, true);
break;
case Type.StructProperty:
StructProp ppp = new StructProp();
ppp.name = pcc.getNameEntry(p.Value.IntValue);
ppp.nameindex = p.Value.IntValue;
byte[] buf = new byte[p.Value.Array.Count()];
for (int i = 0; i < p.Value.Array.Count(); i++)
buf[i] = (byte)p.Value.Array[i].IntValue;
List<int> buf2 = new List<int>();
for (int i = 0; i < p.Value.Array.Count() / 4; i++)
buf2.Add(BitConverter.ToInt32(buf ,i * 4));
ppp.data = buf2.ToArray();
pg = new CustomProperty(pcc.Names[p.Name], cat, ppp, typeof(StructProp), false, true);
break;
default:
pg = new CustomProperty(pcc.Names[p.Name],cat,p.Value.IntValue,typeof(int),false,true);
break;
}
return pg;
}