本文整理汇总了C#中ObjectEntry类的典型用法代码示例。如果您正苦于以下问题:C# ObjectEntry类的具体用法?C# ObjectEntry怎么用?C# ObjectEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectEntry类属于命名空间,在下文中一共展示了ObjectEntry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetBounds
public override Rectangle GetBounds(ObjectEntry obj, Point camera)
{
if (obj.SubType < labels.Length)
return new Rectangle(obj.X + imgs[obj.SubType].X - camera.X, obj.Y + imgs[obj.SubType].Y - camera.Y, imgs[obj.SubType].Width, imgs[obj.SubType].Height);
else
return new Rectangle(obj.X + img.X - camera.X, obj.Y + img.Y - camera.Y, img.Width, img.Height);
}
开发者ID:crashmahoney,项目名称:s1mv,代码行数:7,代码来源:Newtron.cs
示例2: Bounds
public override Rectangle Bounds(ObjectEntry obj, Point camera)
{
if (obj.SubType <= 10)
return new Rectangle(obj.X + offsets[obj.SubType].X - camera.X, obj.Y + offsets[obj.SubType].Y - camera.Y, imgs[obj.SubType].Width, imgs[obj.SubType].Height);
else
return new Rectangle(obj.X + offset.X - camera.X, obj.Y + offset.Y - camera.Y, img.Width, img.Height);
}
开发者ID:OurSonic,项目名称:Sonic-Image-Parser,代码行数:7,代码来源:Monitor.cs
示例3: GetSprite
public override Sprite GetSprite(ObjectEntry obj)
{
byte subtype = obj.SubType;
if (obj.SubType > labels.Length) subtype = 0;
BitmapBits bits = new BitmapBits(imgs[subtype].Image);
bits.Flip(obj.XFlip, obj.YFlip);
return new Sprite(bits, new Point(obj.X + imgs[subtype].Offset.X, obj.Y + imgs[subtype].Offset.Y));
}
开发者ID:crashmahoney,项目名称:s1mv,代码行数:8,代码来源:Newtron.cs
示例4: GetSprite
public override Sprite GetSprite(ObjectEntry obj)
{
int st = -(((obj.SubType & 0x1F) * img.Width) / 2) + img.X;
List<Sprite> sprs = new List<Sprite>();
for (int i = 0; i < (obj.SubType & 0x1F); i++)
sprs.Add(new Sprite(img.Image, new Point(st + (i * img.Width), img.Y)));
Sprite spr = new Sprite(sprs.ToArray());
spr.Offset = new Point(spr.X + obj.X, spr.Y + obj.Y);
return spr;
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:10,代码来源:Bridge.cs
示例5: GetSprite
public override Sprite GetSprite(ObjectEntry obj)
{
int w = ((obj.SubType >> 4) + 1) * 16;
int h = ((obj.SubType & 0xF) + 1) * 16;
BitmapBits bmp = new BitmapBits(w, h);
bmp.DrawRectangle(0x1C, 0, 0, w - 1, h - 1);
Sprite spr = new Sprite(new Sprite(bmp, new Point(-(w / 2), -(h / 2))), img);
spr.Offset = new Point(spr.X + obj.X, spr.Y + obj.Y);
return spr;
}
开发者ID:MineRobber9000,项目名称:s2disasm,代码行数:10,代码来源:InvisibleBlock.cs
示例6: GetSprite
public override Sprite GetSprite(ObjectEntry obj)
{
int count = Math.Min(6, obj.SubType & 7) + 1;
Size space = Spacing[obj.SubType >> 4];
Point loc = new Point(img.X, img.Y);
List<Sprite> sprs = new List<Sprite>();
for (int i = 0; i < count; i++)
{
sprs.Add(new Sprite(img.Image, loc));
loc += space;
}
Sprite spr = new Sprite(sprs.ToArray());
spr.Offset = new Point(spr.X + obj.X, spr.Y + obj.Y);
return spr;
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:15,代码来源:Ring.cs
示例7: GetSprite
public override Sprite GetSprite(ObjectEntry obj)
{
int length = obj.SubType & 15;
List<Sprite> sprs = new List<Sprite>();
sprs.Add(imgs[2]);
int yoff = 16;
for (int i = 0; i < length; i++)
{
sprs.Add(new Sprite(imgs[1].Image, new Point(imgs[1].X, yoff + imgs[1].Y)));
yoff += 16;
}
yoff -= 8;
sprs.Add(new Sprite(imgs[0].Image, new Point(imgs[0].X, yoff + imgs[0].Y)));
Sprite spr = new Sprite(sprs.ToArray());
spr.Offset = new Point(spr.X + obj.X, spr.Y + obj.Y);
return spr;
}
开发者ID:crashmahoney,项目名称:s1mv,代码行数:17,代码来源:SwingingPlatform.cs
示例8: GetSprite
public override Sprite GetSprite(ObjectEntry obj)
{
int frame = obj.SubType >> 4;
if (frame > 5) frame = 0;
BitmapBits bits = new BitmapBits(imgs[frame].Image);
bits.Flip(obj.XFlip, obj.YFlip);
return new Sprite(bits, new Point(obj.X + imgs[frame].X, obj.Y + imgs[frame].Y));
}
开发者ID:crashmahoney,项目名称:s1mv,代码行数:8,代码来源:Spikes.cs
示例9: GetBounds
public override Rectangle GetBounds(ObjectEntry obj, Point camera)
{
int frame = obj.SubType >> 4;
if (frame > 5) frame = 0;
return new Rectangle(obj.X + imgs[frame].X - camera.X, obj.Y + imgs[frame].Y - camera.Y, imgs[frame].Width, imgs[frame].Height);
}
开发者ID:crashmahoney,项目名称:s1mv,代码行数:6,代码来源:Spikes.cs
示例10: SetSize
private static void SetSize(ObjectEntry obj, object value)
{
obj.SubType = (byte)((obj.SubType & ~3) | ((byte)value & 3));
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
示例11: SetRDPriority
private static void SetRDPriority(ObjectEntry obj, object value)
{
obj.SubType = (byte)((obj.SubType & ~32) | ((Priority)value == Priority.High ? 32 : 0));
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
示例12: Bounds
public override Rectangle Bounds(ObjectEntry obj, Point camera)
{
return new Rectangle(obj.X + offset.X - camera.X, obj.Y + offset.Y - camera.Y, img.Width, img.Height);
}
开发者ID:OurSonic,项目名称:Sonic-Image-Parser,代码行数:4,代码来源:Eggman.cs
示例13: GetDirection
private static object GetDirection(ObjectEntry obj)
{
return (obj.SubType & 4) != 0 ? Direction.Horizontal : Direction.Vertical;
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
示例14: SetDirection
private static void SetDirection(ObjectEntry obj, object value)
{
obj.SubType = (byte)((obj.SubType & ~4) | ((Direction)value == Direction.Horizontal ? 4 : 0));
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
示例15: SetGroundOnly
private static void SetGroundOnly(ObjectEntry obj, object value)
{
obj.SubType = (byte)((obj.SubType & ~128) | ((bool)value == true ? 128 : 0));
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
示例16: GetRDPriority
private static object GetRDPriority(ObjectEntry obj)
{
return (obj.SubType & 32) != 0 ? Priority.High : Priority.Low;
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
示例17: GetSize
private static object GetSize(ObjectEntry obj)
{
return (byte)(obj.SubType & 3);
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
示例18: GetRDPath
private static object GetRDPath(ObjectEntry obj)
{
return (obj.SubType & 8) >> 3;
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
示例19: GetLUPath
private static object GetLUPath(ObjectEntry obj)
{
return (obj.SubType & 16) >> 4;
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
示例20: GetGroundOnly
private static object GetGroundOnly(ObjectEntry obj)
{
return (obj.SubType & 128) != 0 ? true : false;
}
开发者ID:Retro-Git-Repository,项目名称:sonic-retro-git,代码行数:4,代码来源:PathSwapper.cs
注:本文中的ObjectEntry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论