当前位置: 首页>>代码示例>>C#>>正文


C# Block.CenterPoint方法代码示例

本文整理汇总了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();
 }
开发者ID:BCProgramming,项目名称:BASeBlock,代码行数:5,代码来源:cGameObject.cs

示例2: Fireball

 public Fireball(BCBlockGameState currstate, Block originBlock, float initialspeed)
     : this(currstate, originBlock.CenterPoint(), new SizeF(8, 8), initialspeed)
 {
     //Velocity = new PointF();
 }
开发者ID:BCProgramming,项目名称:BASeBlock,代码行数:5,代码来源:cGameObject.cs

示例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;
 }
开发者ID:BCProgramming,项目名称:BASeBlock,代码行数:12,代码来源:cGameObject.cs

示例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();
            }
开发者ID:BCProgramming,项目名称:BASeBlock,代码行数:14,代码来源:PowerupBlock.cs

示例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;
        }
开发者ID:BCProgramming,项目名称:BASeBlock,代码行数:15,代码来源:GameCharacter.cs

示例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);
 }
开发者ID:BCProgramming,项目名称:BASeBlock,代码行数:9,代码来源:GameCharacter.cs


注:本文中的Block.CenterPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。