Converted the GetAttribute methods in the ToolBox class to extension methods

This commit is contained in:
Joonas Rikkonen
2017-10-04 18:38:40 +03:00
parent 6c7c97a875
commit 1ff2054ca8
99 changed files with 854 additions and 875 deletions
@@ -48,16 +48,16 @@ namespace Barotrauma
{
this.character = character;
stepSize = ToolBox.GetAttributeVector2(element, "stepsize", Vector2.One);
stepSize = element.GetAttributeVector2("stepsize", Vector2.One);
stepSize = ConvertUnits.ToSimUnits(stepSize);
walkSpeed = ToolBox.GetAttributeFloat(element, "walkspeed", 1.0f);
swimSpeed = ToolBox.GetAttributeFloat(element, "swimspeed", 1.0f);
walkSpeed = element.GetAttributeFloat("walkspeed", 1.0f);
swimSpeed = element.GetAttributeFloat("swimspeed", 1.0f);
RunSpeedMultiplier = ToolBox.GetAttributeFloat(element, "runspeedmultiplier", 2f);
SwimSpeedMultiplier = ToolBox.GetAttributeFloat(element, "swimspeedmultiplier", 1.5f);
RunSpeedMultiplier = element.GetAttributeFloat("runspeedmultiplier", 2f);
SwimSpeedMultiplier = element.GetAttributeFloat("swimspeedmultiplier", 1.5f);
legTorque = ToolBox.GetAttributeFloat(element, "legtorque", 0.0f);
legTorque = element.GetAttributeFloat("legtorque", 0.0f);
}
public virtual void UpdateAnim(float deltaTime) { }