本文整理汇总了C#中Game.World类的典型用法代码示例。如果您正苦于以下问题:C# World类的具体用法?C# World怎么用?C# World使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
World类属于Game命名空间,在下文中一共展示了World类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now;
for(int x0 = 0; x0 < Asteroids.Count; x0++) {
Asteroids[x0].Update(dt, world);
}
for(int x0 = 0; x0 < Beams.Count; x0++) {
Beams[x0].Update(dt, world);
}
Camera.Update(dt, world);
Ship.Update(dt, world);
this.Rule0(dt, world);
this.Rule1(dt, world);
this.Rule2(dt, world);
this.Rule3(dt, world);
this.Rule4(dt, world);
this.Rule5(dt, world);
this.Rule6(dt, world);
this.Rule7(dt, world);
this.Rule8(dt, world);
this.Rule9(dt, world);
this.Rule10(dt, world);
this.Rule11(dt, world);
this.Rule12(dt, world);
this.Rule13(dt, world);
}
示例2: Main
public static void Main(string[] args)
{
World world = new World();
world.Add(new Map("maps/forest.tmx"));
world.Add(new Player());
world.Run();
}
示例3: Map
public Map(World world, RectangleF bounds)
{
Entities = new List<Entity>();
World = world;
world.Maps.Add(this);
}
示例4: CreateStaticGeometryBuffers
public static Gem.Render.SceneNode CreateStaticGeometryBuffers(World From, GraphicsDevice Device)
{
var tilePiles = new List<List<TileInstance>>();
From.Grid.ForEachTile((cell, x, y, z) =>
{
if (cell.Tile == null) return;
var existingPile = tilePiles.FirstOrDefault(pile => pile[0].Tile.Combinable(cell.Tile));
if (existingPile == null)
{
existingPile = new List<TileInstance>();
tilePiles.Add(existingPile);
}
existingPile.Add(new TileInstance(cell.Tile, x, y, z));
});
var r = new Gem.Render.BranchNode();
foreach (var pile in tilePiles)
{
var mesh = Gem.Geo.Gen.InstanceMerge(
pile.Select(i => i.Tile.RenderMesh),
pile.Select(t => Matrix.CreateTranslation(t.X + 0.5f, t.Y + 0.5f, t.Z)));
var compiledMesh = Gem.Geo.CompiledModel.CompileModel(mesh, Device);
r.Add(new Gem.Render.CompiledMeshNode(compiledMesh, pile[0].Tile.Texture));
}
return r;
}
示例5: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now;
Ship.Update(dt, world);
this.Rule0(dt, world);
}
示例6: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now;
Game1.Update(dt, world);
Game2.Update(dt, world);
}
示例7: Load
public void Load()
{
Textures.Load();
SpriteSheets.Load();
Animations.Load();
world = new World();
}
示例8: Rule1
public void Rule1(float dt, World world)
{
Boids = (
(Boids).Select(__ContextSymbol2 => new { ___b10 = __ContextSymbol2 })
.Where(__ContextSymbol3 => !(__ContextSymbol3.___b10.Destroyed))
.Select(__ContextSymbol4 => __ContextSymbol4.___b10)
.ToList<Boid>()).ToList<Boid>();
}
示例9: Rule0
public void Rule0(float dt, World world)
{
Planets = (
(Planets).Select(__ContextSymbol5 => new { ___p00 = __ContextSymbol5 })
.Where(__ContextSymbol6 => !(__ContextSymbol6.___p00.OutOfBounds))
.Select(__ContextSymbol7 => __ContextSymbol7.___p00)
.ToList<Planet>()).ToList<Planet>();
}
示例10: Rule0
public void Rule0(float dt, World world)
{
Cubes = (
(Cubes).Select(__ContextSymbol1 => new { ___c00 = __ContextSymbol1 })
.Where(__ContextSymbol2 => ((__ContextSymbol2.___c00.UnityCube.Destroyed) == (false)))
.Select(__ContextSymbol3 => __ContextSymbol3.___c00)
.ToList<Cube>()).ToList<Cube>();
}
示例11: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now; this.Rule5(dt, world);
this.Rule0(dt, world);
this.Rule1(dt, world);
this.Rule2(dt, world);
this.Rule3(dt, world);
this.Rule4(dt, world);
}
示例12: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now; this.Rule0(dt, world);
for(int x0 = 0; x0 < Cubes.Count; x0++) {
Cubes[x0].Update(dt, world);
}
this.Rule1(dt, world);
}
示例13: MainForm
public MainForm()
{
world = new World();
InitializeComponent();
time = Stopwatch.GetTimestamp();
timer1.Start();
}
示例14: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now;
BoidBoss.Update(dt, world);
for(int x0 = 0; x0 < Boids.Count; x0++) {
Boids[x0].Update(dt, world);
}
}
示例15: Update
public override void Update(World world)
{
Vector2f vel = new Vector2f();
if (Keyboard.IsKeyPressed(Keyboard.Key.A))
vel.X = -1;
if (Keyboard.IsKeyPressed(Keyboard.Key.D))
vel.X = 1;
Velocity = vel * 4.5f;
base.Update(world);
}