public void LeftHalfTouchMovesBlockLeft() { game.StartGame(); InitializeBlocks(game.Controller, content); mockTouch.SetTouchState(0, State.Pressing, new Vector2D(0.35f, 0.0f)); AdvanceTimeAndUpdateEntities(0.01f); Assert.AreEqual(IndexOfSpawnColumn, game.Controller.FallingBlock.Left); }
private void AdvanceTouchTick(MockTouch touch, State state, Vector2D position, TouchFlickTrigger trigger) { touch.SetTouchState(0, state, position); AdvanceTimeAndUpdateEntities(); touch.Update(new[] { trigger }); }
private void SetTouchState(State state, Vector2D position) { if (touch == null) { return; //ncrunch: no coverage } touch.SetTouchState(0, state, position); AdvanceTimeAndUpdateEntities(); }
private void SetTouchState(MockTouch touch, State state, Vector2D position) { touch.SetTouchState(0, state, position); touch.SetTouchState(1, state, position); AdvanceTimeAndUpdateEntities(); }