本文整理汇总了C#中Game.World类的典型用法代码示例。如果您正苦于以下问题:C# World类的具体用法?C# World怎么用?C# World使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
World类属于Game命名空间,在下文中一共展示了World类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:26,代码来源:World.cs
示例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();
}
开发者ID:remy22,项目名称:game-1,代码行数:7,代码来源:World.cs
示例3: Map
public Map(World world, RectangleF bounds)
{
Entities = new List<Entity>();
World = world;
world.Maps.Add(this);
}
开发者ID:Phyyl,项目名称:LudumDare33,代码行数:7,代码来源:Map.cs
示例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;
}
开发者ID:Blecki,项目名称:CCDC,代码行数:29,代码来源:WorldModel-CreateStaticGeometryBuffers.cs
示例5: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now;
Ship.Update(dt, world);
this.Rule0(dt, world);
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:7,代码来源:World.cs
示例6: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now;
Game1.Update(dt, world);
Game2.Update(dt, world);
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:8,代码来源:World.cs
示例7: Load
public void Load()
{
Textures.Load();
SpriteSheets.Load();
Animations.Load();
world = new World();
}
开发者ID:Phyyl,项目名称:LudumDare33,代码行数:8,代码来源:Game.cs
示例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>();
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:9,代码来源:World.cs
示例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>();
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:9,代码来源:World.cs
示例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>();
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:9,代码来源:World.cs
示例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);
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:9,代码来源:World.cs
示例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);
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:9,代码来源:World.cs
示例13: MainForm
public MainForm()
{
world = new World();
InitializeComponent();
time = Stopwatch.GetTimestamp();
timer1.Start();
}
开发者ID:kindex,项目名称:moora,代码行数:9,代码来源:MainForm.cs
示例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);
}
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:10,代码来源:World.cs
示例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);
}
开发者ID:remy22,项目名称:game-1,代码行数:10,代码来源:Player.cs
示例16: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now;
MainCamera.Update(dt, world);
for(int x0 = 0; x0 < SnowFlakes.Count; x0++) {
SnowFlakes[x0].Update(dt, world);
}
this.Rule0(dt, world);
this.Rule1(dt, world);
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:10,代码来源:World.cs
示例17: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now;
for(int x0 = 0; x0 < Balls.Count; x0++) {
Balls[x0].Update(dt, world);
}
MainCamera.Update(dt, world);
this.Rule0(dt, world);
this.Rule1(dt, world);
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:10,代码来源:World.cs
示例18: Update
public void Update(float dt, World world) {
var t = System.DateTime.Now;
MainCamera.Update(dt, world);
for(int x0 = 0; x0 < bobbies.Count; x0++) {
bobbies[x0].Update(dt, world);
}
}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:10,代码来源:World.cs
示例19: Rule0
public void Rule0(float dt, World world){
switch (s0)
{
case -1:
if(!(((MaxSnowFlakes) > (SnowFlakes.Count))))
{
s0 = -1;
return; }else
{
goto case 2; }
case 2:
counter30 = -1;
if((((Enumerable.Range(0,((1) + (((100) - (0))))).ToList<System.Int32>()).Count) == (0)))
{
goto case 0; }else
{
___ns00 = (Enumerable.Range(0,((1) + (((100) - (0))))).ToList<System.Int32>())[0];
goto case 3; }
case 3:
counter30 = ((counter30) + (1));
if((((((Enumerable.Range(0,((1) + (((100) - (0))))).ToList<System.Int32>()).Count) == (counter30))) || (((counter30) > ((Enumerable.Range(0,((1) + (((100) - (0))))).ToList<System.Int32>()).Count)))))
{
goto case 0; }else
{
___ns00 = (Enumerable.Range(0,((1) + (((100) - (0))))).ToList<System.Int32>())[counter30];
goto case 4; }
case 4:
SnowFlakes = new Cons<SnowFlake>(new SnowFlake(MainCamera.Position,(new Nothing<System.Single>())), (SnowFlakes)).ToList<SnowFlake>();
s0 = 3;
return;
case 0:
count_down1 = UnityEngine.Random.Range(0.1f,1f);
goto case 1;
case 1:
if(((count_down1) > (0f)))
{
count_down1 = ((count_down1) - (dt));
s0 = 1;
return; }else
{
s0 = -1;
return; }
default: return;}}
开发者ID:vs-team,项目名称:casanova-mk2,代码行数:53,代码来源:World.cs
示例20: Update
public virtual void Update(World World, float ElapsedTime)
{
if (NextAction != null)
{
if (CurrentAction != null) CurrentAction.End(World, this);
CurrentAction = NextAction;
NextAction = null;
CurrentAction.Begin(World, this);
}
if (CurrentAction != null) CurrentAction.Update(World, this, ElapsedTime);
}
开发者ID:Blecki,项目名称:CCDC,代码行数:12,代码来源:Actor.cs
注:本文中的Game.World类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论