public void SpeedInitializedCorrect3() { TestUtils.Player.Position.X = 100.0f; TestUtils.Player.Position.Y = 0.0f; var filename = TestUtils.GetFilePath(@"Content\Aim.xml"); TestUtils.Pattern.Parse(filename); var mover = (Mover)TestUtils.Manager.CreateBullet(); mover.InitTopNode(TestUtils.Pattern.RootNode); BulletML.Tasks.FireTask fireTask = mover.FindTaskByLabel("fireTask") as BulletML.Tasks.FireTask; Assert.IsNotNull(fireTask); }
public void BulletDefaultSpeed1() { var filename = TestUtils.GetFilePath(@"Content\FireActionEmpty.xml"); TestUtils.Pattern.Parse(filename); var mover = (Mover)TestUtils.Manager.CreateBullet(); mover.InitTopNode(TestUtils.Pattern.RootNode); mover.Speed = 100.0f; var myTask = mover.Tasks[0]; var fireTask = myTask.ChildTasks[0] as BulletML.Tasks.FireTask; Assert.IsNotNull(fireTask); var fireTask2 = new BulletML.Tasks.FireTask(fireTask.Node as FireNode, fireTask); fireTask2.InitTask(mover); Assert.IsNull(fireTask2.SpeedTask); Assert.IsNull(fireTask2.DirectionTask); Assert.AreEqual(100.0f, fireTask2.FireSpeed); }