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); }
public Map(World world, RectangleF bounds) { Entities = new List<Entity>(); World = world; world.Maps.Add(this); }
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; }
public void Update(float dt, World world) { var t = System.DateTime.Now; Ship.Update(dt, world); this.Rule0(dt, world); }
public static void Main(string[] args) { World world = new World(); world.Add(new Map("maps/forest.tmx")); world.Add(new Player()); world.Run(); }
public void Update(float dt, World world) { var t = System.DateTime.Now; Game1.Update(dt, world); Game2.Update(dt, world); }
public void Load() { Textures.Load(); SpriteSheets.Load(); Animations.Load(); world = new World(); }
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>(); }
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); }
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); }
public MainForm() { world = new World(); InitializeComponent(); time = Stopwatch.GetTimestamp(); timer1.Start(); }
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>(); }
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>(); }
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); }
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); }
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); } }
public void Update(float dt, World world) { frame = World.frame; this.Rule1(dt, world); for(int x0 = 0; x0 < Boids.Count; x0++) { Boids[x0].Update(dt, world); } BoidsLeader.Update(dt, world); this.Rule0(dt, world); }
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); } }
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); }
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;}}
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); }
public void Rule0(float dt, World world){ switch (s0) { case -1: Balls = ( (Balls).Select(__ContextSymbol1 => new { ___b00 = __ContextSymbol1 }) .Where(__ContextSymbol2 => ((__ContextSymbol2.___b00.UnityBall.Destroyed) == (false))) .Select(__ContextSymbol3 => __ContextSymbol3.___b00) .ToList<Ball>()).ToList<Ball>(); s0 = -1; return; default: return;}}
public void Update(float dt, World world) { var t = System.DateTime.Now; for(int x0 = 0; x0 < Links.Count; x0++) { Links[x0].Update(dt, world); } for(int x0 = 0; x0 < Planets.Count; x0++) { Planets[x0].Update(dt, world); } for(int x0 = 0; x0 < Players.Count; x0++) { Players[x0].Update(dt, world); } }
public void Rule0(float dt, World world){ switch (s0) { case -1: CollidingAsteroidsProjectile = ( (Beams).Select(__ContextSymbol4 => new { ___b00 = __ContextSymbol4 }) .SelectMany(__ContextSymbol5=> (Asteroids).Select(__ContextSymbol6 => new { ___a00 = __ContextSymbol6, prev = __ContextSymbol5 }) .Where(__ContextSymbol7 => ((1f) > (UnityEngine.Vector3.Distance(__ContextSymbol7.___a00.Position,__ContextSymbol7.prev.___b00.Position)))) .Select(__ContextSymbol8 => new Casanova.Prelude.Tuple<Beam, Asteroid>(__ContextSymbol8.prev.___b00,__ContextSymbol8.___a00)) .ToList<Casanova.Prelude.Tuple<Beam, Asteroid>>())).ToList<Casanova.Prelude.Tuple<Beam, Asteroid>>(); s0 = -1; return; default: return;}}
public void Update(float dt, World world) { var t = System.DateTime.Now; this.Rule3(dt, world); for(int x0 = 0; x0 < Asteroids.Count; x0++) { Asteroids[x0].Update(dt, world); } GameOverText.Update(dt, world); for(int x0 = 0; x0 < Players.Count; x0++) { Players[x0].Update(dt, world); } ScoreText.Update(dt, world); this.Rule0(dt, world); this.Rule1(dt, world); this.Rule2(dt, world); this.Rule4(dt, world); this.Rule5(dt, world); }
void Awake() { try { LoadMap(); } catch (System.Exception e) { Debug.Log("Failed to load map. regenerating: " + e); RegenerateMap(); } world = new Game.World(map, navi); world.eventListener = this; worldManager = GetComponent <WorldManager>(); var mm_go = Instantiate(minimapPrefab); mm_go.transform.SetParent(minimapContainer, false); minimapManager = mm_go.GetComponent <MinimapManager>(); minimapManager.map = map; }
public void Rule1(float dt, World world){ switch (s1) { case -1: if(!(UnityEngine.Input.GetKeyDown(KeyCode.Space))) { s1 = -1; return; }else { goto case 0; } case 0: Cubes = new Cons<Cube>(new Cube(), (Cubes)).ToList<Cube>(); s1 = -1; return; default: return;}}
public void Rule1(float dt, World world){ switch (s1) { case -1: if(!(UnityEngine.Input.GetKeyDown(KeyCode.Space))) { s1 = -1; return; }else { goto case 0; } case 0: Balls = new Cons<Ball>(new Ball(MainCamera.Position,MainCamera.Forward), (Balls)).ToList<Ball>(); s1 = -1; return; default: return;}}
public void Rule1(float dt, World world){ switch (s1) { case -1: count_down1 = 1f; goto case 11; case 11: if(((count_down1) > (0f))) { count_down1 = ((count_down1) - (dt)); s1 = 11; return; }else { goto case 9; } case 9: ___posx10 = UnityEngine.Random.Range(175f,200f); ___posz10 = UnityEngine.Random.Range(175f,200f); if(((UnityEngine.Random.value) > (0.5f))) { ___posx11 = ___posx10; }else { ___posx11 = ((___posx10) * (-1f)); } if(((UnityEngine.Random.value) > (0.5f))) { ___posz11 = ___posz10; }else { ___posz11 = ((___posz10) * (-1f)); } ___mass10 = UnityEngine.Random.Range(3f,350f); ___position10 = new UnityEngine.Vector3(___posx11,0f,___posz11); ___velocity10 = ((UnityEngine.Vector3.Normalize((___position10) * (-1f))) * (UnityEngine.Random.Range(1f,6f))); ___rotv10 = new UnityEngine.Vector3(UnityEngine.Random.Range(-50f,50f),UnityEngine.Random.Range(-50f,50f),UnityEngine.Random.Range(-50f,50f)); ___newPlanet10 = new Planet(___position10,___mass10,___velocity10,___rotv10); Planets = new Cons<Planet>(___newPlanet10, (Planets)).ToList<Planet>(); s1 = -1; return; default: return;}}
public Page() { InitializeComponent(); //try { world = new World(); world.StartDraw(MainForm); timer = new DispatcherTimer(); timer.Tick += timer_Completed; //timer.Interval = TimeSpan.FromMilliseconds(1); last_time = DateTime.Now; timer.Start(); } //catch (Exception e) //{ // string error = e.ToString(); //} }
public void Rule0(float dt, World world){ switch (s0) { case -1: if(((Ship.FrontEngine.VelocityFactor.z) == (0))) { goto case 0; }else { goto case 1; } case 0: UnityParticleSystem.Speed = 10f; s0 = -1; return; case 1: UnityParticleSystem.Speed = ((1000f) * (Ship.FrontEngine.VelocityFactor.z)); s0 = -1; return; default: return;}}