本文整理汇总了C#中ObjectData类的典型用法代码示例。如果您正苦于以下问题:C# ObjectData类的具体用法?C# ObjectData怎么用?C# ObjectData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectData类属于命名空间,在下文中一共展示了ObjectData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: JoinNode
private JoinNode(ObjectData data)
: base(data)
{
LeftColumnName = data.GetValue<ObjectName>("LeftColumn");
Operator = (SqlExpressionType) data.GetInt32("Operator");
RightExpression = data.GetValue<SqlExpression>("RightExpression");
}
示例2: Init
public override void Init(ObjectData data)
{
byte[] artfile = ObjectHelper.OpenArtFile("../artnem/Prison Capsule.bin", CompressionType.Nemesis);
img = ObjectHelper.MapASMToBmp(artfile, "../_maps/Prison Capsule.asm", 0, 0);
for (int i = 0; i < 2; i++)
imgs.Add(ObjectHelper.MapASMToBmp(artfile, "../_maps/Prison Capsule.asm", i, 0));
}
示例3: QueryParameter
private QueryParameter(ObjectData data)
{
Name = data.GetString("Name");
SqlType = data.GetValue<SqlType>("Type");
Value = data.GetValue<Objects.ISqlObject>("Value");
Direction = (QueryParameterDirection) data.GetInt32("Direction");
}
示例4: JoinPart
private JoinPart(ObjectData data)
{
TableName = data.GetValue<ObjectName>("Table");
SubQuery = data.GetValue<SqlQueryExpression>("SubQuery");
JoinType = (JoinType) data.GetInt32("JoinType");
OnExpression = data.GetValue<SqlExpression>("On");
}
示例5: Init
public override void Init(ObjectData data)
{
byte[] artfile = ObjectHelper.OpenArtFile("../artnem/GHZ Breakable Wall.bin", CompressionType.Nemesis);
img = ObjectHelper.MapASMToBmp(artfile, "../_maps/Smashable Walls.asm", 0, 2);
for (int i = 0; i < labels.Length; i++)
imgs.Add(ObjectHelper.MapASMToBmp(artfile, "../_maps/Smashable Walls.asm", labels[i], 2));
}
示例6: AddObject
private static ObjectData AddObject(JSONObject objJSON)
{
ObjectData obj = new ObjectData();
obj.objectType = objJSON["name"].str.ToLower();
obj.rotation = -objJSON["rotation"].f;
if (objJSON["properties"]["waypoint"])
obj.waypointIndex = int.Parse(objJSON["properties"]["waypoint"].str);
Vector4 values = new Vector4(objJSON["x"].f, objJSON["y"].f, objJSON["width"].f, objJSON["height"].f);
values.x = values.x - Constants.SCREEN_WIDTH_BY_PIXEL / 2;
values.y = Constants.SCREEN_HEIGHT_BY_PIXEL - values.y - Constants.SCREEN_HEIGHT_BY_PIXEL / 2;
float alpha = obj.rotation * Mathf.Deg2Rad - Mathf.Atan2(values.w, values.z);
float h = Mathf.Sqrt(values.z * values.z + values.w * values.w) / 2;
values.x += Mathf.Cos(alpha) * h;
values.y += Mathf.Sin(alpha) * h;
values *= Constants.FACTOR_PIXEL_TO_METER;
obj.position = new Vector2(values.x, values.y);
obj.size = new Vector2(values.z, values.w);
return obj;
}
示例7: SqlConditionalExpression
private SqlConditionalExpression(ObjectData data)
: base(data)
{
TestExpression = data.GetValue<SqlExpression>("Test");
TrueExpression = data.GetValue<SqlExpression>("True");
FalseExpression = data.GetValue<SqlExpression>("False");
}
示例8: Init
public override void Init(ObjectData data)
{
img = ObjectHelper.UnknownObject;
List<Sprite> sprs = new List<Sprite>();
int left = -208;
int right = 208;
int top = 0;
int bottom = 0;
for (int i = 0; i < Obj06_CosineTable.Length; i++)
{
top = Math.Min(Obj06_CosineTable[i], top);
bottom = Math.Max(Obj06_CosineTable[i], bottom);
}
Point offset = new Point(left, top);
BitmapBits bmp = new BitmapBits(right - left, bottom - top);
for (int x = 0; x < 0x1A0; x++)
{
int y = Obj06_CosineTable[x] - top;
if (x < bmp.Width & y >= 0 & y < bmp.Height)
bmp[x, y] = 0x1C;
}
sprs.Add(new Sprite(bmp, offset));
offset = new Point(-192, 0);
bmp = new BitmapBits(0x180, 53);
bmp.DrawLine(0x1C, 192, 0, 192, 52);
bmp.DrawLine(0x1C, 0, 52, 0x180, 52);
sprs.Add(new Sprite(bmp, offset));
sprs.Add(img);
sprite = new Sprite(sprs.ToArray());
}
示例9: ReadVerbTable
protected override void ReadVerbTable(ObjectData data, int size)
{
var pos = _reader.BaseStream.Position - 8;
int id;
do
{
id = _reader.ReadInt32();
if (id != 0)
{
var offset = _reader.ReadInt32();
if (!data.ScriptOffsets.ContainsKey(id))
{
data.ScriptOffsets.Add(id, offset);
}
}
}
while(id != 0);
var realCodeOffset = _reader.BaseStream.Position - pos;
var virtualCodeOffset = (8 * data.ScriptOffsets.Count + 4 + 8);
var diff = (int)(realCodeOffset - virtualCodeOffset);
foreach (var key in data.ScriptOffsets.Keys.ToList())
{
data.ScriptOffsets[key] -= diff;
}
data.Script.Offset = virtualCodeOffset - 8;
}
示例10: FromTable
private FromTable(ObjectData data)
{
Name = data.GetString("Name");
SubQuery = data.GetValue<SqlQueryExpression>("SubQuery");
Alias = data.GetString("Alias");
IsSubQuery = data.HasValue("SubQuery");
}
示例11: Init
public override void Init(ObjectData data)
{
byte[] artfile = ObjectHelper.OpenArtFile("../artnem/Enemy Newtron.bin", CompressionType.Nemesis);
img = ObjectHelper.MapASMToBmp(artfile, "../_maps/Newtron.asm", 3, 0);
for (int i = 0; i < labels.Length; i++)
imgs.Add(ObjectHelper.MapASMToBmp(artfile, "../_maps/Newtron.asm", labels[i], i));
}
示例12: SqlBinaryExpression
private SqlBinaryExpression(ObjectData data)
: base(data)
{
Left = data.GetValue<SqlExpression>("Left");
Right = data.GetValue<SqlExpression>("Right");
expressionType = (SqlExpressionType) data.GetInt32("ExpressionType");
}
示例13: SimpleSelectNode
private SimpleSelectNode(ObjectData data)
: base(data)
{
ColumnName = data.GetValue<ObjectName>("Column");
OperatorType = (SqlExpressionType) data.GetInt32("Operator");
Expression = data.GetValue<SqlExpression>("Expression");
}
示例14: Init
public override void Init(ObjectData data)
{
byte[] artfile = ObjectHelper.OpenArtFile("../artnem/GHZ Swinging Platform.bin", CompressionType.Nemesis);
img = ObjectHelper.MapASMToBmp(artfile, "../_maps/Swinging Platforms (GHZ).asm", 0, 2);
for (int i = 0; i < labels.Length; i++)
imgs.Add(ObjectHelper.MapASMToBmp(artfile, "../_maps/Swinging Platforms (GHZ).asm", labels[i], i == 1 ? 1 : 2));
}
示例15: GrantPrivilegesStatement
private GrantPrivilegesStatement(ObjectData data)
{
ObjectName = data.GetValue<ObjectName>("ObjectName");
Grantee = data.GetString("Grantee");
Privilege = (Privileges) data.GetInt32("Privilege");
Columns = data.GetValue<string[]>("Columns");
WithGrant = data.GetBoolean("WithGrant");
}