public void CreatedActionRefTask() { var filename = TestUtils.GetFilePath(@"Content\AllRound.xml"); TestUtils.Pattern.Parse(filename); Mover mover = (Mover)TestUtils.Manager.CreateBullet(); mover.InitTopNode(TestUtils.Pattern.RootNode); ActionTask testTask = mover.FindTaskByLabelAndName("circle", NodeName.actionRef) as ActionTask; Assert.IsNotNull(testTask); }
public void CorrectSpeedRel9() { var filename = TestUtils.GetFilePath(@"Content\AccelRel.xml"); TestUtils.Pattern.Parse(filename); Mover mover = (Mover)TestUtils.Manager.CreateBullet(); mover.Acceleration = new Vector2(20.0f, 40.0f); mover.InitTopNode(TestUtils.Pattern.RootNode); AccelTask myTask = mover.FindTaskByLabelAndName("test", NodeName.accel) as AccelTask; Assert.AreEqual(10.0f, myTask.Duration); }
public void CorrectSpeedRel7() { var filename = TestUtils.GetFilePath(@"Content\AccelRel.xml"); TestUtils.Pattern.Parse(filename); Mover mover = (Mover)TestUtils.Manager.CreateBullet(); mover.Acceleration = new Vector2(20.0f, 40.0f); mover.InitTopNode(TestUtils.Pattern.RootNode); AccelTask myTask = mover.FindTaskByLabelAndName("test", NodeName.accel) as AccelTask; BulletMLNode myNode = myTask.Node.GetChild(NodeName.horizontal); Assert.AreEqual(NodeType.relative, myNode.NodeType); }