fix #1052; tidy up *Init; route initial turret facing for husks through new TurretFacingInit

This commit is contained in:
Chris Forbes
2011-07-28 23:07:14 +12:00
parent 096fe7759c
commit 2bf7cb1496
7 changed files with 84 additions and 164 deletions

View File

@@ -133,27 +133,15 @@ namespace OpenRA.Traits
DisplayHp = (2 * DisplayHp + hp) / 3;
}
}
public class HealthInit : IActorInit<float>
{
[FieldFromYamlKey]
public readonly float value = 1f;
[FieldFromYamlKey] public readonly float value = 1f;
public HealthInit() { }
public HealthInit( float init )
{
value = init;
}
public float Value( World world )
{
return value;
}
public HealthInit( float init ) { value = init; }
public float Value( World world ) { return value; }
}
public static class HealthExts
{
public static bool IsDead(this Actor self)