本文整理匯總了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();
}