public Dijkstra(Roadmap roadmap,Configuration startConfig,Configuration goalConfig) { this.roadmap = roadmap; this.startConfig = startConfig; this.goalConfig = goalConfig; addStartAndGoalConfigtoConnectedRoadmapList(); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); font = Content.Load<SpriteFont>("myFont"); t = Content.Load<Texture2D>("Square"); obstacleTexture = Content.Load<Texture2D>("randomPosition"); scenario = new Scenario(this, spriteBatch, t, "DuzDarBogaz"); roadmap = new Roadmap(this, graphics, spriteBatch, t, scenario, 100, 5, 20, 60); dijsktra = new Dijkstra(roadmap); agent = new Agent(this, spriteBatch, t, 0, 0, 20, 60, 0.0F, Color.Yellow,dijsktra,"deneme"); roadmap.Enabled = true; agent.Enabled = true; this.Components.Add(agent); this.Components.Add(roadmap); // TODO: use this.Content to load your game content here }
public Dijkstra(Roadmap roadmap) { this.roadmap = roadmap; }