Esempio n. 1
0
        public void DiagonalMove()
        {
            var move   = new Move(Direction.NorthEast, 1, 1.0);
            var action = new MoveAction(moveable, move);

            Assert.AreEqual(new Vec(0, 0), moveable.Position);
            action.Perform(Duration.FromSeconds(0.75));
            Assert.IsFalse(action.IsComplete);
            Assert.AreEqual(new Vec(0, 0), moveable.Position);
            action.Perform(Duration.FromSeconds(0.75));
            Assert.IsTrue(action.IsComplete);
            Assert.AreEqual(new Vec(1, 1), moveable.Position);
        }
 private bool Move()
 {
     return(MoveAction.Perform());
 }