コード例 #1
0
ファイル: NodeUnitTest.cs プロジェクト: xqing2003/behaviac
        public void test_action_1()
        {
            testAgent.btsetcurrent("node_test/action_ut_1");
            testAgent.resetProperties();
            testAgent.btexec();

            Assert.AreEqual(1.8f, testAgent.testVar_2);
            Assert.AreEqual(4.5f, testAgent.testVar_3);
            Assert.AreEqual("HC", testAgent.testVar_str_0);

            Assert.AreEqual("NODE", testAgent.testVar_str_1);
            TestNS.Float2 float2 = testAgent.GetVariable <TestNS.Float2>("testFloat2");
            Assert.AreEqual(1.0f, float2.x);
            Assert.AreEqual(1.0f, float2.y);
        }
コード例 #2
0
		public Action_bt_node_test_action_ut_0_node16()
		{
			this.m_resultOption = EBTStatus.BT_SUCCESS;
			method_params = new object[1];
			method_p0 = new List<TestNS.Float2>();
			method_p0.Capacity = 1;
			TestNS.Float2 method_p0_item0;
			method_p0_item0 = new TestNS.Float2();
			method_p0_item0.x = 0.01f;
			method_p0_item0.y = -0.01f;
			method_p0.Add(method_p0_item0);
			method_params[0] = method_p0;
		}