Species Component (#130)
* Fix this fug oksure Creates the initial species component, damage states, and threshold templates and hooks them into the damageable component * More rebase fixes * test * Pre future rebase * Please * Lol * Lol2 * SHADERS * Update Engine * yml file * Fix an initialization issue, injects dependencies * Fix error in loading shaders * Makes a master character ui controller component added upon client attachment to entity and remove upon client detachment from entity * Fixes just about everytrhing * Address PJB's comments * geeze * Make overlays work in worldspace instead of screen space and not cover user interfaces * update submodule
This commit is contained in:
committed by
Pieter-Jan Briers
parent
b8becf4a56
commit
37df61113e
31
Content.Client/GameObjects/Components/DamageableComponent.cs
Normal file
31
Content.Client/GameObjects/Components/DamageableComponent.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Content.Shared.GameObjects;
|
||||
using SS14.Shared.GameObjects;
|
||||
using SS14.Shared.Interfaces.GameObjects;
|
||||
using SS14.Shared.Interfaces.Network;
|
||||
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 state)
|
||||
{
|
||||
base.HandleComponentState(state);
|
||||
|
||||
if(state is DamageComponentState)
|
||||
{
|
||||
var damagestate = (DamageComponentState)state;
|
||||
CurrentDamage = damagestate.CurrentDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user