//------------------------------------------------------------------------------ // // 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.MovementComponent movement { get { return (CoreGame.Render.MovementComponent)GetComponent(CombatComponentsLookup.Movement); } } public bool hasMovement { get { return HasComponent(CombatComponentsLookup.Movement); } } public void AddMovement(float newJoySpeed, float newDirection) { var index = CombatComponentsLookup.Movement; var component = (CoreGame.Render.MovementComponent)CreateComponent(index, typeof(CoreGame.Render.MovementComponent)); component.joySpeed = newJoySpeed; component.direction = newDirection; AddComponent(index, component); } public void ReplaceMovement(float newJoySpeed, float newDirection) { var index = CombatComponentsLookup.Movement; var component = (CoreGame.Render.MovementComponent)CreateComponent(index, typeof(CoreGame.Render.MovementComponent)); component.joySpeed = newJoySpeed; component.direction = newDirection; ReplaceComponent(index, component); } public void RemoveMovement() { RemoveComponent(CombatComponentsLookup.Movement); } } //------------------------------------------------------------------------------ // // 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 _matcherMovement; public static Entitas.IMatcher Movement { get { if (_matcherMovement == null) { var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(CombatComponentsLookup.Movement); matcher.componentNames = CombatComponentsLookup.componentNames; _matcherMovement = matcher; } return _matcherMovement; } } }