fix Bridge init

This commit is contained in:
Chris Forbes
2010-07-30 18:24:12 +12:00
parent e1a0d40530
commit d6b8b327d9
2 changed files with 8 additions and 4 deletions

View File

@@ -43,8 +43,12 @@ namespace OpenRA.Traits
}
public int HP { get { return hp; } }
public readonly int MaxHP;
public float HPFraction { get { return hp*1f/MaxHP; } }
public readonly int MaxHP;
public float HPFraction
{
get { return hp * 1f / MaxHP; }
set { hp = (int)(value * MaxHP); }
}
public bool IsDead { get { return hp <= 0; } }
public bool RemoveOnDeath = true;