-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshell_loop.ydd.lua
More file actions
75 lines (63 loc) · 2.71 KB
/
shell_loop.ydd.lua
File metadata and controls
75 lines (63 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
--[[
Title: Empty shell game loop file
Author(s): LiXizhi
Date: 2009/5/3
Desc: this is mostly used to test modules by server.
This loop file can be activated by bootstrapper file "config/bootstrapper_emptyshell.xml"
For server build, the command line to use this shell_loop is below.
- under windows, it is "bootstrapper=\"config/bootstrapper_emptyshell.xml\"".
- under linux shell script, it is 'bootstrapper="config/bootstrapper_emptyshell.xml"'
use the lib:
------------------------------------------------------------
For server build, the command line to use this shell_loop is below.
- under windows, it is "bootstrapper=\"config/bootstrapper_emptyshell.xml\"".
- under linux shell script, it is 'bootstrapper="config/bootstrapper_emptyshell.xml"'
------------------------------------------------------------
]]
NPL.load("(gl)script/ide/commonlib.lua");
main_state = nil;
local function activate()
-- commonlib.echo("heart beat: 30 times per sec");
if(main_state==0) then
-- this is the main game loop
elseif(main_state==nil) then
main_state=0;
log("Unit Test from script/shell_ydd.lua\n")
--NPL.load("(gl)script/test/network/TestServer.lua");
--test_start_server({threadcount=2});
-- NPL.activate("NPLMono.dll", nil);
-- NPL.activate("NPLMonoInterface.dll/NPLMonoInterface.cs", {data = "C# mono dll test1"});
--NPL.activate("NPLMonoInterface.dll/NPLMonoInterface.cs", {data = "C# mono dll test2"});
--NPL.activate("NPLMonoInterface.dll/ParaMono.NPLMonoInterface.cs", {data = "C# mono dll test3"});
-- NPL.activate("NPLMonoInterface.dll/NPLMonoInterface.cs", {test_name = 1, _name=2, ["1abc"]=3});
-- push the first message to server
--local thread_count = 1;
--local i, nCount = nil, thread_count
--for i=1, nCount do
--local rts_name = "p"..i;
--local producer = NPL.CreateRuntimeState(rts_name, 0);
--producer:Start();
--end
--
--local k, kSize = nil, 1; -- math.floor(20/nCount);
--for k=1, kSize do
--local i, nCount = nil, thread_count
--for i=1, nCount do
--local rts_name = "p"..i;
--NPL.activate(string.format("(%s)NPLMonoInterface.dll/NPLMonoInterface.cs", rts_name), {rts_name=rts_name, counter=k});
--end
--end
-- NPL.activate("DBServer.dll/DBServer.DBServer.cs", {root_dir = ParaIO.GetCurDirectory(0)});
--NPL.load("(gl)script/apps/DBServer/DBServer.lua");
--DBServer:Start();
-- NPL.activate("NPLRouter.dll", nil);
--[[
NPL.load("(gl)script/apps/GameServer/test/test_client_rest.lua");
GameServer.test_client:start("config/GameClient.config.xml");
--GameServer.test_client:test_AuthUser();
GameServer.test_client:test_Home_Get(); ]]--
NPL.load("(gl)script/apps/Aries/main_loop_noUI.lua");
ABCactivate();
end
end
NPL.this(activate);