//------------------------------------------------------------------------------
//
// This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
public partial class GameEntity {
public HpComponent hp { get { return (HpComponent)GetComponent(GameComponentsLookup.Hp); } }
public bool hasHp { get { return HasComponent(GameComponentsLookup.Hp); } }
public void AddHp(Game.MetaData newHp, Game.MetaData newHpMax, Game.MetaData newShield, Game.MetaData newShieldMax, Game.MetaData newStun, Game.MetaData newStunMax, Game.MetaData newIsDamaged, UnityEngine.Vector3 newLastDamageDir, Game.EHitLevel newLastDamageLevel, int newLastDmg, float newShieldRecoverTimeMax, float newShieldRecoverTime, float newShieldRecover, float newStunRecoverTimeMax, float newStunRecoverTime, float newStunRecover, float newDmgShowTime, bool newIsAlive, bool newIsDying, float newDyingTime) {
var index = GameComponentsLookup.Hp;
var component = (HpComponent)CreateComponent(index, typeof(HpComponent));
component.Hp = newHp;
component.HpMax = newHpMax;
component.Shield = newShield;
component.ShieldMax = newShieldMax;
component.Stun = newStun;
component.StunMax = newStunMax;
component.IsDamaged = newIsDamaged;
component.LastDamageDir = newLastDamageDir;
component.LastDamageLevel = newLastDamageLevel;
component.LastDmg = newLastDmg;
component.ShieldRecoverTimeMax = newShieldRecoverTimeMax;
component.ShieldRecoverTime = newShieldRecoverTime;
component.ShieldRecover = newShieldRecover;
component.StunRecoverTimeMax = newStunRecoverTimeMax;
component.StunRecoverTime = newStunRecoverTime;
component.StunRecover = newStunRecover;
component.DmgShowTime = newDmgShowTime;
component.IsAlive = newIsAlive;
component.IsDying = newIsDying;
component.DyingTime = newDyingTime;
AddComponent(index, component);
}
public void ReplaceHp(Game.MetaData newHp, Game.MetaData newHpMax, Game.MetaData newShield, Game.MetaData newShieldMax, Game.MetaData newStun, Game.MetaData newStunMax, Game.MetaData newIsDamaged, UnityEngine.Vector3 newLastDamageDir, Game.EHitLevel newLastDamageLevel, int newLastDmg, float newShieldRecoverTimeMax, float newShieldRecoverTime, float newShieldRecover, float newStunRecoverTimeMax, float newStunRecoverTime, float newStunRecover, float newDmgShowTime, bool newIsAlive, bool newIsDying, float newDyingTime) {
var index = GameComponentsLookup.Hp;
var component = (HpComponent)CreateComponent(index, typeof(HpComponent));
component.Hp = newHp;
component.HpMax = newHpMax;
component.Shield = newShield;
component.ShieldMax = newShieldMax;
component.Stun = newStun;
component.StunMax = newStunMax;
component.IsDamaged = newIsDamaged;
component.LastDamageDir = newLastDamageDir;
component.LastDamageLevel = newLastDamageLevel;
component.LastDmg = newLastDmg;
component.ShieldRecoverTimeMax = newShieldRecoverTimeMax;
component.ShieldRecoverTime = newShieldRecoverTime;
component.ShieldRecover = newShieldRecover;
component.StunRecoverTimeMax = newStunRecoverTimeMax;
component.StunRecoverTime = newStunRecoverTime;
component.StunRecover = newStunRecover;
component.DmgShowTime = newDmgShowTime;
component.IsAlive = newIsAlive;
component.IsDying = newIsDying;
component.DyingTime = newDyingTime;
ReplaceComponent(index, component);
}
public void RemoveHp() {
RemoveComponent(GameComponentsLookup.Hp);
}
}
//------------------------------------------------------------------------------
//
// This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
public sealed partial class GameMatcher {
static Entitas.IMatcher _matcherHp;
public static Entitas.IMatcher Hp {
get {
if (_matcherHp == null) {
var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.Hp);
matcher.componentNames = GameComponentsLookup.componentNames;
_matcherHp = matcher;
}
return _matcherHp;
}
}
}