Sequence.facing idea/RFC.
This commit is contained in:
@@ -40,12 +40,10 @@ namespace OpenRa.Traits.Activities
|
||||
!self.World.Map.Harvest(self.Location, out isGem))
|
||||
return false;
|
||||
|
||||
var harvestAnim = "harvest" + Util.QuantizeFacing(unit.Facing, 8);
|
||||
|
||||
if (harvestAnim != renderUnit.anim.CurrentSequence.Name)
|
||||
if (renderUnit.anim.CurrentSequence.Name != "harvest")
|
||||
{
|
||||
isHarvesting = true;
|
||||
renderUnit.PlayCustomAnimation(self, harvestAnim, () => isHarvesting = false);
|
||||
renderUnit.PlayCustomAnimation(self, "harvest", () => isHarvesting = false);
|
||||
}
|
||||
harv.AcceptResource(isGem);
|
||||
return true;
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace OpenRa.Traits
|
||||
public RenderUnit(Actor self)
|
||||
: base(self)
|
||||
{
|
||||
anim = new Animation( GetImage( self ), () => self.traits.Get<Unit>().Facing );
|
||||
PlayFacingAnim(self);
|
||||
|
||||
anims.Add( "smoke", new AnimationWithOffset( new Animation( "smoke_m" ), null, () => !isSmoking ) );
|
||||
|
||||
Reference in New Issue
Block a user