|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
// <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 BuffComponent buff { get { return (BuffComponent)GetComponent(GameComponentsLookup.Buff); } }
|
|
|
|
|
public bool hasBuff { get { return HasComponent(GameComponentsLookup.Buff); } }
|
|
|
|
|
|
|
|
|
|
public void AddBuff(Game.MetaDictionary<string, BuffData> newBuffMap, Game.MetaData<uint> newElementMask, System.Collections.Generic.List<System.Tuple<string, int, int>> newElementBuffList)
|
|
|
|
|
{
|
|
|
|
|
var index = GameComponentsLookup.Buff;
|
|
|
|
|
var component = (BuffComponent)CreateComponent(index, typeof(BuffComponent));
|
|
|
|
|
component.BuffMap = newBuffMap;
|
|
|
|
|
AddComponent(index, component);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ReplaceBuff(Game.MetaDictionary<string, BuffData> newBuffMap, Game.MetaData<uint> newElementMask, System.Collections.Generic.List<System.Tuple<string, int, int>> newElementBuffList)
|
|
|
|
|
{
|
|
|
|
|
var index = GameComponentsLookup.Buff;
|
|
|
|
|
var component = (BuffComponent)CreateComponent(index, typeof(BuffComponent));
|
|
|
|
|
component.BuffMap = newBuffMap;
|
|
|
|
|
ReplaceComponent(index, component);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void RemoveBuff()
|
|
|
|
|
{
|
|
|
|
|
RemoveComponent(GameComponentsLookup.Buff);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
// <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> _matcherBuff;
|
|
|
|
|
|
|
|
|
|
public static Entitas.IMatcher<GameEntity> Buff
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (_matcherBuff == null)
|
|
|
|
|
{
|
|
|
|
|
var matcher = (Entitas.Matcher<GameEntity>)Entitas.Matcher<GameEntity>.AllOf(GameComponentsLookup.Buff);
|
|
|
|
|
matcher.componentNames = GameComponentsLookup.componentNames;
|
|
|
|
|
_matcherBuff = matcher;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _matcherBuff;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|