/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { wandererWorld = Matrix.Identity; wanderer = new WandererBody(this); heightMapTransformSystem_Wanderer = new HeightMapTransformSystem_Wanderer(); heightMapComponent = new HeightMapComponent(); heightMapCameraComponent = new HeightMapCameraComponent(); robotComponent = new RobotComponent(); heightMapSystem = new HeightmapSystem(); heightMapTranformSystem = new HeightMapTranformSystem(); heightMapRenderSystem = new HeightMapRenderSystem(graphics.GraphicsDevice); robotSystem = new RobotSystem(); robotTranformSystem = new RobotTranformSystem(); robotRenderSystem = new RobotRenderSystem(); collisionSystem = new CollisionSystem(); houseSystem = new HouseSystem(this); systemRenderer = new Renderer(); base.Initialize(); }
public Robot(GraphicsDevice graphics, Vector3 position, Matrix worldMatrix, HeightmapSystem heightMap, BasicEffect effect, Texture2D texture) { this.position = position; this.effect = effect; RobotBody = new Body(graphics, position, texture, heightMap); WorldMatrix = worldMatrix; }
public Labb2() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; heightmapSystem = new HeightmapSystem(); entityFactory = new EntityFactory(this); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here cameraSystem = new CameraSystem(); transformSystem = new TransformSystem(); modelSystem = new ModelSystem(); heightmapSystem = new HeightmapSystem(); base.Initialize(); }
public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; cameraSystem = new CameraSystem(); transformSystem = new TransformSystem(); modelSystem = new ModelSystem(); heightmapSystem = new HeightmapSystem(); }
public SceneManager(GraphicsDevice gd, Matrix world) { this.gd = gd; this.world = world; heightmapObjects = new List <HeightmapObject>(); createHeightmapObjects(); heightmapSystem = new HeightmapSystem(gd, heightmapObjects); }
public SceneManager(GraphicsDevice gd, Matrix world)//, SpriteBatch spriteBatch, Rectangle window) { //phys_sys = new PhysicsSystem(window); this.gd = gd; this.world = world; heightmapObjects = new List <HeightmapObject>(); createHeightmapObjects(); heightmapSystem = new HeightmapSystem(gd, heightmapObjects); //LoadComponents(); //draw_sys = new DrawSystem(spriteBatch); }
public Body(GraphicsDevice graphics, Vector3 pos, Texture2D texture, HeightmapSystem heightmapSystem) : base(graphics, .3f, .3f, .3f) { heightmap = heightmapSystem; heightMapData = heightmap.GetHeightMapData(); _position = pos; Texture = texture; // Head // var head = new Head(graphics, new Vector3(0, _sizeY - 0.1f, 0)) _children.Add(new Head(GraphicsDevice, new Vector3(0, _sizeY - 0.1f, 0))); // Legs _children.Add(new Leg(GraphicsDevice, new Vector3(0, -(_sizeY / 2), _sizeZ / 2), new Vector3(0, 3.15f, 0), texture, true)); _children.Add(new Leg(GraphicsDevice, new Vector3(0, -(_sizeY / 2), -(_sizeZ / 2)), new Vector3(0, 3.15f, 0), texture, false)); //// Arms _children.Add(new Arm(GraphicsDevice, new Vector3(0, _sizeY / 2, _sizeZ / 2f), new Vector3(0, 2, 0), texture)); _children.Add(new Arm(GraphicsDevice, new Vector3(0, _sizeY / 2, -(_sizeZ / 2f)), new Vector3(0, -2, 0), texture)); //_children.Add(new Arm(GraphicsDevice, new Vector3(0, _sizeY / 2, -(_sizeZ / 2f)), new Vector3(0, -2, 0))); }