//------------------------------------------------------------------------------ // // 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 cmdRecvEntity { get { return GetGroup(CombatMatcher.CmdRecv).GetSingleEntity(); } } // public CoreGame.Render.CmdRecvComponent cmdRecv { get { return cmdRecvEntity.cmdRecv; } } // public bool hasCmdRecv { get { return cmdRecvEntity != null; } } // // public CombatEntity SetCmdRecv(System.Collections.Generic.Queue newRenderCmds, System.Collections.Generic.Queue newNetCmds, CombatEntity newEnt) { // if (hasCmdRecv) { // throw new Entitas.EntitasException("Could not set CmdRecv!\n" + this + " already has an entity with CoreGame.Render.CmdRecvComponent!", // "You should check if the context already has a cmdRecvEntity before setting it or use context.ReplaceCmdRecv()."); // } // var entity = CreateEntity(); // entity.AddCmdRecv(newRenderCmds, newNetCmds, newEnt); // return entity; // } // // public void ReplaceCmdRecv(System.Collections.Generic.Queue newRenderCmds, System.Collections.Generic.Queue newNetCmds, CombatEntity newEnt) { // var entity = cmdRecvEntity; // if (entity == null) { // entity = SetCmdRecv(newRenderCmds, newNetCmds, newEnt); // } else { // entity.ReplaceCmdRecv(newRenderCmds, newNetCmds, newEnt); // } // } // // public void RemoveCmdRecv() { // cmdRecvEntity.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.CmdRecvComponent cmdRecv { get { return (CoreGame.Render.CmdRecvComponent)GetComponent(CombatComponentsLookup.CmdRecv); } } // public bool hasCmdRecv { get { return HasComponent(CombatComponentsLookup.CmdRecv); } } // // public void AddCmdRecv(System.Collections.Generic.Queue newRenderCmds, System.Collections.Generic.Queue newNetCmds, CombatEntity newEnt) { // var index = CombatComponentsLookup.CmdRecv; // var component = (CoreGame.Render.CmdRecvComponent)CreateComponent(index, typeof(CoreGame.Render.CmdRecvComponent)); // component.renderCmds = newRenderCmds; // component.netCmds = newNetCmds; // component.ent = newEnt; // AddComponent(index, component); // } // // public void ReplaceCmdRecv(System.Collections.Generic.Queue newRenderCmds, System.Collections.Generic.Queue newNetCmds, CombatEntity newEnt) { // var index = CombatComponentsLookup.CmdRecv; // var component = (CoreGame.Render.CmdRecvComponent)CreateComponent(index, typeof(CoreGame.Render.CmdRecvComponent)); // component.renderCmds = newRenderCmds; // component.netCmds = newNetCmds; // component.ent = newEnt; // ReplaceComponent(index, component); // } // // public void RemoveCmdRecv() { // RemoveComponent(CombatComponentsLookup.CmdRecv); // } // } //------------------------------------------------------------------------------ // // 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 _matcherCmdRecv; public static Entitas.IMatcher CmdRecv { get { if (_matcherCmdRecv == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.CmdRecv); matcher.componentNames = CombatComponentsLookup.componentNames; _matcherCmdRecv = matcher; } return _matcherCmdRecv; } } }