本文整理汇总了C#中Block.CenterPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Block.CenterPoint方法的具体用法?C# Block.CenterPoint怎么用?C# Block.CenterPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Block
的用法示例。
在下文中一共展示了Block.CenterPoint方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BlueFireball
public BlueFireball(BCBlockGameState currstate, Block originBlock, float initialspeed)
: this(currstate, originBlock.CenterPoint(), new SizeF(8, 8), initialspeed)
{
setattributes();
}
示例2: Fireball
public Fireball(BCBlockGameState currstate, Block originBlock, float initialspeed)
: this(currstate, originBlock.CenterPoint(), new SizeF(8, 8), initialspeed)
{
//Velocity = new PointF();
}
示例3: BoxDestructor
public BoxDestructor(Block basedon, PointF Velocity, PointF AccelerationFactor, ImageAttributes AffectImageAttributes)
: base(basedon.CenterPoint(), Velocity)
{
_VelocityDecay = AccelerationFactor;
ObjectSize = basedon.BlockSize;
ignorelist.Add(basedon);
useDrawImage = basedon.DrawToImage();
ImageAttributes alphaizer = new ImageAttributes();
alphaizer.SetColorMatrix(ColorMatrices.GetColourizer(1, 1, 1, 0.5f));
AlphadImage = BCBlockGameState.AppyImageAttributes(useDrawImage, alphaizer);
OriginalBlock = basedon;
}
示例4: TransitoryBlockObject
private Bitmap useDrawImage = null; //created from the block in constructor.
#endregion Fields
#region Constructors
public TransitoryBlockObject(Block blockobj)
: base(blockobj.CenterPoint(), blockobj.BlockSize)
{
TransitBlock = blockobj;
Graphics gcanvas = null;
Block.DrawBlock(blockobj, out useDrawImage, out gcanvas);
gcanvas.Dispose();
}
示例5: GameCharacterPowerup
protected GameCharacterPowerup(Block EmergeFrom, Dictionary<String, String[]> pStateFrameData, int pFrameDelay, ImageAttributes puseattributes)
: base(EmergeFrom.CenterPoint(), new PointF(0, 0), pStateFrameData, pFrameDelay, puseattributes)
{
//set starting position to emerge from the center of the block.
EnemyAction = "IDLE";
//Image gotimage = base.GetCurrentImage();
SizeF grabsize = DrawSize;
int Xcoord = (int)(EmergeFrom.CenterPoint().X - (grabsize.Width / 2));
int Ycoord = (int)(EmergeFrom.BlockRectangle.Top);
Location = new PointF(Xcoord, Ycoord);
Emerging = true;
EmergingFrom = EmergeFrom;
}
示例6: macGuffinpowerup
public macGuffinpowerup(Block EmergeFrom)
: base(EmergeFrom,getOrbKey(),20)
{
Emerging = false;
GravityEffect = new PointF(0, 2);
Velocity = new PointF(0, -5);
DrawSize = new SizeF(10, 10);
Location = new PointF(EmergeFrom.CenterPoint().X-DrawSize.Width/2,EmergeFrom.BlockRectangle.Top-DrawSize.Height);
}