Rewrite sequence loading logic.
Multiple layers of Lazy<T>ness are replaced with an explicit two-part loading scheme. Sequences are parsed immediately, without the need for the sprite assets, and tell the SpriteCache which frames they need. Use-cases that want the actual sprites can then tell the SpriteCache to load the frames and the sequences to resolve the sprites.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Defines sequence to derive facings from.")]
|
||||
public readonly string Sequence = "idle";
|
||||
|
||||
public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequences, string faction)
|
||||
public int QuantizedBodyFacings(ActorInfo ai, SequenceSet sequences, string faction)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Sequence))
|
||||
throw new InvalidOperationException($"Actor {ai.Name} is missing sequence to quantize facings from.");
|
||||
|
||||
Reference in New Issue
Block a user