Convert px z offsets to world coords.

This commit is contained in:
Paul Chote
2013-05-24 17:41:55 +12:00
parent 437de8e884
commit d048d083c4
4 changed files with 4 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Cnc
? (59 * playerResources.Ore) / (10 * playerResources.OreCapacity) ? (59 * playerResources.Ore) / (10 * playerResources.OreCapacity)
: 0); : 0);
anims.Add("lights", new AnimationWithOffset(lights, () => info.Offset, () => !buildComplete, 24)); anims.Add("lights", new AnimationWithOffset(lights, () => info.Offset, () => !buildComplete, 1024));
} }
public void BuildingComplete( Actor self ) public void BuildingComplete( Actor self )

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.RA.Render
var rightOffset = new WVec(-43, 86, 0); var rightOffset = new WVec(-43, 86, 0);
anims.Add("wake", new AnimationWithOffset(wake, anims.Add("wake", new AnimationWithOffset(wake,
() => anims["wake"].Animation.CurrentSequence.Name == "left-wake" ? leftOffset : rightOffset, () => anims["wake"].Animation.CurrentSequence.Name == "left-wake" ? leftOffset : rightOffset,
() => false, -2)); () => false, -87));
} }
public override void Tick(Actor self) public override void Tick(Actor self)

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc
var roof = new Animation(rs.GetImage(self)); var roof = new Animation(rs.GetImage(self));
roof.PlayThen("fire-start", () => roof.PlayRepeating("fire-loop")); roof.PlayThen("fire-start", () => roof.PlayRepeating("fire-loop"));
rs.anims.Add("fire", new AnimationWithOffset(roof, () => info.Offset, null, 24)); rs.anims.Add("fire", new AnimationWithOffset(roof, () => info.Offset, null, 1024));
} }
} }
} }

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Cnc
var rs = self.Trait<RenderSimple>(); var rs = self.Trait<RenderSimple>();
var roof = new Animation(rs.GetImage(self), () => self.Trait<IFacing>().Facing); var roof = new Animation(rs.GetImage(self), () => self.Trait<IFacing>().Facing);
roof.Play("roof"); roof.Play("roof");
rs.anims.Add("roof", new AnimationWithOffset(roof, null, null, 24)); rs.anims.Add("roof", new AnimationWithOffset(roof, null, null, 1024));
} }
} }
} }