Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }