//------------------------------------------------------------------------------ // // 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 CombatEntity { public CoreGame.Render.MonsterComponent monster { get { return (CoreGame.Render.MonsterComponent)GetComponent(CombatComponentsLookup.Monster); } } public bool hasMonster { get { return HasComponent(CombatComponentsLookup.Monster); } } public void AddMonster(MonsterType newMonsterType) { var index = CombatComponentsLookup.Monster; var component = (CoreGame.Render.MonsterComponent)CreateComponent(index, typeof(CoreGame.Render.MonsterComponent)); component.monsterType = newMonsterType; AddComponent(index, component); } public void ReplaceMonster(MonsterType newMonsterType) { var index = CombatComponentsLookup.Monster; var component = (CoreGame.Render.MonsterComponent)CreateComponent(index, typeof(CoreGame.Render.MonsterComponent)); component.monsterType = newMonsterType; ReplaceComponent(index, component); } public void RemoveMonster() { RemoveComponent(CombatComponentsLookup.Monster); } } //------------------------------------------------------------------------------ // // 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 CombatMatcher { static Entitas.IMatcher _matcherMonster; public static Entitas.IMatcher Monster { get { if (_matcherMonster == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.Monster); matcher.componentNames = CombatComponentsLookup.componentNames; _matcherMonster = matcher; } return _matcherMonster; } } }