Merge pull request #9735 from RoosterDragon/animation-refactor
Refactor animation classes
This commit is contained in:
@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
|
||||
if (!string.IsNullOrEmpty(info.Image))
|
||||
{
|
||||
anim = new Animation(world, info.Image, GetEffectiveFacing);
|
||||
anim = new Animation(world, info.Image, new Func<int>(GetEffectiveFacing));
|
||||
anim.PlayRepeating(info.Sequences.Random(world.SharedRandom));
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
this.building = building;
|
||||
|
||||
rb = building.Trait<RepairableBuilding>();
|
||||
anim = new Animation(building.World, rb.Info.IndicatorImage);
|
||||
anim.Paused = () => !rb.RepairActive || rb.IsTraitDisabled;
|
||||
anim = new Animation(building.World, rb.Info.IndicatorImage, () => !rb.RepairActive || rb.IsTraitDisabled);
|
||||
|
||||
CycleRepairer();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user