Rename VoxelAnimation to ModelAnimation.

This commit is contained in:
Paul Chote
2017-06-09 00:32:48 +01:00
committed by reaperrr
parent e1cd00c1dd
commit 4f42778d26
12 changed files with 40 additions and 37 deletions

View File

@@ -34,14 +34,14 @@ namespace OpenRA.Mods.Cnc.Traits.Render
public readonly bool ShowShadow = true;
public object Create(ActorInitializer init) { return new WithVoxelWalkerBody(init.Self, this); }
public IEnumerable<VoxelAnimation> RenderPreviewVoxels(
public IEnumerable<ModelAnimation> RenderPreviewVoxels(
ActorPreviewInitializer init, RenderVoxelsInfo rv, string image, Func<WRot> orientation, int facings, PaletteReference p)
{
var voxel = VoxelProvider.GetVoxel(image, Sequence);
var body = init.Actor.TraitInfo<BodyOrientationInfo>();
var frame = init.Contains<BodyAnimationFrameInit>() ? init.Get<BodyAnimationFrameInit, uint>() : 0;
yield return new VoxelAnimation(voxel, () => WVec.Zero,
yield return new ModelAnimation(voxel, () => WVec.Zero,
() => new[] { body.QuantizeOrientation(orientation(), facings) },
() => false, () => frame, ShowShadow);
}
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
var voxel = VoxelProvider.GetVoxel(rv.Image, info.Sequence);
frames = voxel.Frames;
rv.Add(new VoxelAnimation(voxel, () => WVec.Zero,
rv.Add(new ModelAnimation(voxel, () => WVec.Zero,
() => new[] { body.QuantizeOrientation(self, self.Orientation) },
() => false, () => frame, info.ShowShadow));