@@ -170,7 +170,8 @@ namespace OpenRA.Traits
|
||||
{
|
||||
public static bool IsDead(this Actor self)
|
||||
{
|
||||
if (self.Destroyed) return true;
|
||||
if (self.Destroyed)
|
||||
return true;
|
||||
|
||||
var health = self.TraitOrDefault<Health>();
|
||||
return (health == null) ? false : health.IsDead;
|
||||
@@ -178,7 +179,8 @@ namespace OpenRA.Traits
|
||||
|
||||
public static DamageState GetDamageState(this Actor self)
|
||||
{
|
||||
if (self.Destroyed) return DamageState.Dead;
|
||||
if (self.Destroyed)
|
||||
return DamageState.Dead;
|
||||
|
||||
var health = self.TraitOrDefault<Health>();
|
||||
return (health == null) ? DamageState.Undamaged : health.DamageState;
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace OpenRA
|
||||
public void Add(IEffect b) { effects.Add(b); }
|
||||
public void Remove(IEffect b) { effects.Remove(b); }
|
||||
|
||||
public void AddFrameEndTask( Action<World> a ) { frameEndActions.Enqueue( a ); }
|
||||
public void AddFrameEndTask(Action<World> a) { frameEndActions.Enqueue(a); }
|
||||
|
||||
public event Action<Actor> ActorAdded = _ => { };
|
||||
public event Action<Actor> ActorRemoved = _ => { };
|
||||
|
||||
Reference in New Issue
Block a user