MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / PostInit

Method PostInit

samples/sample2/Sample2Module.cpp:42–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42bool Sample2Module::PostInit()
43{
44 AFIKernelModule* pKernelModule = FindModule<AFIKernelModule>();
45
46 AFCDataList xData;
47 xData.AddInt(111);
48
49 std::cout << GET_CLASS_NAME(Sample2Module) << ", PostInit" << std::endl;
50
51 // Create an Entity for this test
52 //AFIEntity* pEntity = ARK_NEW AFCEntity(1);
53
54 // Add a DataNode name is "my_test1" of this Entity
55 //pEntity->AddNode("my_test1", AFCData(DT_INT, 1), 0);
56 // Add a DataNode name is "my_test2" of this Entity
57 //pEntity->GetNodeManager()->AddNode("my_test2", AFCData(DT_INT, 1), 0);
58
59 // Set the "my_test2" DataNode value as 1111
60 //pEntity->SetNodeInt("my_test2", 1111);
61 // Get the "my_test2" property value and printf it
62 //const int nDataNode2 = pEntity->GetNodeInt("my_test2");
63 //std::cout << "DataNode - my_test2:" << nDataNode2 << std::endl;
64
65 // Add a callback function for DataNode "my_test2"
66 //pClassModule->AddNodeCallBack("Player", "ls", this, &Sample2Module::OnDataNodeCB);
67
68 // Set the DataNode "my_test2" value as 2222, then the function "Example2Module::OnDataNodeCB" will be called
69 //pEntity->SetNodeInt("my_test2", 2222);
70 //int nDataNode2_new = pEntity->GetNodeInt("my_test2");
71
72 // delete memory
73 //ARK_DELETE(pEntity);
74
75 return true;
76}
77
78bool Sample2Module::PreShut()
79{

Callers

nothing calls this directly

Calls 1

AddIntMethod · 0.80

Tested by

no test coverage detected