2
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
4.4 KiB
C#

2 years ago
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
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<float> newHp, Game.MetaData<float> newHpMax, Game.MetaData<float> newShield, Game.MetaData<float> newShieldMax, Game.MetaData<float> newStun, Game.MetaData<float> newStunMax, Game.MetaData<float> newExecute, Game.MetaData<float> newExecuteMax, Game.MetaData<bool> newIsDamaged, UnityEngine.Vector3 newLastDamageDir, float newShieldRecoverTimeMax, float newShieldRecoverTime, float newShieldRecover, int newLastDmg, 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.ShieldRecoverTimeMax = newShieldRecoverTimeMax;
component.ShieldRecoverTime = newShieldRecoverTime;
component.ShieldRecover = newShieldRecover;
component.LastDmg = newLastDmg;
component.DmgShowTime = newDmgShowTime;
component.IsAlive = newIsAlive;
component.IsDying = newIsDying;
component.DyingTime = newDyingTime;
AddComponent(index, component);
}
public void ReplaceHp(Game.MetaData<float> newHp, Game.MetaData<float> newHpMax, Game.MetaData<float> newShield, Game.MetaData<float> newShieldMax, Game.MetaData<float> newStun, Game.MetaData<float> newStunMax, Game.MetaData<float> newExecute, Game.MetaData<float> newExecuteMax, Game.MetaData<bool> newIsDamaged, UnityEngine.Vector3 newLastDamageDir, float newShieldRecoverTimeMax, float newShieldRecoverTime, float newShieldRecover, int newLastDmg, 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.ShieldRecoverTimeMax = newShieldRecoverTimeMax;
component.ShieldRecoverTime = newShieldRecoverTime;
component.ShieldRecover = newShieldRecover;
component.LastDmg = newLastDmg;
component.DmgShowTime = newDmgShowTime;
component.IsAlive = newIsAlive;
component.IsDying = newIsDying;
component.DyingTime = newDyingTime;
ReplaceComponent(index, component);
}
public void RemoveHp()
{
RemoveComponent(GameComponentsLookup.Hp);
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
public sealed partial class GameMatcher
{
static Entitas.IMatcher<GameEntity> _matcherHp;
public static Entitas.IMatcher<GameEntity> Hp
{
get
{
if (_matcherHp == null)
{
var matcher = (Entitas.Matcher<GameEntity>)Entitas.Matcher<GameEntity>.AllOf(GameComponentsLookup.Hp);
matcher.componentNames = GameComponentsLookup.componentNames;
_matcherHp = matcher;
}
return _matcherHp;
}
}
}