Files
tbd-station-14/Content.Client/GameObjects/Components/DamageableComponent.cs
Acruid b1c81ed6e6 Entity Interpolation (#197)
* Frame interpolation kinda works.

* Added null CurState check because it can be null now.

* Merge remote-tracking branch 'upstream/master' into dev-GameState
2019-04-13 09:46:27 +02:00

30 lines
966 B
C#

using Content.Shared.GameObjects;
using SS14.Shared.GameObjects;
using System.Collections.Generic;
namespace Content.Client.GameObjects
{
/// <summary>
/// Fuck I really hate doing this
/// TODO: make sure the client only gets damageable component on the clientside entity for its player mob
/// </summary>
public class DamageableComponent : SharedDamageableComponent
{
/// <inheritdoc />
public override string Name => "Damageable";
public Dictionary<DamageType, int> CurrentDamage = new Dictionary<DamageType, int>();
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
{
base.HandleComponentState(curState, nextState);
if(curState is DamageComponentState)
{
var damagestate = (DamageComponentState)curState;
CurrentDamage = damagestate.CurrentDamage;
}
}
}
}