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


C# World.AddBreakableBody方法代码示例

本文整理汇总了C#中FarseerPhysics.Dynamics.World.AddBreakableBody方法的典型用法代码示例。如果您正苦于以下问题:C# World.AddBreakableBody方法的具体用法?C# World.AddBreakableBody怎么用?C# World.AddBreakableBody使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FarseerPhysics.Dynamics.World的用法示例。


在下文中一共展示了World.AddBreakableBody方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateBreakableBody

 public static BreakableBody CreateBreakableBody(World world, IEnumerable<Shape> shapes, Vector2 position = new Vector2(), float rotation = 0)
 {
     BreakableBody breakableBody = new BreakableBody(world, shapes, position, rotation);
     breakableBody.MainBody.Position = position;
     world.AddBreakableBody(breakableBody);
     return breakableBody;
 }
开发者ID:tinco,项目名称:Farseer-Physics,代码行数:7,代码来源:BodyFactory.cs

示例2: CreateBreakableBody

        public static BreakableBody CreateBreakableBody(World world, IEnumerable<Shape> shapes, Vector2 position)
        {
            BreakableBody breakableBody = new BreakableBody(shapes, world);
            breakableBody.MainBody.Position = position;
            world.AddBreakableBody(breakableBody);

            return breakableBody;
        }
开发者ID:TIHan,项目名称:MemeFighter,代码行数:8,代码来源:BodyFactory.cs

示例3: CreateBreakableBody

        /// <summary>
        /// Creates a breakable body. You would want to remove collinear points before using this.
        /// </summary>
        /// <param name="world">The world.</param>
        /// <param name="vertices">The vertices.</param>
        /// <param name="density">The density.</param>
        /// <param name="position">The position.</param>
        /// <returns></returns>
        public static BreakableBody CreateBreakableBody(World world, Vertices vertices, float density, Vector2 position)
        {
            List<Vertices> triangles = EarclipDecomposer.ConvexPartition(vertices);

            BreakableBody breakableBody = new BreakableBody(triangles, world, density);
            breakableBody.MainBody.Position = position;
            world.AddBreakableBody(breakableBody);

            return breakableBody;
        }
开发者ID:HaKDMoDz,项目名称:Lunar-Development-Kit,代码行数:18,代码来源:FixtureFactory.cs

示例4: CreateBreakableBody

        /// <summary>
        /// Creates a breakable body. You would want to remove collinear points before using this.
        /// </summary>
        /// <param name="world">The world.</param>
        /// <param name="vertices">The vertices.</param>
        /// <param name="density">The density.</param>
        /// <param name="position">The position.</param>
        /// <returns></returns>
        public static BreakableBody CreateBreakableBody(World world, Vertices vertices, float density, Vector2 position,
            PressPlay.FFWD.Components.Collider userData)
        {
            List<Vertices> triangles = EarclipDecomposer.ConvexPartition(vertices);

            BreakableBody breakableBody = new BreakableBody(triangles, world, density, userData);
            breakableBody.MainBody.Position = position;
            world.AddBreakableBody(breakableBody);

            return breakableBody;
        }
开发者ID:Joelone,项目名称:FFWD,代码行数:19,代码来源:BodyFactory.cs


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