exposed GetDamageState(); fixed TSLA anim to use it
This commit is contained in:
@@ -119,7 +119,7 @@ namespace OpenRa.Game
|
||||
|
||||
public bool IsDead { get { return Health <= 0; } }
|
||||
|
||||
DamageState GetDamageState()
|
||||
public DamageState GetDamageState()
|
||||
{
|
||||
if (Health <= 0) return DamageState.Dead;
|
||||
var halfStrength = Info.Strength * Rules.General.ConditionYellow;
|
||||
|
||||
@@ -15,9 +15,9 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
public void Attacking(Actor self)
|
||||
{
|
||||
var prev = anim.CurrentSequence.Name;
|
||||
var prefix = self.GetDamageState() == DamageState.Half ? "damaged-" : "";
|
||||
Sound.Play("tslachg2.aud");
|
||||
anim.PlayThen("active", () => anim.PlayRepeating(prev));
|
||||
anim.PlayThen(prefix + "active", () => anim.PlayRepeating(prefix + "idle"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace OpenRa.Game.Traits
|
||||
{
|
||||
if (doneBuilding)
|
||||
yield return new Renderable(roof.Image,
|
||||
24f * (float2)self.Location, self.Owner.Palette, 2);
|
||||
Game.CellSize * (float2)self.Location, self.Owner.Palette, 2);
|
||||
}
|
||||
|
||||
public void Tick(Actor self)
|
||||
|
||||
Reference in New Issue
Block a user