本文整理汇总了C#中Agent.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Agent.Load方法的具体用法?C# Agent.Load怎么用?C# Agent.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent.Load方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
public override void LoadContent()
{
_rectangleTexture = DrawingHelper.CreateRectangleTexture(ScreenManager.GraphicsDevice, 32, 32, 2, 0, 0,
Color.White, Color.Black);
_rectangleBody = BodyFactory.Instance.CreateRectangleBody(32, 32, 1f); //template
_rectangleGeom = GeomFactory.Instance.CreateRectangleGeom(_rectangleBody, 32, 32); //template
_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 - 60));
_pyramid.Load(PhysicsSimulator);
_agent = new Agent(ScreenManager.ScreenCenter - new Vector2(320, 200));
_agent.Load(ScreenManager.GraphicsDevice, PhysicsSimulator);
base.LoadContent();
}
示例2: LoadContent
public override void LoadContent()
{
_agent = new Agent(new Vector2(500, 500));
_agent.Load(ScreenManager.GraphicsDevice, PhysicsSimulator);
//LoadObstacles();
_weldedBody = new List<Body>();
_weldedGeom = new List<Geom>();
for (int i = 0; i < 128; i++)
{
_weldedBody.Add(BodyFactory.Instance.CreateRectangleBody(25, 25, 10.0f));
_weldedGeom.Add(GeomFactory.Instance.CreateRectangleGeom(_weldedBody[i], 25, 25));
_weldedGeom[i].RestitutionCoefficient = 0.0001f;
_weldedGeom[i].FrictionCoefficient = 0.999f;
PhysicsSimulator.Add(_weldedBody[i]);
PhysicsSimulator.Add(_weldedGeom[i]);
}
for (int x = 0; x < 8; x++)
{
for (int y = 0; y < 16; y++)
{
// Width*y + x
_weldedBody[8 * y + x].Position = new Vector2((x * 30) + 80, (y * 30) + 80);
}
}
_weld = new Weld(PhysicsSimulator, _weldedGeom);
base.LoadContent();
}
示例3: LoadContent
public override void LoadContent()
{
_agent = new Agent(ScreenManager.ScreenCenter);
_agent.CollisionCategory = CollisionCategory.Cat5;
_agent.CollidesWith = CollisionCategory.All & ~CollisionCategory.Cat4;
//collide with all but Cat4 (black)
_agent.Load(ScreenManager.GraphicsDevice, PhysicsSimulator);
LoadCircles();
base.LoadContent();
}
示例4: LoadContent
public override void LoadContent()
{
_agent = new Agent(new Vector2(ScreenManager.ScreenCenter.X, 100));
_agent.Load(ScreenManager.GraphicsDevice, PhysicsSimulator);
LoadObstacles();
base.LoadContent();
}