Remove Map.SequenceProvider.

This commit is contained in:
Paul Chote
2016-02-18 18:41:03 +00:00
parent d7bdc840d6
commit 7993068c8f
19 changed files with 33 additions and 32 deletions

View File

@@ -43,7 +43,7 @@ namespace OpenRA.Graphics
public Animation(World world, string name, Func<int> facingFunc, Func<bool> paused)
{
sequenceProvider = world.Map.SequenceProvider;
sequenceProvider = world.Map.Rules.Sequences;
Name = name.ToLowerInvariant();
this.facingFunc = facingFunc;
this.paused = paused;

View File

@@ -171,7 +171,6 @@ namespace OpenRA
[FieldLoader.Ignore] Lazy<Ruleset> rules;
public Ruleset Rules { get { return rules != null ? rules.Value : null; } }
public SequenceProvider SequenceProvider { get { return Rules.Sequences; } }
[FieldLoader.Ignore] public ProjectedCellRegion ProjectedCellBounds;
[FieldLoader.Ignore] public CellRegion AllCells;

View File

@@ -197,7 +197,7 @@ namespace OpenRA
using (new Support.PerfTimer("Map.PreloadRules"))
map.PreloadRules();
using (new Support.PerfTimer("Map.SequenceProvider.Preload"))
map.SequenceProvider.Preload();
map.Rules.Sequences.Preload();
// Load music with map assets mounted
using (new Support.PerfTimer("Map.Music"))

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Traits
Variants = new Dictionary<string, Sprite[]>();
foreach (var v in info.Variants)
{
var seq = world.Map.SequenceProvider.GetSequence(Info.Sequence, v);
var seq = world.Map.Rules.Sequences.GetSequence(Info.Sequence, v);
var sprites = Exts.MakeArray(seq.Length, x => seq.GetSprite(x));
Variants.Add(v, sprites);
}