本文整理汇总了C#中Floor.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Floor.Load方法的具体用法?C# Floor.Load怎么用?C# Floor.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Floor
的用法示例。
在下文中一共展示了Floor.Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public override void Initialize()
{
ClearCanvas();
physicsSimulator = new PhysicsSimulator(new Vector2(0, 100));
physicsSimulator.BiasFactor = .4f;
int borderWidth = (int) (ScreenManager.ScreenHeight*.05f);
_border = new Border(ScreenManager.ScreenWidth + borderWidth*2, ScreenManager.ScreenHeight + borderWidth*2,
borderWidth, ScreenManager.ScreenCenter);
_border.Load(this, physicsSimulator);
_rectangleBody = BodyFactory.Instance.CreateRectangleBody(physicsSimulator, 32, 32, 1f);
_rectangleGeom = GeomFactory.Instance.CreateRectangleGeom(physicsSimulator, _rectangleBody, 32, 32);
_rectangleGeom.FrictionCoefficient = .4f;
_rectangleGeom.RestitutionCoefficient = 0f;
//create the pyramid near the bottom of the screen.
_pyramid = new Pyramid(_rectangleBody, _rectangleGeom, 32f/3f, 32f/3f, 32, 32, _pyramidBaseBodyCount,
new Vector2(ScreenManager.ScreenCenter.X - _pyramidBaseBodyCount*.5f*(32 + 32/3),
ScreenManager.ScreenHeight - 125));
_pyramid.Load(this, physicsSimulator);
_floor = new Floor(ScreenManager.ScreenWidth, 100,
new Vector2(ScreenManager.ScreenCenter.X, ScreenManager.ScreenHeight - 50));
_floor.Load(this, physicsSimulator);
_agent = new Agent(ScreenManager.ScreenCenter - new Vector2(320, 300));
_agent.Load(this, physicsSimulator);
controlledBody = _agent.Body;
base.Initialize();
}