Skip to content

Commit

Permalink
animated jump bridges
Browse files Browse the repository at this point in the history
  • Loading branch information
BitBaboonSteve committed Nov 12, 2017
1 parent b36f4e5 commit 842fb6f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
10 changes: 9 additions & 1 deletion EVEData/EveManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,11 @@ public void CreateFromScratch()
name = ssNodes[0].InnerText;

// create and add the system
Systems.Add(new System(name, systemID, rd.Name, hasStation));
System s = new System(name, systemID, rd.Name, hasStation);
Systems.Add(s);

NameToSystem[name] = s;


// create and add the map version
rd.MapSystems[name] = new MapSystem
Expand All @@ -711,6 +715,8 @@ public void CreateFromScratch()
string regionLinkName = erNodes[0].InnerText;

SystemIDToName[systemID] = name;


rd.MapSystems[name] = new MapSystem
{
Name = name,
Expand All @@ -719,6 +725,8 @@ public void CreateFromScratch()
Region = regionLinkName,
OutOfRegion = true,
};


}
}
}
Expand Down
15 changes: 14 additions & 1 deletion MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public MainWindow()
EVEData.EveManager.SetInstance(EVEManager);

// if we want to re-build the data as we've changed the format, recreate it all from scratch
bool initFromScratch = true;
bool initFromScratch = false;
if (initFromScratch)
{
EVEManager.CreateFromScratch();
Expand Down Expand Up @@ -576,6 +576,19 @@ private void AddSystemsToMap()

path.StrokeDashArray = dashes;

// animate the jump bridges
DoubleAnimation da = new DoubleAnimation();
da.From = 0;
da.To = 200;
da.By = 2;
da.Duration = new Duration(TimeSpan.FromSeconds(40));
da.RepeatBehavior = RepeatBehavior.Forever;

path.StrokeDashArray = dashes;
path.BeginAnimation(Shape.StrokeDashOffsetProperty, da);



Canvas.SetZIndex(path, 19);

MainCanvas.Children.Add(path);
Expand Down

0 comments on commit 842fb6f

Please sign in to comment.