//------------------------------------------------------------------------------ // // This code was generated by Entitas.CodeGeneration.Plugins.ComponentContextApiGenerator. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ public partial class CombatContext { public CombatEntity jumpTextEntity { get { return GetGroup(CombatMatcher.JumpText).GetSingleEntity(); } } public CoreGame.Render.JumpTextComponent jumpText { get { return jumpTextEntity.jumpText; } } public bool hasJumpText { get { return jumpTextEntity != null; } } public CombatEntity SetJumpText(System.Collections.Generic.Queue newHurtDatas) { if (hasJumpText) { throw new Entitas.EntitasException("Could not set JumpText!\n" + this + " already has an entity with CoreGame.Render.JumpTextComponent!", "You should check if the context already has a jumpTextEntity before setting it or use context.ReplaceJumpText()."); } var entity = CreateEntity(); entity.AddJumpText(newHurtDatas); return entity; } public void ReplaceJumpText(System.Collections.Generic.Queue newHurtDatas) { var entity = jumpTextEntity; if (entity == null) { entity = SetJumpText(newHurtDatas); } else { entity.ReplaceJumpText(newHurtDatas); } } public void RemoveJumpText() { jumpTextEntity.Destroy(); } } //------------------------------------------------------------------------------ // // 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.JumpTextComponent jumpText { get { return (CoreGame.Render.JumpTextComponent)GetComponent(CombatComponentsLookup.JumpText); } } public bool hasJumpText { get { return HasComponent(CombatComponentsLookup.JumpText); } } public void AddJumpText(System.Collections.Generic.Queue newHurtDatas) { var index = CombatComponentsLookup.JumpText; var component = (CoreGame.Render.JumpTextComponent)CreateComponent(index, typeof(CoreGame.Render.JumpTextComponent)); component.hurtDatas = newHurtDatas; AddComponent(index, component); } public void ReplaceJumpText(System.Collections.Generic.Queue newHurtDatas) { var index = CombatComponentsLookup.JumpText; var component = (CoreGame.Render.JumpTextComponent)CreateComponent(index, typeof(CoreGame.Render.JumpTextComponent)); component.hurtDatas = newHurtDatas; ReplaceComponent(index, component); } public void RemoveJumpText() { RemoveComponent(CombatComponentsLookup.JumpText); } } //------------------------------------------------------------------------------ // // 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 _matcherJumpText; public static Entitas.IMatcher JumpText { get { if (_matcherJumpText == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.JumpText); matcher.componentNames = CombatComponentsLookup.componentNames; _matcherJumpText = matcher; } return _matcherJumpText; } } }