public MouseInput(Contexts contexts) { _input = contexts.input; _leftClicks = _input.GetGroup(InputMatcher.AnyOf(InputMatcher.MouseLeftDown, InputMatcher.MouseLeftReleased)); _rightClicks = _input.GetGroup(InputMatcher.AnyOf(InputMatcher.MouseRightDown, InputMatcher.MouseRightReleased)); _mouseHover = _input.GetGroup(InputMatcher.MouseHover); }
protected override ICollector <InputEntity> GetTrigger(IContext <InputEntity> context) { return(context.CreateCollector(InputMatcher.AnyOf( InputMatcher.AxisInput, InputMatcher.KeyInput ))); }
public BuildCommands(Contexts contexts) : base(contexts.input) { _game = contexts.game; _grid = UnityEngine.GameObject.FindObjectOfType <HexGridBehaviour>(); _presets = new Presets(_game, _grid); _UICommands = contexts.input.GetGroup(InputMatcher.AnyOf(InputMatcher.UIBuildBarracks, InputMatcher.UIBuildTower)); _selectedBarracksBuilders = _game.GetGroup(GameMatcher.AllOf(GameMatcher.Selected, GameMatcher.CanBuildBarracks)); _selectedTowerBuilders = _game.GetGroup(GameMatcher.AllOf(GameMatcher.Selected, GameMatcher.CanBuildBarracks)); }
protected override ICollector <InputEntity> GetTrigger(IContext <InputEntity> context) { return(new Collector <InputEntity>( new[] { context.GetGroup(InputMatcher .AllOf( InputMatcher.KeyEvent, InputMatcher.KeyHeld ) ), context.GetGroup(InputMatcher.AnyOf( InputMatcher.MouseScrollDown, InputMatcher.MouseScrollUp )) }, new[] { GroupEvent.AddedOrRemoved, GroupEvent.AddedOrRemoved } )); }
protected override ICollector <InputEntity> GetTrigger(IContext <InputEntity> context) { // triggers: // PointerOverUi.AddedOrRemoved return(context.CreateCollector(InputMatcher.AnyOf(InputMatcher.PointerOverUi.AddedOrRemoved().matcher))); }
protected override ICollector <InputEntity> GetTrigger(IContext <InputEntity> context) { return(context.CreateCollector(InputMatcher.AnyOf(InputMatcher.MouseClickDown, InputMatcher.MouseClickStay))); }
protected override ICollector <InputEntity> GetTrigger(IContext <InputEntity> context) { return(context.CreateCollector(InputMatcher.AnyOf(InputMatcher.ShowUiCommand, InputMatcher.HideUiCommand))); }
protected override ICollector <InputEntity> GetTrigger(IContext <InputEntity> context) { var matcher = InputMatcher.AnyOf(InputMatcher.Movement, InputMatcher.Attack, InputMatcher.TryingToUseAbility); return(context.CreateCollector(matcher)); }
protected override ICollector <InputEntity> GetTrigger(IContext <InputEntity> context) { return(context.CreateCollector(InputMatcher.AnyOf(InputMatcher.InputActionStarted, InputMatcher.InputActionEnded, InputMatcher.InputActionActive))); }
protected override Collector <InputEntity> GetTrigger(IContext <InputEntity> context) { return(context.CreateCollector(InputMatcher.AnyOf(InputMatcher.NextStepEvent, InputMatcher.AllAnimationCompleteComponentI))); }
protected override ICollector <InputEntity> GetTrigger(IContext <InputEntity> context) { return(context.CreateCollector(InputMatcher.AnyOf(InputMatcher.MouseLeftDown, InputMatcher.MouseLeftReleased))); }
public EndGameSystem(Contexts contexts, Systems systems) : base(contexts.input) { this._contexts = contexts; this._systems = systems; group = this._contexts.input.GetGroup(InputMatcher.AnyOf(InputMatcher.EndGame, InputMatcher.DestroyReactiveUI)); }
protected override Collector <InputEntity> GetTrigger(IContext <InputEntity> context) { return(context.CreateCollector(InputMatcher.AnyOf(InputMatcher.NextStepEvent))); }
public EmitInputSystem(Contexts contexts) { _context = contexts.input; _inputs = _context.GetGroup(InputMatcher.AnyOf(InputMatcher.LeftMouse, InputMatcher.MouseDown, InputMatcher.MouseUp, InputMatcher.MousePosition)); }