Move IRenderInfantrySequenceModifier to mod code and require explicit...

implementation.
This commit is contained in:
reaperrr
2016-10-22 19:32:50 +02:00
parent 6b29d70520
commit 9dfddaf5d9
5 changed files with 18 additions and 16 deletions

View File

@@ -9,6 +9,7 @@
*/
#endregion
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.TS.Traits.Render
@@ -29,15 +30,15 @@ namespace OpenRA.Mods.TS.Traits.Render
bool isInjured;
public bool IsModifyingSequence { get { return isInjured; } }
public string SequencePrefix { get { return info.InjuredSequencePrefix; } }
bool IRenderInfantrySequenceModifier.IsModifyingSequence { get { return isInjured; } }
string IRenderInfantrySequenceModifier.SequencePrefix { get { return info.InjuredSequencePrefix; } }
public WithPermanentInjury(ActorInitializer init, WithPermanentInjuryInfo info)
{
this.info = info;
}
public void Damaged(Actor self, AttackInfo e)
void INotifyDamage.Damaged(Actor self, AttackInfo e)
{
if (e.DamageState == info.TriggeringDamageStage)
isInjured = true;