ItemComponent GUIFrames, functional steering, radar, separate power and signals, improved d.gz, tweak swimming

This commit is contained in:
Regalis
2015-06-29 23:51:01 +03:00
parent 004608acd8
commit b493ed2b39
42 changed files with 473 additions and 182 deletions
@@ -0,0 +1,32 @@
using System;
using System.Xml.Linq;
namespace Subsurface.Items.Components
{
class Vent : ItemComponent
{
private float oxygenFlow;
public float OxygenFlow
{
get { return oxygenFlow; }
set { oxygenFlow = Math.Max(value, 0.0f); }
}
public Vent (Item item, XElement element)
: base(item, element)
{
}
public override void Update(float deltaTime, Camera cam)
{
base.Update(deltaTime, cam);
if (item.currentHull == null) return;
item.currentHull.Oxygen += oxygenFlow * deltaTime;
OxygenFlow -= deltaTime * 1000.0f;
}
}
}