-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_chm.html
executable file
·880 lines (785 loc) · 561 KB
/
gen_chm.html
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
<!-- Created with CHM-HTML https://github.com/krogank9/chm-html -->
<html>
<head>
<title>KBEngine API</title>
<style>
html, #body1 { margin: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden !important;}
#body1 {
display: inline-flex !important;
flex-direction: row !important;
width: 100% !important;
height: 100% !important;
}
#navigation_window {
background-color: #eae9d7;
height: 100%;
width: 210px;
overflow: auto;
margin: 0;
padding: 0;
border: 0;
padding-right: 6px;
display: flex;
flex-direction: column;
}
#navigation_window * {
font-family: sans-serif !important;
font-size: 14 !important;
overflow-x: hidden
}
#contents_window {
background-color: #fff;
flex: 1;
display: flex;
flex-direction: column;
margin: 0;
padding: 0;
overflow:hidden;
border: none;
}
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
}
</style>
<style>
/* Style tabs */
.tab {
background-color: transparent;
margin-top: 8px;
position: relative;
}
.tab button {
background: linear-gradient(to bottom, #ebebe5, #fff);
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 6px;
padding-left: 7px;
padding-right: 7px;
border-radius: 4px;
border-bottom-left-radius:0px;
border-bottom-right-radius:0px;
border: 1px solid #9da1a5;
margin-left:1px;
margin-top:2px;
}
.tab button.active {
background: #fcfcfe;
border-bottom: 0px;
margin-top:1px;
border-top: 3px solid #f7ca3d;
box-shadow: 0 -1px 0 #de8a33;
margin-right: -1px;
margin-left: 0px;
padding-left: 9px;
}
.tab button.active span {
position: relative;
left: -1px;
}
.tabcontent {
display: none;
padding: 2px;
flex: 1;
overflow: auto;
}
/* checkbox style */
.css-treeview * {
overflow: hidden;
}
.css-treeview input[type=checkbox] {
display: none
}
.css-treeview input[type=checkbox] + label
{
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gQBEQYDCNPu9wAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAABEUlEQVRIx7WV3a2CQBCFzxiagsiDlGBiBZbhXh/ItGEFJpbAi0bKOj7gkIXLwkqWIYQlWTjf/K6QxFYmIgQAkhLak20prND+PQQhKSMwFvbNwU1GIgnAnPAShJDE435bpDiezhISfz/faMomCnYMkXkCwY8e99vsT5uyQfWsoiAUOqiJXcCrn9NgEDFmEEGAtfYLhKVvN/bcvPfXKSHc99JaQXIYAZKwrvDXc0ZSHNwixFg46SAiKSJCvw0NoiiLLu+1ojpUyPc52lcLd3VwVzddA2tmw1QkirLoPfbFDYqkZLGttjYSl78L2leLfJ/3NTUYRpbrlDcAKpQAqHX37KT+75WtTkPr86XTULY8jmPsA9GO+xDjEIy2AAAAAElFTkSuQmCC');
background-repeat: no-repeat;
display:inline-block;
height: 16px;
padding: 1px 0 2px 38px;
margin: 2px;
}
.css-treeview input[type=checkbox]:checked + label
{
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gQBEQYMmGzzZgAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAA60lEQVRIx82Uy23DMBBE3wZuioAvVgsBUoG7MOODtOwiacCGUwJ1MKC2Ngc6ihR9YsO0kgF44A/zOFwSMkpLNf5KWqo158ZuhVhl8jf24My1MH7vZSqd7twqdxJu7Yh1HBjvXncAhCoMEzgd3n6N7fllK9dCFJtiYJwkgKbEvgcSwJyuADRFe3sAa87NV68d1zKtU9QAe1qmRPsH7mohAPkBMgEgIoO2aAKXy+q1RRO4V0HCbAKhChSb4iEA4vGTEKEKrblbu/Gf8OP4ngPCNL1zAGIdiXUcNWayKjJUXBdiTh7/EIDxavuv+gQRUKMDzp2o2QAAAABJRU5ErkJggg==');
background-repeat: no-repeat;
display:inline-block;
height: 16px;
padding: 1px 0 2px 38px;
margin: 2px;
}
.css-treeview input[type=checkbox].not_folder + label
{
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gQBEQUsiC+AbQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAArElEQVRIx82VwQqDMBBE3xT/Wnpp9css8bOmFzVJo/Ti2g4MS0DczdtBZZszNT7Hry/s7722g+1TPTwGHwunKXl5BtvcCJMWU1SvBDKpawnYyxSbQwlIVC4vnKYEELkCY1O5Xg/RA7QEJKosAHRxATS2qmZ76qLwA0ht88/PTuAKwNZBDsIzoI3AjzLgXdxrNi5agRrcubliCcyvGUhAWUulPObZf0PtRf+f9QZT5gTfgDcxzAAAAABJRU5ErkJggg==');
background-repeat: no-repeat;
display:inline-block;
height: 16px;
padding: 1px 0px 2px 38px;
margin: 2px;
}
/* collapse code: */
.css-treeview ul
{
padding: 0;
margin-top: 0;
list-style-type: none;
}
.css-treeview input + label + ul
{
margin: 0 0 0 22px;
}
.css-treeview input ~ ul
{
display: none;
}
.css-treeview input:checked:not(:disabled) ~ ul
{
display: block;
}
#contents_window div {
padding: 8px;
margin: 0;
flex: 1;
overflow: auto;
}
.fade_sides_div:after {
z-index : 1;
background-image : linear-gradient(to left,
rgba(255,255,255, 0),
rgba(255,255,255, 1) 90%);
width : 100%;
height : 4em;
}
.hide_text_with_css:before {
content: attr(data-text)
}
</style>
</head>
<body id="body1" style="display: flex; flex-direction: row;">
<div id="navigation_window" class="noselect">
<div class="tab">
<button id="defaultopen" class="tablinks active" onclick="openTab(event, 'tab_contents')"><span class="tab_txt hide_text_with_css" data-text="Contents"></span></button>
<button class="tablinks" onclick="openTab(event, 'tab_index')"><span class="tab_txt hide_text_with_css" data-text="Index"></span></button>
<button id="searchtabbutton" class="tablinks" onclick="openTab(event, 'tab_search')"><span class="tab_txt hide_text_with_css" data-text="Search"></span></button>
</div>
<div style="border: 1px solid #9da1a5; margin-top: -1px; flex: 1; display: flex; flex-direction: column; background-color: #fff;">
<div style="margin: 7px; flex: 1; display: flex; flex-direction: column; background-color: #fff; border: 1px solid #819bbc; overflow: auto;">
<div id="tab_contents" class="tabcontent">
<div class="css-treeview" id="tstlist">
</div>
</div>
<div id="tab_index" class="tabcontent">
<input type="text" style="width: 100%; padding: 5px;" id="index_filter_text" placeholder="Filter..."></input>
<table id="index_table" style="width: inherit; border-spacing: 0px;">
</table>
</div>
<div id="tab_search" class="tabcontent">
<input type="text" style="width: 100%; padding: 5px;" id="search_text" placeholder="Search..."></input>
<table id="search_table" style="width: inherit; border-spacing: 0px;">
</table>
</div>
</div>
</div>
</div>
<div id="contents_window" style="padding: 0; margin: 0; flex: 1;">
</div>
<script>
var index_names = ['onUpdateBegin','onUpdateEnd','accelerate','addBots','onAutoLoadEntityCreate','clientEntity','clientapp','volatileInfo','canNavigate','__ACCOUNT_NAME__','__ACCOUNT_PASSWORD__','clientAddr','clientEnabled','hasClient','roundTripTime','timeSinceHeardFromClient','databaseInterfaceName','createBaseRemotelyFromDB','createBaseRemotelyFromDBID','createBaseRemotely','controlledBy','onLoseControlledBy','callback','cancelCallback','debugTracing','debugTracing','onSpaceGone','onTurn','addYawRotator','getClientDatas','addProximity','layer','navigatePathPoints','onEnterSpace','onEnterSpace','onLeaveSpace','onLeaveSpace','onEnterWorld','onEnterWorld','onLeaveWorld','onLeaveWorld','getAppFlags','getAppFlags','setAppFlags','setAppFlags','getRandomPoints','raycast','destroySpace','vector3','vector3','createBaseLocally','createBaseAnywhereFromDBID','createEntity','createEntity','addTimer','addTimer','cancelController','cancelController','debugView','delTimer','delTimer','entitiesInView','entitiesInRange','isReal','moveToEntity','moveToPoint','moveToPoint','navigate','setViewRadius','getViewRadius','getViewHystArea','teleport','onEnterTrap','onEnteredView','onEnteredCell','onEnteringCell','onGetWitness','onLeaveTrap','onLeaveTrapID','onLeavingCell','onLeftCell','onLoseControlledBy','onLoseWitness','onMove','onMoveFailure','onNavigate','onNavigateFailed','onTeleport','onTeleportFailure','onTeleportSuccess','onWitnessed','allClients','base','base','base','client','client','controlledBy','direction','direction','direction','hasWitness','disconnect','isOnGround','isOnGround','isOnGround','isWitnessed','otherClients','ownClient','pitch','position','position','position','roll','seeingHeight','shouldAutoBackup','destroy','destroy','destroyCellEntity','teleport','teleport','writeToDB','writeToDB','onGetCell','onLoseCell','onPreArchive','onRestore','onTimer','onTimer','ghost','real','EntityCall','KBE_ROOT','KBE_RES_PATH','KBE_HYBRID_PATH','entities.xml','kbengine_defaults.xml','kbengine.xml','entity','entity','View','Witness','Space','onWriteToDB','onWriteToDB','cell','cell','cell','cellData','className','className','className','className','inWorld','client','client','databaseID','id','id','id','id','isDestroyed','isDestroyed','shouldAutoArchive','shouldAutoBackup','spaceID','topSpeed','topSpeedY','velocity','visibleHeight','visionAngle','visionRange','volatileInfo','yaw','spaceID','spaceID','spaceID','getClientType','giveClientTo','streamFileToClient','streamStringToClient','onClientDeath','onClientGetCell','onClientEnabled','onGiveClientToFailure','onLogOnAttempt','onStreamComplete','onCreateCellFailure','onDestroy','onDestroy','createCellEntity','createCellEntityInNewSpace','delWatcher','delWatcher','delSpaceData','executeRawDatabaseCommand','executeRawDatabaseCommand','getResFullPath','getResFullPath','getWatcher','getWatcher','getWatcherDir','getWatcherDir','hasRes','hasRes','getSpaceData','getSpaceGeometryMapping','isShuttingDown','isShuttingDown','listPathRes','listPathRes','matchPath','matchPath','open','open','publish','publish','reloadScript','reloadScript','scriptLogType','scriptLogType','scriptLogType','setSpaceData','time','time','lookUpBaseByDBID','quantumPassedPercent','quantumPassedPercent','registerWriteFileDescriptor','registerWriteFileDescriptor','onBaseAppReady','onBaseAppShutDown','onCellAppDeath','onFini','onBaseAppData','onBaseAppDataDel','onGlobalData','onGlobalData','onGlobalDataDel','onGlobalDataDel','onInit','onInit','onLoseChargeCB','onReadyForLogin','onSpaceData','onSpaceGeometryLoaded','onAllSpaceGeometryLoaded','LOG_TYPE_DBG','LOG_TYPE_DBG','LOG_TYPE_ERR','LOG_TYPE_ERR','LOG_TYPE_INFO','LOG_TYPE_INFO','LOG_TYPE_NORMAL','LOG_TYPE_NORMAL','LOG_TYPE_WAR','LOG_TYPE_WAR','NEXT_ONLY','NEXT_ONLY','cellAppData','component','component','entities','entities','globalData','globalData','baseAppData','genUUID64','genUUID64','genUUID64','deleteBaseByDBID','deregisterWriteFileDescriptor','deregisterWriteFileDescriptor','deregisterReadFileDescriptor','deregisterReadFileDescriptor','registerReadFileDescriptor','registerReadFileDescriptor','createBaseFromDBID','createBaseAnywhere','createBase','charge','MemoryStream','MemoryStream','address','address','addSpaceGeometryMapping','cellapp','cellapp','baseapp','baseapp','github','keywords','base','base','type','KBEngine','KBEngine','KBEngine','KBEngine','addWatcher','addWatcher','addTimer','addTimer','addTimer','addTimer','delTimer','delTimer','delTimer','delTimer','onDBMgrReady','onDBMgrShutDown','onSelectAccountDBInterface','accountLoginResponse','createAccountResponse','chargeResponse','onInterfaceAppReady','onInterfaceAppShutDown','onRequestCreateAccount','onRequestAccountLogin','onRequestCharge','onLoggerAppReady','onLoggerAppShutDown','onLogWrote','onReadyForShutDown','onReadyForShutDown','onReadyForShutDown','onLoginAppReady','onLoginAppShutDown','onRequestLogin','onLoginCallbackFromDB','onRequestCreateAccount','onCreateAccountCallbackFromDB'];
var index_links = ['cellapp/Classes/Entity.html#onUpdateBegin','cellapp/Classes/Entity.html#onUpdateEnd','cellapp/Classes/Entity.html#accelerate','bots/Modules/KBEngine.html#addBots','baseapp/Modules/KBEngine.html#onAutoLoadEntityCreate','cellapp/Classes/Entity.html#clientEntity','bots/Classes/Entity.html#clientapp','cellapp/Classes/Entity.html#volatileInfo','cellapp/Classes/Entity.html#canNavigate','baseapp/Classes/Proxy.html#__ACCOUNT_NAME__','baseapp/Classes/Proxy.html#__ACCOUNT_PASSWORD__','baseapp/Classes/Proxy.html#clientAddr','baseapp/Classes/Proxy.html#clientEnabled','baseapp/Classes/Proxy.html#hasClient','baseapp/Classes/Proxy.html#roundTripTime','baseapp/Classes/Proxy.html#timeSinceHeardFromClient','baseapp/Classes/Entity.html#databaseInterfaceName','baseapp/Modules/KBEngine.html#createBaseRemotelyFromDBID','baseapp/Modules/KBEngine.html#createBaseRemotelyFromDBID','baseapp/Modules/KBEngine.html#createBaseRemotely','cellapp/Classes/Entity.html#controlledBy','cellapp/Classes/Entity.html#onLoseControlledBy','bots/Modules/KBEngine.html#callback','bots/Modules/KBEngine.html#cancelCallback','cellapp/Modules/KBEngine.html#debugTracing','baseapp/Modules/KBEngine.html#debugTracing','cellapp/Classes/Entity.html#onSpaceGone','cellapp/Classes/Entity.html#onTurn','cellapp/Classes/Entity.html#addYawRotator','baseapp/Classes/Proxy.html#getClientDatas','cellapp/Classes/Entity.html#addProximity','cellapp/Classes/Entity.html#layer','cellapp/Classes/Entity.html#navigatePathPoints','client/Classes/Entity.html#onEnterSpace','bots/Classes/Entity.html#onEnterSpace','bots/Classes/Entity.html#onLeaveSpace','client/Classes/Entity.html#onLeaveSpace','client/Classes/Entity.html#onEnterWorld','bots/Classes/Entity.html#onEnterWorld','bots/Classes/Entity.html#onLeaveWorld','client/Classes/Entity.html#onLeaveWorld','baseapp/Modules/KBEngine.html#getAppFlags','cellapp/Modules/KBEngine.html#getAppFlags','baseapp/Modules/KBEngine.html#setAppFlags','cellapp/Modules/KBEngine.html#setAppFlags','cellapp/Classes/Entity.html#getRandomPoints','cellapp/Modules/KBEngine.html#raycast','cellapp/Classes/Entity.html#destroySpace','keywords.html#vector3','basetypes.html','baseapp/Modules/KBEngine.html#createBaseLocally','baseapp/Modules/KBEngine.html#createBaseAnywhereFromDBID','baseapp/Modules/KBEngine.html#createEntity','cellapp/Modules/KBEngine.html#createEntity','baseapp/Classes/Entity.html#addTimer','cellapp/Classes/Entity.html#addTimer','cellapp/Classes/Entity.html#cancelController','bots/Classes/Entity.html#cancelController','cellapp/Classes/Entity.html#debugView','baseapp/Classes/Entity.html#delTimer','cellapp/Classes/Entity.html#delTimer','cellapp/Classes/Entity.html#entitiesInView','cellapp/Classes/Entity.html#entitiesInRange','cellapp/Classes/Entity.html#isReal','cellapp/Classes/Entity.html#moveToEntity','cellapp/Classes/Entity.html#moveToPoint','bots/Classes/Entity.html#moveToPoint','cellapp/Classes/Entity.html#navigate','cellapp/Classes/Entity.html#setViewRadius','cellapp/Classes/Entity.html#getViewRadius','cellapp/Classes/Entity.html#getViewHystArea','cellapp/Classes/Entity.html#teleport','cellapp/Classes/Entity.html#onEnterTrap','cellapp/Classes/Entity.html#onEnteredView','cellapp/Classes/Entity.html#onEnteredCell','cellapp/Classes/Entity.html#onEnteringCell','cellapp/Classes/Entity.html#onGetWitness','cellapp/Classes/Entity.html#onLeaveTrap','cellapp/Classes/Entity.html#onLeaveTrapID','cellapp/Classes/Entity.html#onLeavingCell','cellapp/Classes/Entity.html#onLeftCell','cellapp/Classes/Entity.html#onLoseControlledBy','cellapp/Classes/Entity.html#onLoseWitness','cellapp/Classes/Entity.html#onMove','cellapp/Classes/Entity.html#onMoveFailure','cellapp/Classes/Entity.html#onNavigate','cellapp/Classes/Entity.html#onNavigateFailed','cellapp/Classes/Entity.html#onTeleport','cellapp/Classes/Entity.html#onTeleportFailure','cellapp/Classes/Entity.html#onTeleportSuccess','cellapp/Classes/Entity.html#onWitnessed','cellapp/Classes/Entity.html#allClients','cellapp/Classes/Entity.html#base','keywords.html#base','bots/Classes/Entity.html#base','cellapp/Classes/Entity.html','keywords.html#client','cellapp/Classes/Entity.html#controlledBy','cellapp/Classes/Entity.html#direction','bots/Classes/Entity.html#direction','client/Classes/Entity.html#direction','cellapp/Classes/Entity.html#hasWitness','baseapp/Classes/Proxy.html#disconnect','cellapp/Classes/Entity.html#isOnGround','bots/Classes/Entity.html#isOnGround','client/Classes/Entity.html#isOnGround','cellapp/Classes/Entity.html#isWitnessed','cellapp/Classes/Entity.html#otherClients','cellapp/Classes/Entity.html#ownClient','cellapp/Classes/Entity.html#pitch','cellapp/Classes/Entity.html#position','client/Classes/Entity.html#position','bots/Classes/Entity.html#position','cellapp/Classes/Entity.html#roll','cellapp/Classes/Entity.html#seeingHeight','cellapp/Classes/Entity.html#shouldAutoBackup','baseapp/Classes/Entity.html#destroy','cellapp/Classes/Entity.html#destroy','baseapp/Classes/Entity.html#destroyCellEntity','baseapp/Classes/Entity.html#teleport','cellapp/Classes/Entity.html#teleport','baseapp/Classes/Entity.html#writeToDB','cellapp/Classes/Entity.html#writeToDB','baseapp/Classes/Entity.html#onGetCell','baseapp/Classes/Entity.html#onLoseCell','baseapp/Classes/Entity.html#onPreArchive','baseapp/Classes/Entity.html#onRestore','baseapp/Classes/Entity.html#onTimer','cellapp/Classes/Entity.html#onTimer','keywords.html#ghost','keywords.html#real','keywords.html#EntityCall','keywords.html#KBE_ROOT','keywords.html#KBE_RES_PATH','keywords.html#KBE_HYBRID_PATH','keywords.html#entities.xml','keywords.html#kbengine_defaults.xml','keywords.html#kbengine.xml','cellapp/Classes/Entity.html','keywords.html#entity','keywords.html#View','keywords.html#Witness','keywords.html#Space','baseapp/Classes/Entity.html#onWriteToDB','cellapp/Classes/Entity.html#onWriteToDB','baseapp/Classes/Entity.html#cell','keywords.html#cell','bots/Classes/Entity.html#cell','baseapp/Classes/Entity.html#cellData','baseapp/Classes/Entity.html#className','cellapp/Classes/Entity.html#className','client/Classes/Entity.html#className','bots/Classes/Entity.html#className','client/Classes/Entity.html#inWorld','baseapp/Classes/Entity.html#client','keywords.html#client','baseapp/Classes/Entity.html#databaseID','baseapp/Classes/Entity.html#id','cellapp/Classes/Entity.html#id','bots/Classes/Entity.html#id','client/Classes/Entity.html#id','baseapp/Classes/Entity.html#isDestroyed','cellapp/Classes/Entity.html#isDestroyed','baseapp/Classes/Entity.html#shouldAutoArchive','baseapp/Classes/Entity.html#shouldAutoBackup','cellapp/Classes/Entity.html#spaceID','cellapp/Classes/Entity.html#topSpeed','cellapp/Classes/Entity.html#topSpeedY','cellapp/Classes/Entity.html#velocity','cellapp/Classes/Entity.html#visibleHeight','cellapp/Classes/Entity.html#visionAngle','cellapp/Classes/Entity.html#visionRange','cellapp/Classes/Entity.html#volatileInfo','cellapp/Classes/Entity.html#yaw','cellapp/Classes/Entity.html#spaceID','client/Classes/Entity.html#spaceID','bots/Classes/Entity.html#spaceID','baseapp/Classes/Proxy.html#getClientType','baseapp/Classes/Proxy.html#giveClientTo','baseapp/Classes/Proxy.html#streamFileToClient','baseapp/Classes/Proxy.html#streamStringToClient','baseapp/Classes/Proxy.html#onClientDeath','baseapp/Classes/Proxy.html#onClientGetCell','baseapp/Classes/Proxy.html#onClientEnabled','baseapp/Classes/Proxy.html#onGiveClientToFailure','baseapp/Classes/Proxy.html#onLogOnAttempt','baseapp/Classes/Proxy.html#onStreamComplete','baseapp/Classes/Entity.html','baseapp/Classes/Entity.html#onDestroy','cellapp/Classes/Entity.html#onDestroy','baseapp/Classes/Entity.html#createCellEntity','baseapp/Classes/Entity.html#createCellEntityInNewSpace','baseapp/Modules/KBEngine.html#delWatcher','cellapp/Modules/KBEngine.html#delWatcher','cellapp/Modules/KBEngine.html#delSpaceData','cellapp/Modules/KBEngine.html#executeRawDatabaseCommand','baseapp/Modules/KBEngine.html#executeRawDatabaseCommand','baseapp/Modules/KBEngine.html#getResFullPath','cellapp/Modules/KBEngine.html#getResFullPath','baseapp/Modules/KBEngine.html#getWatcher','cellapp/Modules/KBEngine.html#getWatcher','baseapp/Modules/KBEngine.html#getWatcherDir','cellapp/Modules/KBEngine.html#getWatcherDir','baseapp/Modules/KBEngine.html#hasRes','cellapp/Modules/KBEngine.html#hasRes','cellapp/Modules/KBEngine.html#getSpaceData','cellapp/Modules/KBEngine.html#getSpaceGeometryMapping','baseapp/Modules/KBEngine.html#isShuttingDown','cellapp/Modules/KBEngine.html#isShuttingDown','baseapp/Modules/KBEngine.html#listPathRes','cellapp/Modules/KBEngine.html#listPathRes','baseapp/Modules/KBEngine.html#matchPath','cellapp/Modules/KBEngine.html#matchPath','baseapp/Modules/KBEngine.html#open','cellapp/Modules/KBEngine.html#open','baseapp/Modules/KBEngine.html#publish','cellapp/Modules/KBEngine.html#publish','baseapp/Modules/KBEngine.html#reloadScript','cellapp/Modules/KBEngine.html#reloadScript','baseapp/Modules/KBEngine.html#scriptLogType','cellapp/Modules/KBEngine.html#scriptLogType','bots/Modules/KBEngine.html#scriptLogType','cellapp/Modules/KBEngine.html#setSpaceData','baseapp/Modules/KBEngine.html#time','cellapp/Modules/KBEngine.html#time','baseapp/Modules/KBEngine.html#lookUpBaseByDBID','baseapp/Modules/KBEngine.html#quantumPassedPercent','cellapp/Modules/KBEngine.html#quantumPassedPercent','baseapp/Modules/KBEngine.html#registerWriteFileDescriptor','cellapp/Modules/KBEngine.html#registerWriteFileDescriptor','baseapp/Modules/KBEngine.html#onBaseAppReady','baseapp/Modules/KBEngine.html#onBaseAppShutDown','baseapp/Modules/KBEngine.html#onCellAppDeath','baseapp/Modules/KBEngine.html#onFini','baseapp/Modules/KBEngine.html#onBaseAppData','baseapp/Modules/KBEngine.html#onBaseAppDataDel','baseapp/Modules/KBEngine.html#onGlobalData','cellapp/Modules/KBEngine.html#onGlobalData','baseapp/Modules/KBEngine.html#onGlobalDataDel','cellapp/Modules/KBEngine.html#onGlobalDataDel','baseapp/Modules/KBEngine.html#onInit','cellapp/Modules/KBEngine.html#onInit','baseapp/Modules/KBEngine.html#onLoseChargeCB','baseapp/Modules/KBEngine.html#onReadyForLogin','cellapp/Modules/KBEngine.html#onSpaceData','cellapp/Modules/KBEngine.html#onSpaceGeometryLoaded','cellapp/Modules/KBEngine.html#onAllSpaceGeometryLoaded','baseapp/Modules/KBEngine.html#LOG_TYPE_DBG','cellapp/Modules/KBEngine.html#LOG_TYPE_DBG','baseapp/Modules/KBEngine.html#LOG_TYPE_ERR','cellapp/Modules/KBEngine.html#LOG_TYPE_ERR','baseapp/Modules/KBEngine.html#LOG_TYPE_INFO','cellapp/Modules/KBEngine.html#LOG_TYPE_INFO','baseapp/Modules/KBEngine.html#LOG_TYPE_NORMAL','cellapp/Modules/KBEngine.html#LOG_TYPE_NORMAL','baseapp/Modules/KBEngine.html#LOG_TYPE_WAR','cellapp/Modules/KBEngine.html#LOG_TYPE_WAR','baseapp/Modules/KBEngine.html#NEXT_ONLY','cellapp/Modules/KBEngine.html#NEXT_ONLY','cellapp/Modules/KBEngine.html#cellAppData','baseapp/Modules/KBEngine.html#component','cellapp/Modules/KBEngine.html#component','baseapp/Modules/KBEngine.html#entities','cellapp/Modules/KBEngine.html#entities','baseapp/Modules/KBEngine.html#globalData','cellapp/Modules/KBEngine.html#globalData','baseapp/Modules/KBEngine.html#baseAppData','baseapp/Modules/KBEngine.html#genUUID64','cellapp/Modules/KBEngine.html#genUUID64','bots/Modules/KBEngine.html#genUUID64','baseapp/Modules/KBEngine.html#deleteBaseByDBID','baseapp/Modules/KBEngine.html#deregisterWriteFileDescriptor','cellapp/Modules/KBEngine.html#deregisterWriteFileDescriptor','baseapp/Modules/KBEngine.html#deregisterReadFileDescriptor','cellapp/Modules/KBEngine.html#deregisterReadFileDescriptor','baseapp/Modules/KBEngine.html#registerReadFileDescriptor','cellapp/Modules/KBEngine.html#registerReadFileDescriptor','baseapp/Modules/KBEngine.html#createBaseFromDBID','baseapp/Modules/KBEngine.html#createBaseAnywhere','baseapp/Modules/KBEngine.html#createBase','baseapp/Modules/KBEngine.html#charge','baseapp/Modules/KBEngine.html#MemoryStream','cellapp/Modules/KBEngine.html#MemoryStream','baseapp/Modules/KBEngine.html#address','cellapp/Modules/KBEngine.html#address','cellapp/Modules/KBEngine.html#addSpaceGeometryMapping','cellapp/index.html','keywords.html#cellapp','baseapp/index.html','keywords.html#baseapp','index.html','keywords.html','baseapp/Classes/Entity.html','basetypes.html','basetypes.html','baseapp/Modules/KBEngine.html','cellapp/Modules/KBEngine.html','baseapp/index.html','cellapp/index.html','baseapp/Modules/KBEngine.html#addWatcher','cellapp/Modules/KBEngine.html#addWatcher','dbmgr/Modules/KBEngine.html#addTimer','interfaces/Modules/KBEngine.html#addTimer','logger/Modules/KBEngine.html#addTimer','loginapp/Modules/KBEngine.html#addTimer','dbmgr/Modules/KBEngine.html#delTimer','interfaces/Modules/KBEngine.html#delTimer','logger/Modules/KBEngine.html#delTimer','loginapp/Modules/KBEngine.html#delTimer','dbmgr/Modules/KBEngine.html#onDBMgrReady','dbmgr/Modules/KBEngine.html#onDBMgrShutDown','dbmgr/Modules/KBEngine.html#onSelectAccountDBInterface','interfaces/Modules/KBEngine.html#accountLoginResponse','interfaces/Modules/KBEngine.html#createAccountResponse','interfaces/Modules/KBEngine.html#chargeResponse','interfaces/Modules/KBEngine.html#onInterfaceAppReady','interfaces/Modules/KBEngine.html#onInterfaceAppShutDown','interfaces/Modules/KBEngine.html#onRequestCreateAccount','interfaces/Modules/KBEngine.html#onRequestAccountLogin','interfaces/Modules/KBEngine.html#onRequestCharge','logger/Modules/KBEngine.html#onLoggerAppReady','logger/Modules/KBEngine.html#onLoggerAppShutDown','logger/Modules/KBEngine.html#onLogWrote','logger/Modules/KBEngine.html#onReadyForShutDown','baseapp/Modules/KBEngine.html#onReadyForShutDown','dbmgr/Modules/KBEngine.html#onReadyForShutDown','loginapp/Modules/KBEngine.html#onLoginAppReady','loginapp/Modules/KBEngine.html#onLoginAppShutDown','loginapp/Modules/KBEngine.html#onRequestLogin','loginapp/Modules/KBEngine.html#onLoginCallbackFromDB','loginapp/Modules/KBEngine.html#onRequestCreateAccount','loginapp/Modules/KBEngine.html#onCreateAccountCallbackFromDB'];
function my_sort(arr, twin) {
for(var i=0; i<arr.length; i++) {
for(var j=i+1; j<arr.length; j++) {
if(arr[i].toLowerCase() > arr[j].toLowerCase()) {
var tmp = arr[i];
arr[i] = arr[j];
arr[j] = tmp;
tmp = twin[i];
twin[i] = twin[j];
twin[j] = tmp;
}
}
}
}
my_sort(index_names, index_links);
var toc_paths = ['index.html','keywords.html','basetypes.html','client/index.html','client/Modules/KBEngine.html','client/Classes/Entity.html','cellapp/index.html','cellapp/Modules/KBEngine.html','cellapp/Classes/Entity.html','baseapp/index.html','baseapp/Modules/KBEngine.html','baseapp/Classes/Entity.html','baseapp/Classes/Proxy.html','loginapp/index.html','loginapp/Modules/KBEngine.html','dbmgr/index.html','dbmgr/Modules/KBEngine.html','bots/index.html','bots/Modules/KBEngine.html','bots/Classes/PyClientApp.html','bots/Classes/Entity.html','interfaces/index.html','interfaces/Modules/KBEngine.html','logger/index.html','logger/Modules/KBEngine.html'].map(function(p){return p.toLowerCase()});
var toc_html = ['<html>\r\n\r\n<head>\r\n<title>KBEngine - Getting Started</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n\r\n<h1>What is KBEngine?</h1>\r\n<br></br>\r\n\r\nKBEngine is an open source game server engine. The client can communicate with the server through a simple protocol.\r\nKBEngine plugins can be quickly combined with (Unity3D, OGRE, Cocos2d-x, HTML5, \r\netc.) technology to form a complete game client. The server-side low-level \r\nframework is written in C++, and the game logic layer uses Python (supports hot-fixing).\r\nDevelopers do not need to repeatedly implement the underlying \r\ntechnologies common to some game servers, and instead can focus their efforts \r\non the game development level, to quickly build various multiplayer games.\r\n<br><br>\r\n(Because it is often asked what the upper limit of the load is that KBEngine can handle, the underlying \r\narchitecture has been designed as a multi-process distributed dynamic load balancing solution. Theoretically, \r\nby continuously expanding the hardware, the upper limit of the load can also be continuously increased. \r\nThe upper limit of the capacity of a single machine depends on the complexity of the game logic itself.)\r\n<br><br>\r\n\r\nHomepage</br>\r\n\r\n<a href="http://www.kbengine.org"> http://www.kbengine.org </a>\r\n</br></br>\r\n\r\nReleases\r\n</br>\r\nsources : <a href="https://github.com/kbengine/kbengine/releases/latest">https://github.com/kbengine/kbengine/releases/latest </a></br>\r\nbinarys : <a href="https://sourceforge.net/projects/kbengine/files/">https://sourceforge.net/projects/kbengine/files/</a></br>\r\n</br></br>\r\nDemo sources\r\n</br>\r\nunity3d : <a href="https://github.com/kbengine/kbengine/releases/latest">https://github.com/kbengine/kbengine_unity3d_demo/releases/latest</a></br>\r\nunity3d : <a href="https://github.com/kbengine/kbengine_unity3d_warring/releases/latest">https://github.com/kbengine/kbengine_unity3d_warring/releases/latest</a></br>\r\nogre : <a href="https://github.com/kbengine/kbengine_ogre_demo/releases/latest">https://github.com/kbengine/kbengine_ogre_demo/releases/latest</a></br>\r\nhtml5 : <a href="https://github.com/kbengine/kbengine_html5_demo/releases/latest">https://github.com/kbengine/kbengine_html5_demo/releases/latest</a></br>\r\n</br></br>\r\nDocs\r\n</br>\r\ndocs : <a href="http://www.kbengine.org/docs/">http://www.kbengine.org/docs/</a></br>\r\nAPI : <a href="https://github.com/kbengine/kbengine/tree/master/docs">https://github.com/kbengine/kbengine/tree/master/docs</a></br>\r\n</br></br>\r\nSupport\r\n</br>\r\nEmail : <a href="mailto:[email protected]">[email protected]</a></br>\r\nMaillist : <a href="https://groups.google.com/d/forum/kbengine_maillist">https://groups.google.com/d/forum/kbengine_maillist</a></br>\r\n</br></br>\r\n\r\n\r\n<h1>Start</h1>\r\n<br></br>\r\nYou can look at the <a href="http://www.kbengine.org/docs/installation.html">installation guide</a> first.\r\nAfter learning about the <a href="http://www.kbengine.org/docs/tools/">common tools</a>, you can go to\r\n<a href="https://github.com/kbengine/kbengine">GitHub</a> to join our open source team.\r\n<br></br>\r\n\r\nI believe that after you have enough knowledge of KBEngine, you will like it.\r\n<br></br>\r\n<br></br>\r\n<h1>Want to modify and improve the documentation?</h1>\r\n<br></br>\r\nIf you think there is something in the documentation that needs to be changed, you can\r\n<a href="https://github.com/kbengine/kbengine_docs">fork kbengine_docs</a>\r\nand submit a pull request.\r\n<br></br>\r\nAgain, if you find anything in the documentation that you don\'t understand, \r\nplease submit an <a href="https://github.com/kbengine/kbengine_docs/issues">issue</a>,\r\nand I will adjust the document to help everyone have a better understanding.\r\n\r\n<br></br>\r\n<br></br>\r\n<br></br>\r\n<br></br>\r\n<hr></hr>\r\n\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n\r\n<head>\r\n<title>KBEngine - Keywords</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n\r\n<h1>Keywords Used</h1>\r\n<br></br>\r\n\r\n<a name="EntityCall"></a><p class="function_definition">\r\n<span class="function_definition">EntityCall:</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nThis is the conventional means of remote interaction between entities in\r\nthe script layer. (other references: <a href=cellapp/Classes/Entity.html#allClients>allClients</a>,\r\n<a href=cellapp/Classes/Entity.html#otherClients>otherClients</a>,\r\n<a href=cellapp/Classes/Entity.html#clientEntity>clientEntity</a>).\r\n\r\n<br><br>\r\n\r\nThe EntityCall object is very simple to implement in the underlying C++, it contains only the ID of the entity, \r\nthe address of the destination, the entity type, and type of EntityCall.\r\n\r\nWhen a remote call is requested by the user, \r\nthe engine first finds a description of the entity definition through the entity type, \r\nand checks the data input by the user against the description of the entity definition. \r\nIf the check is legal, then the data is packaged and sent to the destination \r\naccording to the protocol.\r\n<br><br>\r\nNote: An EntityCall can only be used to call methods declared in its corresponding \r\ndef file. It cannot call any of KBEngine\'s basic Entity class functions or \r\naccess entity attributes.\r\n\r\n<br><br>\r\nAn Entity can contain up to three parts:<br>\r\n<b>Client</b>: When an entity includes a client part (usually a \r\nplayer), the entity\'s client (EntityCall) property can be accessed on the \r\nserver side.<br>\r\n<b>Base</b>: When an entity includes a baseapp part, the base (EntityCall) \r\nattribute of the entity can be accessed in a non-current baseapp.<br>\r\n<b>Cell</b>: When an entity includes a cellapp part, the cell (EntityCall) \r\nattribute of the entity can be accessed in a non-current cellapp.<br>\r\n\r\n<br>\r\n\r\nExample:<br><br>\r\nClient remote method defined in Avatar.def:\r\n<pre>\r\n\t<ClientMethods>\r\n\t\t<hello>\r\n\t\t</hello>\r\n\t</ClientMethods>\r\n</pre>\r\n\r\n<br><br>\r\nclient\\Avatar.py\r\n<pre>\r\n\tclass Avatar:\r\n\t\tdef hello(self):\r\n\t\t\tprint("hello")\r\n</pre>\r\n<br><br>\r\n\r\nEnter in the Debug page input box of the GUIConsole tool (check the \r\nprocess to be debugged first in the list on the left):<br>\r\nFirst find the ID of the player entity (Avatar) in the log of the server\'s\r\nBaseapp, and then get the player entity (Avatar) or EntityCall through \r\nthe entity ID:<br><br>\r\n\r\n>>> KBEngine.entities[Player ID].client.hello()<br>\r\n<br>\r\nAt this point, the client log file will output "hello" and a remote call\r\nprocess will be completed.\r\n</div>\r\n\r\n\r\n\r\n<a name="KBE_ROOT"></a><p class="function_definition">\r\n<span class="function_definition">KBE_ROOT:</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nThis is a KBEngine environment variable that describes the root directory\r\nwhere KBEngine is located.\r\n</div>\r\n\r\n\r\n\r\n<a name="KBE_RES_PATH"></a><p class="function_definition">\r\n<span class="function_definition">KBE_RES_PATH:</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nThis is a KBEngine environment variable that describes the resource \r\ndirectory that KBEngine engine can read.\r\n</div>\r\n\r\n\r\n\r\n<a name="KBE_HYBRID_PATH"></a><p class="function_definition">\r\n<span class="function_definition">KBE_HYBRID_PATH:</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nThis is a KBEngine environment variable that describes the directory \r\nwhere the KBEngine engine executable file is located.\r\n</div>\r\n\r\n\r\n\r\n<a name="entities.xml"></a><p class="function_definition">\r\n<span class="function_definition">entities.xml:</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nAll valid entity types on the server must be registered here. When the \r\nengine is initialized, the description of the entity is loaded according \r\nto the order.\r\n</div>\r\n\r\n\r\n\r\n<a name="kbengine_defaults.xml"></a><p class="function_definition">\r\n<span class="function_definition">kbengine_defaults.xml:</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nServer-side default configuration, where users can modify all component\r\nconfigurations such as <a href=cellapp/index.html>cellapp</a>, \r\n<a href=baseapp/index.html>baseapp</a>, and <a href=loginapp/index.html>loginapp</a>.\r\n\r\n<br><br>\r\nNote: You may often need to upgrade the engine. Modifying directly may \r\ncause conflicts during the upgrade, and it is not suitable for multiple \r\nprojects in the same KBEngine environment.\r\n<br><br>\r\n\r\nIt is recommended that you modify the overload in \r\n<a href=#kbengine.xml>kbengine.xml</a>. You only need to rewrite the \r\nparts you want to modify according to the format in xml.\r\n\r\n</div>\r\n\r\n\r\n\r\n<a name="kbengine.xml"></a><p class="function_definition">\r\n<span class="function_definition">kbengine.xml:</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nServer configuration file, where users can modify all component configurations \r\nsuch as <a href=cellapp/index.html>cellapp</a>,\r\n<a href=baseapp/index.html>baseapp</a>, and <a href=loginapp/index.html>loginapp</a>.<br>\r\nFor details, please refer to <a href=#kbengine_defaults.xml>kbengine_defaults.xml</a>\r\n</div>\r\n\r\n\r\n\r\n<a name="Entity"></a><p class="function_definition">\r\n<span class="function_definition">entity</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nEntity is defined as the most basic object of the server, similar to \r\nPython\'s base object.<br>\r\nWhen and how should you define an entity? See <a href=http://www.kbengine.org/docs/programming/entitydef.html>http://www.kbengine.org/docs/programming/entitydef.html</a>\r\n</div>\r\n\r\n<a name="View"></a><p class="function_definition">\r\n<span class="function_definition">View</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nEach client entity connected to the server will have a View. It allows \r\nthe client entity to communicate events in its View to its own client.<br>\r\nView is related to space, and each View can be set to an independent size \r\nrange.\r\n<br><br>\r\nNote: The space described here is an abstract concept and does not \r\nnecessarily need to be bound to the concept of physical space (except\r\n for MMORPGs). For the core gameplay of a card game, players in a room can \r\nalso be considered to be in a logical space.\r\n<br><br>\r\nEvents include: entity movement, property change of client broadcast type, \r\ndestruction on death, and so on.\r\n\r\n</div>\r\n\r\n\r\n\r\n<a name="Witness"></a><p class="function_definition">\r\n<span class="function_definition">Witness</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nEyewitness.<br> \r\nOnly Witnesses bound to <a href=#cell>cell</a> entity Views take effect. \r\nIn other words, Witness is a <a href=#cell>cell</a> proxy of the client. \r\nThe cellapp continuously synchronizes the information in the View to the \r\nclient through the Witness.<br>\r\nWhen an NPC on the server is seen by a witness, it call the onWitness \r\ncallback of the entity. The server can rely on this feature to reduce CPU \r\nconsumption. When an entity is not witnessed, the server can stop any of \r\nits behavior.<br>\r\n</div>\r\n\r\n\r\n<a name="Space"></a><p class="function_definition">\r\n<span class="function_definition">Space</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nA space KBEngine allocates on the cellapp, which is isolated \r\nfrom other spaces. Views, traps, entity collisions, etc. only interact with each \r\nother in the current space. The space is defined by the user. It can be \r\na scene, copy, room...\r\n</div>\r\n\r\n\r\n<a name="cell"></a><p class="function_definition">\r\n<span class="function_definition">cell</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nThere are two different meanings of cell in this documentation. \r\nUsually, when referring to the <a href=baseapp/Classes/Entity.html#cell>Entity.cell</a> \r\nattribute, you are actually describing the entity\'s <a href=#EntityCall>CellEntityCall</a>.<br>\r\n<br>\r\nIf a cell is described as part of a <a href=#Space>space</a>, it refers to <a href=cellapp/index.html>cellapp</a>\'s load \r\nbalancing technique. A space in the cellapp may be divided into n parts, \r\neach called a cell, and each cell is maintained by a different process.\r\n<br>\r\n</div>\r\n\r\n\r\n<a name="base"></a><p class="function_definition">\r\n<span class="function_definition">base</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nUsually refers to the Base entity on the <a href=baseapp/index.html>baseapp</a> \r\nor a <a href=#EntityCall>BaseEntityCall</a> that points to the Base entity.<br>\r\nFor example: <a href=cellapp/Classes/Entity.html#base>Entity.base</a>\r\n</div>\r\n\r\n\r\n\r\n<a name="client"></a><p class="function_definition">\r\n<span class="function_definition">client</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nUsually refers to the client or an <a href=#EntityCall>EntityCall</a> \r\nthat points to the client entity.<br>\r\nFor example: <a href=baseapp/Classes/Entity.html#client>Entity.client</a>\r\n</div>\r\n\r\n\r\n\r\n<a name="cellapp"></a><p class="function_definition">\r\n<span class="function_definition">cellapp</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nThe Cellapp process in mainly responsible for position-related game logic, \r\nView, AI, scene rooms, and so on.<br>\r\nSee also: <a href=cellapp/index.html>cellapp</a>\r\n</div>\r\n\r\n\r\n<a name="baseapp"></a><p class="function_definition">\r\n<span class="function_definition">baseapp</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nThe Baseapp process is mainly responsible for communication with the client, \r\nposition-independent game logic (guild manager, chat system, game lobby, \r\nleaderboard, etc.), archiving, backup, and so on.<br>\r\nSee also: <a href=baseapp/index.html>baseapp</a>\r\n</div>\r\n\r\n\r\n\r\n<a name="real"></a><p class="function_definition">\r\n<span class="function_definition">real</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nRefers to an entity in a cell that is actually present in the cell at that \r\ntime. (As opposed to a <a href=#ghost>ghost</a> entity broadcast there by another cell)\r\n</div>\r\n\r\n\r\n\r\n<a name="ghost"></a><p class="function_definition">\r\n<span class="function_definition">ghost</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\nThis kind of entity is a projected copy generated by cellapp\'s dynamic load \r\nbalancing mechanism which divides a space into N shares and splits the cells\r\nbetween different processes.<br>\r\nSpace is divided into multiple regions. To make the client unable to \r\nperceive the existence of the boundaries between them, we synchronize a \r\ncertain range of entities in each cell\'s boundary to an adjacent cell\'s \r\nboundary. The entity has a part of its data synchronized over \r\n(CELL_PUBLIC, cell broadcast types of attributes) to a ghost entity. In \r\nthis way the entity can interact seamlessly with the other side of the boundary \r\nand both cells simultaneously.\r\n<br><br>\r\nNon-ghost entities are called <a href=#real>real</a> entities.\r\n</div>\r\n\r\n\r\n\r\n<a name="vector3"></a><p class="function_definition">\r\n<span class="function_definition">vector3</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<br><br>\r\n\r\nDescribe and manage 3D space vectors. <br>\r\nThere are three properties of x, y, and z that represent different axial directions. <br><br>\r\n\r\nExample in script: import Math v = Math.Vector3()\r\n</div>\r\n\r\n\r\n\r\n<br></br>\r\n<br></br>\r\n<br></br>\r\n<br></br>\r\n<hr></hr>\r\n\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n\r\n<head>\r\n<title>KBEngine - Base Types</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n\r\n<h1>Basic data types</h1>\r\n<br></br>\r\n<pre>\r\n[Name]\t\t\t[Bytes]\r\n\r\nUINT8\t\t\t1\r\nUINT16\t\t\t2\r\nUINT32\t\t\t4\r\nUINT64\t\t\t8\r\n\r\nINT8\t\t\t1\r\nINT16\t\t\t2\r\nINT32\t\t\t4\r\nINT64\t\t\t8\r\n\r\nFLOAT\t\t\t4\r\nDOUBLE\t\t\t8\r\n\r\nVECTOR2\t\t\t12\r\nVECTOR3\t\t\t16\r\nVECTOR4\t\t\t20\r\n\r\nSTRING\t\t\tN\r\nUNICODE\t\t\tN\r\nPYTHON\t\t\tN\r\nPY_DICT\t\t\tN\r\nPY_TUPLE\t\tN\r\nPY_LIST\t\t\tN\r\nENTITYCALL\t\tN\r\nBLOB\t\t\tN\r\n</pre>\r\n\r\n<br></br>\r\n<br></br>\r\n<br></br>\r\n<br></br>\r\n<hr></hr>\r\n\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine client \u6587\u6863</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Client Plugins</h1>\r\nKBEngine is an open source game server engine that does not include the \r\ncomplete client part, but we provide multiple client plug-ins that can quickly \r\ninterface with the server. Client plug-ins handle communication with \r\nthe server, registering accounts, login interface, provide an Entity base class, and \r\nso on. The plug-in layer and the client UI layer interface with each other to \r\nform a complete game client. \r\nThe plug-in provides the UI layer updated data for display received from \r\nthe server (eg, HP changes, the entities entering the clients View), \r\nand the UI layer provides the plug-in layer with updated data to send back to the \r\nserver based on the clients input (e.g., the position and orientation of the character).\r\n<br>\r\n<br>\r\n\r\nKBEngine implements different client plug-ins under different front-end \r\ntechnologies, but each plug-in follows the methods and attributes listed \r\nin this section of the API documentation. All plug-ins follow the same implementation standard \r\noutlined here in the "Client Plugins" section of the documentation.\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine client \u6587\u6863</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>KBEngine module</h1>\r\nThis <a href="KBEngine.html">KBEngine</a> module provides a part of the \r\nlogic script layer access to <a href="../Classes/Entity.html">entity</a>, \r\nas well as current space data and so on.\r\n<h2><a href="#" onClick="obj=document.getElementById( \'classes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Class</a></h2>\r\n<table id="classes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="class_list"><a href="../Classes/Entity.html" class="class_list" >Entity</a></span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member function</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#login" class="function_list" >login</a>( username, password ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createAccount" class="function_list" >createAccount</a>( username, password ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#reloginBaseapp" class="function_list" >reloginBaseapp</a>():</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#player" class="function_list" >player</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#resetPassword" class="function_list" >resetPassword</a>(username):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#bindAccountEmail" class="function_list" >bindAccountEmail</a>( emailaddress ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#newPassword" class="function_list" >newPassword</a>( oldpassword, newpassword ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#findEntity" class="function_list" >findEntity</a>( entityID ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getSpaceData" class="function_list" >getSpaceData</a>( key ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callback</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><a href="#component" class="attribute_list" >component</a></td><td> Read only <a href="STRING.html">string</a></td></tr>\r\n\r\n<tr valign=top><td><a href="#entities" class="attribute_list" >entities</a></td><td> <a href="Entities.html">Entities</a>\r\n\r\n<tr valign=top><td><a href="#entity_uuid" class="attribute_list" >entity_uuid</a></td><td> uint64\r\n\r\n<tr valign=top><td><a href="#entity_id" class="attribute_list" >entity_id</a></td><td> int32\r\n\r\n<tr valign=top><td><a href="#spaceID" class="attribute_list" >spaceID</a></td><td> int32\r\n\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="login"></a><p class="function_definition">\r\n<span class="function_definition">def login( <i>username, password </i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nLogin account to KBEngine server.<br>\r\nNote: If the plug-in and the UI layer use event interaction mode, do \r\nnot call directly from the UI layer. Please trigger a "login" event to the \r\nplug-in. The event is accompanied by the data username and password.\r\n<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameter</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>username</i></span></td><td><span class="function_parameter_description">\r\nstring, username.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>password</i></span></td><td><span class="function_parameter_description">\r\nstring, password.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="createAccount"></a><p class="function_definition">\r\n<span class="function_definition">def createAccount( <i>username, password </i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description</b><br><br>\r\nRequest to create a login account on the KBEngine server.\r\n<br>\r\nNote: If the plug-in and the UI layer use the event interaction mode, \r\ndo not call directly from the UI layer. Please trigger a "createAccount" \r\nevent to the plug-in. The event is accompanied by the data username and \r\npassword.\r\n<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>username</i></span></td><td><span class="function_parameter_description">\r\nstring, username.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>password</i></span></td><td><span class="function_parameter_description">\r\nstring, password.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="reloginBaseapp"></a><p class="function_definition">\r\n<span class="function_definition">def reloginBaseapp( <i> </i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description</b><br><br>\r\nRequests to re-login to the KBEngine server (usually used after a dropped \r\nconnection in order to connect to the server more quickly and continue to \r\ncontrol the server role).<br>\r\nNote: If the plug-in and the UI layer use event interaction mode, do \r\nnot call directly from the UI layer, please trigger a "reloginBaseapp" \r\nevent to the plug-in, and the incidental data is empty.\r\n<br>\r\n</div>\r\n\r\n\r\n\r\n<a name="player"></a><p class="function_definition">\r\n<span class="function_definition">def player( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description</b><br><br>\r\nGets the entity that the current client controls.<br>\r\n<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">return:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\n<a href=../../keywords.html#entity>Entity</a>, return controlled entity, \r\nif it does not exist (e.g.: failed to connect to the server) returns null.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="resetPassword"></a><p class="function_definition">\r\n<span class="function_definition">def resetPassword( <i>username</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description</b><br><br>\r\nAsks loginapp to reset the password of the account. The server will send \r\na password reset email (usually the forgotten password function) to the \r\nemail address to which the account is bound.<br>\r\n<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>username</i></span></td><td><span class="function_parameter_description">\r\nstring, username.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="bindAccountEmail"></a><p class="function_definition">\r\n<span class="function_definition">def bindAccountEmail( <i>emailaddress</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description</b><br><br>\r\nRequests Baseapp to bind the email address of the account.<br>\r\n<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>emailaddress</i></span></td><td><span class="function_parameter_description">\r\nstring, email address.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="newPassword"></a><p class="function_definition">\r\n<span class="function_definition">def newPassword( <i>oldpassword, newpassword</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description</b><br><br>\r\nRequests to set a new password for the account.<br>\r\n<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>oldpassword</i></span></td><td><span class="function_parameter_description">\r\nstring, old password\r\n</span></td></tr>\r\n<tr valign=top><td><span class="function_parameter_name"><i>newpassword</i></span></td><td><span class="function_parameter_description">\r\nstring, new password\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="findEntity"></a><p class="function_definition">\r\n<span class="function_definition">def findEntity( <i>entityID </i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description</b><br><br>\r\nFinds an instance object of an entity by its ID.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityID</i></span></td><td><span class="function_parameter_description">\r\nint32, entity ID.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\n<a href=../../keywords.html#entity>Entity</a> An entity instance is returned.\r\nThere can be no return null.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getSpaceData"></a><p class="function_definition">\r\n<span class="function_definition">def getSpaceData( <i>key </i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description</b><br><br>\r\nGets the space data for the specified key.\r\n<br>\r\nThe space data is set by the user on the server through \r\n<a href=../../cellapp/Modules/KBEngine.html#setSpaceData>setSpaceData</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nstring, a keyword\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nstring, specifies the value at the key\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<hr>\r\n<h2>Callback function documentation</h2>\r\n</table>\r\n</p>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<hr>\r\n<h2>Attributes documentation</h2>\r\n\r\n<a name="component"></a><p class="attribute_definition">\r\n<span class="attribute_definition">component</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis is the component that is running in the current scripting environment. \r\n(So far) Possible values are \'cell\', \'base\', \'client\', \'database\', \'bot\' \r\nand \'editor\'.\r\n</div>\r\n\r\n<a name="entities"></a><p class="attribute_definition">\r\n<span class="attribute_definition">entities</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nentities is a dictionary object that contains all the entities in the current process.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href="../Classes/Entity.html">Entities</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="entity_uuid"></a><p class="attribute_definition">\r\n<span class="attribute_definition">entity_uuid</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe uuid of the entity. Change the ID and entity to bind to this login. \r\nWhen using the heavy login function, the server compares this ID and \r\ndetermines the validity.\r\n</div>\r\n\r\n\r\n<a name="entity_id"></a><p class="attribute_definition">\r\n<span class="attribute_definition">entity_id</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe ID of the entity controlled by the current client.\r\n</div>\r\n\r\n\r\n<a name="spaceID"></a><p class="attribute_definition">\r\n<span class="attribute_definition">spaceID</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe ID of the <a href=../../keywords.html#Space>Space</a> where the \r\nentity controlled by the current client is located (also can be understood \r\nas the corresponding scene, room, and copy).\r\n</div>\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>Entity - KBEngine client</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Entity class</h1>\r\n\r\n<p style="text-align: center;"><span class="module_h1">[\r\n<a href="../Modules/KBEngine.html" class="module_h1">KBEngine module</a>]</span></p>\r\n\r\n<p>Entity is part of the <a href="../Modules/KBEngine.html">KBEngine</a> \r\nmodule. <a href="#detailed_description">More...</a></p><p></p>\r\n<pre>import KBEngine</pre>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#baseCall" class="function_list" >baseCall</a>( self, methodName, methodArgs ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#cellCall" class="function_list" >cellCall</a>( self, methodName, methodArgs ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callbacks</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onDestroy" class="function_list" >onDestroy</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onEnterWorld" class="function_list" >onEnterWorld</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLeaveWorld" class="function_list" >onLeaveWorld</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onEnterSpace" class="function_list" >onEnterSpace</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLeaveSpace" class="function_list" >onLeaveSpace</a>( self ):</span>\r\n</td></tr>\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><a href="#direction" class="attribute_list" >direction</a></td><td> Tuple of 3 floats as (roll, pitch, yaw)\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#id" class="attribute_list" >id</a></td><td> Read-only Integer\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#position" class="attribute_list" >position</a></td><td> <a href=../../keywords.html#vector3>Vector3</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#spaceID" class="attribute_list" >spaceID</a></td><td> Read-only uint32\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#isOnGround" class="attribute_list" >isOnGround</a></td><td> Read-only bool\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#inWorld" class="attribute_list" >inWorld</a></td><td> Read-only bool\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#className" class="attribute_list" >className</a></td><td> Read-only string\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<hr>\r\n<a name="detailed_description"></a><h2>A detailed description</h2>\r\nInstances of class <a href=../../keywords.html#entity>Entity</a> represent \r\ngame objects on the client.\r\n<br><br>\r\n\r\n<br><br>\r\nAn <a href=../../keywords.html#entity>Entity</a> can call methods on its equivalent \r\nentity in the base and cell applications via <a href=../../keywords.html#EntityCall>ENTITYCALL</a>.\r\nThis requires a set of remotely-invoked functions (specified in the entity\'s .def file). \r\nIt also works the other way around, and a Client can have its functions remotely invoked \r\nby the entity\'s base and cell parts (must be specified in the <ClientMethods> section of the entity\'s .def file).\r\n<br><br>\r\n\r\nClient entities can have <a href=../../keywords.html#cell>cell</a> attribute changes broadcast to them by using \r\nany of the *_CLIENT* broadcast flags on properties in the entity\'s def file on the server side. \r\nIf a property is set to be broadcast, set_<property>() is called \r\non the client entity when a <a href=../../keywords.html#cell>cell</a> attribute is changed. \r\nSee <a href=http://kbengine.org/docs/programming/entitydef.html>http://kbengine.org/docs/programming/entitydef.html</a> \r\nfor more info.\r\n\r\n<hr>\r\n<h2>Member function documentation</h2>\r\n\r\n<a name="baseCall"></a><p class="function_definition">\r\n<span class="function_definition">def baseCall( <i>self, methodName, methodArgs</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe method to call the base part of the entity.<br>\r\nNote: the entity must have a base part on the server side. Only client \r\nentities controlled by the client can access this method.\r\n<br><br>\r\n\r\nExample:<br>\r\njs plugin: entity.baseCall("reqCreateAvatar", roleType, name);<br>\r\nc# plugin: entity.baseCall("reqCreateAvatar", new object[]{roleType, name});\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>methodName</i></span></td><td><span class="function_parameter_description">\r\nstring, method name.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>methodArgs</i></span></td><td><span class="function_parameter_description">\r\nobjects, method parameter list.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">return:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nBecause it is a remote call, it is not possible to block waiting for a \r\nreturn, so there is no return value.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="cellCall"></a><p class="function_definition">\r\n<span class="function_definition">def cellCall( <i>self, methodName, methodArgs</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe method to call the cell part of this entity.<br>\r\nNote: The entity must have a cell part on the server. Only client entities \r\ncontrolled by the client can access this method.\r\n<br><br>\r\n\r\nExample:<br>\r\njs plugin: entity.cellCall("xxx", roleType, name);<br>\r\nc# plugin: entity.cellCall("xxx", new object[]{roleType, name});\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>methodName</i></span></td><td><span class="function_parameter_description">\r\nstring, method name.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>methodArgs</i></span></td><td><span class="function_parameter_description">\r\nobjects, method parameter list.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">return:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\n\tBecause it is a remote call, it is not possible to block waiting for a \r\n\treturn, so there is no return value.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback function documentation</h2>\r\n\r\n\r\n<a name="onDestroy"></a><p class="function_definition">\r\n<span class="function_definition">def onDestroy( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">Called when the entity is destroyed\r\n</div>\r\n\r\n\r\n<a name="onEnterWorld"></a><p class="function_definition">\r\n<span class="function_definition">def onEnterWorld( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n\tIf the entity is not client-controlled, it indicates that the \r\n\tentity has entered the view scope of the client-controlled entity on the \r\n\tserver, at which point the client can see the entity. <br>\r\n\tIf the entity is client controlled, it indicates that the entity \r\n\thas created a cell on the server and entered the Space.\r\n</div>\r\n\r\n\r\n\r\n<a name="onLeaveWorld"></a><p class="function_definition">\r\n<span class="function_definition">def onLeaveWorld( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n\tIf the entity is not client-controlled, it indicates that the entity has \r\n\tleft the view scope of the client-controlled entity on the server side, \r\n\tand the client cannot see this entity at this time.<br>\r\n\tIf the entity is client controlled, it indicates that the entity has \r\n\talready destroyed the cell on the server and left the Space.\r\n</div>\r\n\r\n\r\n\r\n<a name="onEnterSpace"></a><p class="function_definition">\r\n<span class="function_definition">def onEnterSpace( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n\tThe client-controlled entity enters a new space.\r\n</div>\r\n\r\n\r\n\r\n<a name="onLeaveSpace"></a><p class="function_definition">\r\n<span class="function_definition">def onLeaveSpace( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n\tThe client-controlled entity leaves the current space.\r\n</div>\r\n\r\n\r\n\r\n<hr>\r\n<h2>Attribute documentation</h2>\r\n\r\n<a name="className"></a><p class="attribute_definition">\r\n<span class="attribute_definition">className</span>\r\n</p>\r\n\r\n<div class="attribute_description">The class name of the entity.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, string\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="position"></a><p class="attribute_definition">\r\n<span class="attribute_definition">position</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n\tThe coordinates (x,y,z) of this entity in world space.\r\n\tThe data is synchronized from the server to the client.\r\n\t<br><br>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#vector3>Vector3</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="direction"></a><p class="attribute_definition">\r\n<span class="attribute_definition">direction</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n\tThis attribute describes the orientation of the <a href=../../keywords.html#entity>Entity</a> \r\n\tin world space. Data is synchronized from the server to the client.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Vector3, which contains (roll, pitch, yaw) in radians.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="isOnGround"></a><p class="attribute_definition">\r\n<span class="attribute_definition">isOnGround</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n\tIf the value of this attribute is True, the <a href=../../keywords.html#entity>Entity</a>\r\n\tis on the ground, otherwise it is False.<br>\r\n\tIf it is a client-controlled entity, this attribute will be synchronized \r\n\tto the server when changed, and other entities will be synchronized \r\n\tto the client by the server. The client can determine this value to \r\n\tavoid the overhead of accuracy.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-write, bool\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine cellapp</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Cellapp process</h1>\r\nThe Cellapp process is primarily responsible for space-related game \r\nlogic, providing players on different baseapps a real-time interaction \r\nin one space. The Cellapp can usually implement scene-related logic such \r\nas NPCs/monsters, battles, and checkpoint rooms.\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine cell</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>KBEngine module</h1>\r\nThis <a href="KBEngine.html">KBEngine</a> module provides \r\nthe Python script access to the <a href="../Classes/Entity.html">entity</a>\'s \r\ncell part, in particular it provides the registration and removal of timers, \r\nas well as the creation of <a href="../Classes/Entity.html">entities</a>.\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'classes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Classes</a></h2>\r\n<table id="classes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="class_list"><a href="../Classes/Entity.html" class="class_list" >Entity</a></span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addSpaceGeometryMapping" class="function_list" >addSpaceGeometryMapping</a>( spaceID, mapper, path, shouldLoadOnServer, params ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addWatcher" class="function_list" >addWatcher</a>( path, dataType, getFunction ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#address" class="function_list" >address</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#MemoryStream" class="function_list" >MemoryStream</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createEntity" class="function_list" >createEntity</a>( entityType, spaceID, position, direction, params ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#debugTracing" class="function_list" >debugTracing</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#delSpaceData" class="function_list" >delSpaceData</a>( spaceID, key ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#delWatcher" class="function_list" >delWatcher</a>( path ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#deregisterReadFileDescriptor" class="function_list" >deregisterReadFileDescriptor</a>( fileDescriptor ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#deregisterWriteFileDescriptor" class="function_list" >deregisterWriteFileDescriptor</a>( fileDescriptor ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#executeRawDatabaseCommand" class="function_list" >executeRawDatabaseCommand</a>( command, callback, threadID, dbInterfaceName ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#genUUID64" class="function_list" >genUUID64</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getResFullPath" class="function_list" >getResFullPath</a>( res ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getSpaceData" class="function_list" >getSpaceData</a>( spaceID, key ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getSpaceGeometryMapping" class="function_list" >getSpaceGeometryMapping</a>( spaceID ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getWatcher" class="function_list" >getWatcher</a>( path ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getWatcherDir" class="function_list" >getWatcherDir</a>( path ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getAppFlags" class="function_list" >getAppFlags</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#hasRes" class="function_list" >hasRes</a>( res ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#isShuttingDown" class="function_list" >isShuttingDown</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#listPathRes" class="function_list" >listPathRes</a>( path, extension ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#matchPath" class="function_list" >matchPath</a>( res ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#open" class="function_list" >open</a>( res, mode ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#publish" class="function_list" >publish</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#registerReadFileDescriptor" class="function_list" >registerReadFileDescriptor</a>( fileDescriptor, callback ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#registerWriteFileDescriptor" class="function_list" >registerWriteFileDescriptor</a>( fileDescriptor, callback ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#raycast" class="function_list" >raycast</a>( spaceID, layer, src, dst ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#reloadScript" class="function_list" >reloadScript</a>( fullReload ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#scriptLogType" class="function_list" >scriptLogType</a>( logType ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#setAppFlags" class="function_list" >setAppFlags</a>( flags ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#setSpaceData" class="function_list" >setSpaceData</a>( spaceID, key, value ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#time" class="function_list" >time</a>( ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callback</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onCellAppData" class="function_list" >onCellAppData</a>( key, value ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onCellAppDataDel" class="function_list" >onCellAppDataDel</a>( key ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onGlobalData" class="function_list" >onGlobalData</a>( key, value ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onGlobalDataDel" class="function_list" >onGlobalDataDel</a>( key ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onInit" class="function_list" >onInit</a>( isReload ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onSpaceData" class="function_list" >onSpaceData</a>( spaceID, key, value ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onSpaceGeometryLoaded" class="function_list" >onSpaceGeometryLoaded</a>( spaceID, mapping ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onAllSpaceGeometryLoaded" class="function_list" >onAllSpaceGeometryLoaded</a>( spaceID, isBootstrap, mapping ):</span>\r\n</td></tr>\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_DBG" class="attribute_list" >LOG_TYPE_DBG</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_ERR" class="attribute_list" >LOG_TYPE_ERR</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_INFO" class="attribute_list" >LOG_TYPE_INFO</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_NORMAL" class="attribute_list" >LOG_TYPE_NORMAL</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_WAR" class="attribute_list" >LOG_TYPE_WAR</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#NEXT_ONLY" class="attribute_list" >NEXT_ONLY</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#cellAppData" class="attribute_list" >cellAppData</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#component" class="attribute_list" >component</a></td><td> Read-only <a href="STRING.html">string</a></td></tr>\r\n\r\n<tr valign=top><td><a href="#entities" class="attribute_list" >entities</a></td><td> <a href="Entities.html">Entities</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#globalData" class="attribute_list" >globalData</a></td><td> GlobalDataClient</td></tr>\r\n\r\n</table>\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="addSpaceGeometryMapping"></a><p class="function_definition">\r\n<span class="function_definition">def addSpaceGeometryMapping( <i>spaceID, mapper, path, shouldLoadOnServer, params</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nAssociate a geometric mapping of a given space. After the function is \r\ncalled, the server and client will load the corresponding geometry data.<br>\r\n<br><br>\r\nOn the server, all geometry data is loaded from the given directory into \r\nthe specified space. These data may be divided into many blocks. Different \r\nblocks are loaded asynchronously. The following callback methods are \r\ncalled when all the geometry data is loaded:\r\n<pre>\tdef onAllSpaceGeometryLoaded( self, spaceID, mappingName ):\r\n</pre>\r\n<br>\r\n\r\nThe server only loads the geometric data of the scene for use by the \r\nnavigation and collision functions. In addition to the geometric data, \r\nthe client also loads data such as textures.\r\n<br>\r\n3D scenes currently use the data exported by the recastnavigation \r\nplugin-in by default. 2D scenes currently use the data exported by \r\nMapEditor by default.\r\n\r\n<br><br>\r\nThere is a possibility that onAllSpaceGeometryLoaded() will not be \r\ninvoked, that is, if multiple Cellapps call this method at the same time \r\nto add geometry to the same space, cellappmgr crashes.\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nuint32, ID of the space, specifies in which space to operate\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>mapper</i></span></td><td><span class="function_parameter_description">\r\nNot yet implemented\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nDirectory path containing geometry data\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>shouldLoadOnServer</i></span></td><td><span class="function_parameter_description">\r\nOptional boolean parameter that specifies whether to load geometry on \r\nthe server. Default is True.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>params</i></span></td><td><span class="function_parameter_description">\r\nOptional PyDict parameter, specifies the navmesh used by different layers, for example:<br>\r\nKBEngine.addSpaceGeometryMapping(self.spaceID, None, resPath, True, {0 : "srv_xinshoucun_1.navmesh", 1 : "srv_xinshoucun.navmesh"})\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="addWatcher"></a><p class="function_definition">\r\n<span class="function_definition">def addWatcher( <i>path, dataType, getFunction</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nInteracts with the debug monitoring system to allow users to register \r\na monitoring variable with the monitoring system.\r\n<br><br>\r\nExample:\r\n<br>\r\n\r\n<pre>\r\n>>> def countPlayers( ):\r\n>>> i = 0\r\n>>> for e in KBEngine.entities.values():\r\n>>> \tif e.__class__.__name__ == "Avatar":\r\n>>> \t\ti += 1\r\n>>> return i\r\n>>>\r\n>>> <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#addWatcher>addWatcher</a>( "players", "UINT32", countPlayers )\r\n</pre>\r\n<br><br>\r\nThis function adds a watch variable under the "scripts/players" watch path. \r\nThe function countPlayers is called when the watcher observes a change.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nThe path to create a watcher.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dataType</i></span></td><td><span class="function_parameter_description">\r\nThe value type of the monitored variable. Reference: <a href=../../basetypes.html>Basic data types</a>\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>getFunction</i></span></td><td><span class="function_parameter_description">\r\nThis function is called when the observer retrieves the variable.\r\nThis function returns a value representing a watch variable without arguments.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="address"></a><p class="function_definition">\r\n<span class="function_definition">def address( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReturns the address of the internal network interface.\r\n</div>\r\n\r\n\r\n<a name="MemoryStream"></a><p class="function_definition">\r\n<span class="function_definition">def MemoryStream( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReturn a new MemoryStream object.<br>\r\n<br>\r\nThe MemoryStream object stores binary information. This type is provided \r\nto allow the user to easily serialize and deserialize the Python base types \r\nfollowing the same KBEngine underlying serialization rules.<br>\r\n<br><br>\r\nFor example, you can use this object to construct a network packet that \r\nKBEngine can parse.\r\n<br><br>\r\nUsage:\r\n<pre>\r\n>>> s = KBEngine.MemoryStream()\r\n>>> s\r\n>>> b\'\'\r\n>>> s.append("UINT32", 1)\r\n>>> s.pop("UINT32")\r\n>>> 1\r\n</pre>\r\n<br><br>\r\nThe types that MemoryStream currently supports are only basic data types. \r\nReference: <a href=../../basetypes.html>Basic data types</a>\r\n</div>\r\n\r\n\r\n<a name="createEntity"></a><p class="function_definition">\r\n<span class="function_definition">def createEntity( <i>entityType, spaceID, position, direction, params</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\ncreateEntity creates a new entity in the specified space of the current \r\nprocess.\r\n<br>\r\nWhen calling this function you must specifiy the type, location, and direction \r\nof the entity to be created. Optionally, any attribute of the entity can \r\nbe set with the params Python dictionary parameter. (the attributes are described in the entity\'s .def file).\r\n<br><br>\r\nExample:\r\n\r\n<pre># Create an open Door entity in the same space as the "thing" entity\r\ndirection = ( 0, 0, thing.yaw )\r\nproperties = { "open":1 }\r\n<a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#createEntity>createEntity</a>( "Door", thing.space, thing.position, direction,\r\n properties )\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, the name of the entity to create, declared in the <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>\r\nfile.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nint32, the ID of the space to place the entity\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>position</i></span></td><td><span class="function_parameter_description">\r\nA sequence of 3 floats that specify the creation point of the new entity, \r\nin world coordinates.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>direction</i></span></td><td><span class="function_parameter_description">\r\nA sequence of 3 floats that specify the initial orientation (roll, pitch, yaw) \r\nof the new entity in world coordinates.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>params</i></span></td><td><span class="function_parameter_description">\r\nOptional parameters, a Python dictionary object. If a specified key is \r\nan <a href="../Classes/Entity.html">Entity</a> attribute, its value will \r\nbe used to initialize the properties of the new <a href="../Classes/Entity.html">Entity</a>.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe new <a href="../../keywords.html#cn_entity">Entity</a>.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="debugTracing"></a><p class="function_definition">\r\n<span class="function_definition">def debugTracing( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nOutputs the Python extension object counter that outputs KBEngine trace.<br>\r\nExtended objects include: fixed dictionary, fixed array, Entity, EntityCall...<br>\r\nIf the counter is not zero when the server is shut down normally, it means \r\nthat the leak already exists and the log will output an error message.<br><br>\r\nERROR cellapp [0x0000cd64] [2014-11-12 00:38:07,300] - PyGC::debugTracing(): FixedArray : leaked(128)<br>\r\nERROR cellapp [0x0000cd64] [2014-11-12 00:38:07,300] - PyGC::debugTracing(): EntityCall : leaked(8)\r\n</div>\r\n\r\n\r\n<a name="delSpaceData"></a><p class="function_definition">\r\n<span class="function_definition">def delSpaceData( <i>spaceID, key </i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nDeletes the space data of the specified key (if space is divided into \r\nmultiple parts, it will be deleted synchronously).\r\n<br>\r\nThe space data is set by the user via <a href=#setSpaceData>setSpaceData</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nint32, the ID of the space\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nstring, a string keyword\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="delWatcher"></a><p class="function_definition">\r\n<span class="function_definition">def delWatcher( <i>path</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nInteracts with the debug monitoring system, allowing users to delete \r\nwatcher variables in the script.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nThe path of the variable to delete.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="deregisterReadFileDescriptor"></a><p class="function_definition">\r\n<span class="function_definition">def deregisterReadFileDescriptor( <i>fileDescriptor</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nDeregisters the callback registered with <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#registerReadFileDescriptor>registerReadFileDescriptor</a>.\r\n<br>\r\n<br>\r\nExample:<br>\r\n<a href=http://www.kbengine.org/assets/other/py/Poller.py>http://www.kbengine.org/assets/other/py/Poller.py</a>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fileDescriptor</i></span></td><td><span class="function_parameter_description">\r\nSocket descriptor/file descriptor\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="deregisterWriteFileDescriptor"></a><p class="function_definition">\r\n<span class="function_definition">def deregisterWriteFileDescriptor( <i>fileDescriptor</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nDeregisters the callback registered with <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#registerWriteFileDescriptor>registerWriteFileDescriptor</a>.\r\n<br>\r\n<br>\r\nExample:<br>\r\n<a href=http://www.kbengine.org/assets/other/py/Poller.py>http://www.kbengine.org/assets/other/py/Poller.py</a>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fileDescriptor</i></span></td><td><span class="function_parameter_description">\r\nSocket descriptor/file descriptor\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="executeRawDatabaseCommand"></a><p class="function_definition">\r\n<span class="function_definition">def executeRawDatabaseCommand( <i>command, callback, threadID, dbInterfaceName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis script function executes a database command on the database, \r\nwhich will be directly parsed by the relevant database.\r\n<br><br>\r\nPlease note that using this function to modify the entity data may not \r\nbe effective because if the entity has been checked out, the modified \r\nentity data will still be archived by the entity and cause overwriting.<br>\r\n\r\nThis function is strongly not recommended for reading or modifying entity data.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>command</i></span></td><td><span class="function_parameter_description">\r\nThis database command will be different for different database configurations. \r\nFor MySQL databases it will be an SQL query statement.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><p class="function_parameter_description">\r\n Optional parameter, callbacks object (for example, a function) with the \r\n command\'s execution result. This callback has 4 parameters: result set, \r\n number of rows affected, auto value, and error message.<br>\r\n Example:<br>\r\n def sqlcallback(result, rows, insertid, error):<br>\r\n print(result, rows, insertid, error) <br>\r\n <br>\r\n \r\nAs the above example shows, the result parameter corresponds to the \r\n"result set", and the result set parameter is a row. List. Each line is \r\na list of strings containing field values.<br>\r\nThe command execution does not return a result set (for example, a DELETE \r\ncommand), or the result set is None if the command execution has an error. \r\n<br><br>\r\nThe rows parameter is the "number of rows affected", which is an integer \r\nindicating the number of rows affected by the command execution. This \r\nparameter is only relevant for commands that do not return results (such as DELETE). <br>\r\nThis parameter is None if there is a result set return or if there is an error in the command execution.\r\n<br><br>\r\nThe insertid corresponds to a "long value", similar to the entity\'s \r\ndatabaseID. When successfully inserting data into a table with an auto \r\nlong type field, it returns the data at the time of insertion. Assigned \r\nvalue. <br>\r\nMore information can be found in mysql\'s mysql_insert_id() method.\r\nIn addition, this parameter is only meaningful when the database type is \r\nmysql. \r\n<br><br>\r\nerror corresponds to the "error message", when the command execution error, \r\nthis parameter is a string describing the error. This parameter is None \r\nwhen the command execution has not occurred.\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>threadID</i></span></td><td><span class="function_parameter_description">\r\nint32, optional parameter, specifies a thread to process this command. \r\nUsers can use this parameter to control the execution order of certain \r\ncommands (dbmgr is multi-threaded). The default is not specified. If \r\nthreadID is the ID of the entity, it will be added to the entity\'s archive \r\nqueue and written by the thread one by one.<br>\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbInterfaceName</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, specified by a database interface, defaults \r\nto "default" interface. The database interface is defined by \r\nkbengine_defaults.xml->dbmgr->databaseInterfaces.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="genUUID64"></a><p class="function_definition">\r\n<span class="function_definition">def genUUID64( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function generates a 64-bit unique ID.<br>\r\nNote: This function is dependent on the \'gus\' startup argument of the \r\nCellapp service process. Please set the startup arguments to be unique.<br>\r\nIn addition, if gus exceeds 65535, this function can only remain unique \r\non the current process.\r\n<br>\r\n<br>\r\nUsage<br>\r\nA unique item ID is generated on multiple service processes and there is \r\nno conflict when combined.<br>\r\nA room ID is generated on multiple service processes and no uniqueness \r\nverification is required.<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\n64-bit integer\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="getResFullPath"></a><p class="function_definition">\r\n<span class="function_definition">def getResFullPath( <i>res</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet the absolute path of the resource.<br>\r\nNote: Resoures must be accessible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, if there is an absolute path to return the resource, otherwise it returns null.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nstring, the absolute path to the resource.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getSpaceData"></a><p class="function_definition">\r\n<span class="function_definition">def getSpaceData( <i>spaceID, key </i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet the space data of the specified key.\r\n<br>\r\nThe space data is set by the user via <a href=#setSpaceData>setSpaceData</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nint32, the ID of the space\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nstring, a string keyword\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nstring, string data for the given key\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="getSpaceGeometryMapping"></a><p class="function_definition">\r\n<span class="function_definition">def getSpaceGeometryMapping( <i>spaceID</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReturns the geometry map name of a specified space.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nThe ID of the space to be queried\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nstring, the name of the geometry map.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="getWatcher"></a><p class="function_definition">\r\n<span class="function_definition">def getWatcher( <i>path</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGets the value of a watch variable from the KBEngine debug system.\r\n<br>\r\n<br>\r\nExample: In the baseapp1 Python console, enter:<br>\r\n>>>KBEngine.getWatcher("/root/stats/runningTime")\r\n<br>\r\n12673648533\r\n<br>\r\n<br>\r\n>>>KBEngine.getWatcher("/root/scripts/players")\r\n<br>\r\n32133\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nstring, the absolute path of the variable including the variable name \r\n(can be viewed on the GUIConsole watcher page).\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe value of the variable.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="getWatcherDir"></a><p class="function_definition">\r\n<span class="function_definition">def getWatcherDir( <i>path</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet a list of elements (directories, variable names) under the watch \r\ndirectory from the KBEngine debugging system.\r\n<br>\r\n<br>\r\nExample: In baseapp1 Python console, enter:<br>\r\n>>>KBEngine.getWatcher("/root")\r\n<br>\r\n(\'stats\', \'objectPools\', \'network\', \'syspaths\', \'ThreadPool\', \'cprofiles\', \'scripts\', \'numProxices\', \'componentID\', \'componentType\', \'uid\', \'numClients\', \'globalOrder\', \'username\', \'load\', \'gametime\', \'entitiesSize\', \'groupOrder\')\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nstring, the absolute path of the variable including the variable name \r\n(can be viewed on the GUIConsole watcher page).\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe list of elements (directory, variable name) under the Watch directory.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getAppFlags"></a><p class="function_definition">\r\n<span class="function_definition">def getAppFlags( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet the flags of the current engine APP, Reference:<a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#setAppFlags>setAppFlags</a>\u3002\r\n<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nKBEngine.APP_FLAGS_*\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="hasRes"></a><p class="function_definition">\r\n<span class="function_definition">def hasRes( <i>res</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nUse this interface to determine if a relative path exists.<br>\r\nNote: Resources must be accessible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n<br>\r\n<br>\r\nExample:\r\n<br>\r\n<br>\r\n>>>KBEngine.hasRes("<a href=../../keywords.html#entities.xml>scripts/entities.xml</a>")\r\n<br>\r\nTrue\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, the relative path of the resource\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nBOOL, if it exists return True, otherwise False.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="isShuttingDown"></a><p class="function_definition">\r\n<span class="function_definition">def isShuttingDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReturns whether the server is shutting down. After the onBaseAppShuttingDown \r\ncallback function is called, this function returns True.\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nBOOL, if the server is shutting down True, otherwise False.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="listPathRes"></a><p class="function_definition">\r\n<span class="function_definition">def listPathRes( <i>path, extension</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet a list of resources in a resource directory<br>\r\nNote: Resources must be accesible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n<br>\r\n<br>\r\nExample:\r\n<br>\r\n<br>\r\n>>>KBEngine.listPathRes("scripts/cell/interfaces")\r\n<br>\r\n(\'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/AI.py\', \'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/New Text Document.txt\')\r\n<br><br>\r\n>>>KBEngine.listPathRes("scripts/cell/interfaces", "txt")\r\n<br>\r\n(\'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/New Text Document.txt\')\r\n<br><br>\r\n>>>KBEngine.listPathRes("scripts/cell/interfaces", "txt|py")\r\n<br>\r\n(\'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/AI.py\', \'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/New Text Document.txt\')\r\n<br><br>\r\n>>>KBEngine.listPathRes("scripts/cell/interfaces", ("txt", "py"))\r\n<br>\r\n(\'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/AI.py\', \'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/New Text Document.txt\')\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, the relative path of the resource.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>extension</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, file extension.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nTuple, resource list.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="matchPath"></a><p class="function_definition">\r\n<span class="function_definition">def matchPath( <i>res</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nUse the relative path of the resource to get its absolute path.<br>\r\nNote: Resources must be accessible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n<br>\r\n<br>\r\nExample:\r\n<br>\r\n<br>\r\n>>>KBEngine.matchPath("scripts/entities.xml")<br>\r\n\'/home/kbe/kbengine/demo/res/scripts/entities.xml\'\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, the relative path to the resource (including the resource name)\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nstring, the absolute path of the resource.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="open"></a><p class="function_definition">\r\n<span class="function_definition">def open( <i>res, mode</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nUse this interface to open resources using relative paths.\r\nNote: Resources must be accessible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, the relative path of the resource.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>mode</i></span></td><td><span class="function_parameter_description">\r\nstring, file operation mode:<br>\r\nw Open in write mode, <br>\r\na Open in append mode (Start from EOF, create new file if necessary) <br>\r\nr+ Open <br>\r\nw+ in read/write mode Open in read/write mode (see w) <br>\r\na+ Open in read/write mode (See a) <br>\r\nrb Opens <br>\r\nwb in binary read mode Opens in binary write mode (see w) <br>\r\nab Opens in binary append mode (see a) <br>\r\nrb+ Opens in binary read and write mode (see r+) <br>\r\nwb+ Opens in binary read and write mode (see w+ ) <br>\r\nab+ Open in binary read/write mode (see a+)\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="publish"></a><p class="function_definition">\r\n<span class="function_definition">def publish( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis interface returns the current server release mode.\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nint8, 0: debug, 1: release, others can be customized.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="raycast"></a><p class="function_definition">\r\n<span class="function_definition">def raycast( <i>spaceID, layer, src, dst</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIn the specified layer of the specified space, a ray is emitted from the \r\nsource coordinates to the destination coordinates, and the collided \r\ncoordinate point is returned.\r\n<br><br>\r\nNote: Space must load geometry using <a href=#addSpaceGeometryMapping>addSpaceGeometryMapping</a>.\r\n<br><br>\r\nBelow is an example:\r\n<br><br>\r\n\r\n<pre>\t>>> KBEngine.raycast( spaceID, entity.layer, (0, 10, 0), (0,-10,0) )\r\n\t((0.0000, 0.0000, 0.0000), ( (0.0000, 0.0000, 0.0000),\r\n\t(4.0000, 0.0000, 0.0000), (4.0000, 0.0000, 4.0000)), 0)\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nint32, space ID\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>layer</i></span></td><td><span class="function_parameter_description">\r\nint8, geometric layer. A space can load multiple navmesh data at the \r\nsame time. Different navmesh can be in different layers. Different \r\nlayers can be abstracted into the ground, the water surface and so on.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>list, list of coordinate points collided\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="registerReadFileDescriptor"></a><p class="function_definition">\r\n<span class="function_definition">def registerReadFileDescriptor( <i>fileDescriptor, callback</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegisters a callback function that is called when the file descriptor is readable.\r\n<br>\r\n<br>\r\nExample:<br>\r\n<a href=http://www.kbengine.org/assets/other/py/Poller.py>http://www.kbengine.org/assets/other/py/Poller.py</a>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fileDescriptor</i></span></td><td><span class="function_parameter_description">\r\nSocket descriptor/file descriptor\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nA callback function with the socket descriptor/file descriptor as its only \r\nparameter.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="registerWriteFileDescriptor"></a><p class="function_definition">\r\n<span class="function_definition">\r\ndef registerWriteFileDescriptor( <i>fileDescriptor, callback</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegisters a callback function that is called when the socket descriptor/file descriptor is writable. \r\n<br>\r\n<br>\r\nExample:<br>\r\n<a href=http://www.kbengine.org/assets/other/py/Poller.py>http://www.kbengine.org/assets/other/py/Poller.py</a>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fileDescriptor</i></span></td><td><span class="function_parameter_description">\r\nSocket descriptor/file descriptor\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nA callback function with the socket descriptor/file descriptor as its only parameter.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="reloadScript"></a><p class="function_definition">\r\n<span class="function_definition">def reloadScript( <i>fullReload</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReloads Python modules related to entity and custom data types. \r\nThe current entity class is set to the newly loaded class. \r\nThis method should only be used for development mode and not for \r\nproduct mode. The following points should be noted: \r\n<br><br>\r\n1) The overloaded script can only be executed on <a href="../index.html">Cellapp</a>.\r\nThe user should ensure that all server components are loaded.\r\n<br><br>\r\n2) The custom type should ensure that the objects already instantiated \r\nin memory are updated after the script is reloaded. Here is an example: \r\n<br><br>\r\n\r\n<pre>for e in <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#entities>entities</a>.values():\r\n if type( e ) is Avatar.Avatar:\r\n e.customData.__class__ = CustomClass\r\n</pre>\r\nWhen this method completes <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onInit>onInit</a>( True ) \r\nis called.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fullReload</i></span></td><td><span class="function_parameter_description">\r\nOptional boolean parameter that specifies whether to reload entity \r\ndefinitions at the same time. If this parameter is False, the entity \r\ndefinition will not be reloaded. The default is True.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>True if the reload succeeds, False otherwise.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="scriptLogType"></a><p class="function_definition">\r\n<span class="function_definition">def scriptLogType( <i>logType</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nSet the type of information output by the current Python.print (Reference: KBEngine.LOG_TYPE_*).\r\n</div>\r\n\r\n\r\n\r\n<a name="setAppFlags"></a><p class="function_definition">\r\n<span class="function_definition">def setAppFlags( <i>flags</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nSet the flags of the current engine APP.\r\n<br>\r\n<br>\r\nKBEngine.APP_FLAGS_NONE // Default (not set)<br>\r\nKBEngine.APP_FLAGS_NOT_PARTCIPATING_LOAD_BALANCING // Do not participate in load balancing<br>\r\n<br>\r\nExample:<br>\r\nKBEngine.setAppFlags(KBEngine.APP_FLAGS_NOT_PARTCIPATING_LOAD_BALANCING | KBEngine.APP_FLAGS_*)\r\n</div>\r\n\r\n\r\n\r\n<a name="setSpaceData"></a><p class="function_definition">\r\n<span class="function_definition">def setSpaceData( <i>spaceID, key, value </i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nSets the space data for the specified key.\r\n<br>\r\nThe space data can be obtained via <a href=#getSpaceData>getSpaceData</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nint32, the ID of the space.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nstring, a string keyword\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>value</i></span></td><td><span class="function_parameter_description">\r\nstring, the string value.\r\n</span></td></tr>\r\n</table>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="time"></a><p class="function_definition">\r\n<span class="function_definition">def time( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis method returns the current game time (number of cycles).\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nuint32, the current time of the game. This refers to the number of cycles. \r\nThe period is affected by the frequency. The frequency is determined by \r\nthe configuration file <a href=../../keywords.html#kbengine.xml>kbengine.xml</a> or <a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>-> gameUpdateHertz.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n<a name="onCellAppData"></a><p class="function_definition">\r\n<span class="function_definition">def onCellAppData( <i>key, value</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when KBEngine.cellAppData changes.\r\n<br>Note: This callback interface must be implemented in the portal \r\nmodule ( <a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile ).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nThe key of the changed data.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>value</i></span></td><td><span class="function_parameter_description">\r\nThe value of the changed data.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onCellAppDataDel"></a><p class="function_definition">\r\n<span class="function_definition">def onCellAppDataDel( <i>key</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when KBEngine.cellAppData is deleted.\r\n<br>Note: This callback interface must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nDeleted data key.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onGlobalData"></a><p class="function_definition">\r\n<span class="function_definition">def onGlobalData( <i>key, value</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when KBEngine.globalData changes.\r\n<br>Note: This callback interface must be implemented in the portal moodule (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nThe key of the changed data.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>value</i></span></td><td><span class="function_parameter_description">\r\nThe value of the changed data.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onGlobalDataDel"></a><p class="function_definition">\r\n<span class="function_definition">def onGlobalDataDel( <i>key</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when KBEngine.globalData is deleted.\r\n<br>Note: This callback interface must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nDeleted data key.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onInit"></a><p class="function_definition">\r\n<span class="function_definition">def onInit( <i>isReload</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis interface is called after all scripts have been initialized since \r\nthe engine started.\r\n<br>Note: This callback interface must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>isReload</i></span></td><td><span class="function_parameter_description">\r\nBool, whether it was triggered after reloading the loading the script.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onSpaceData"></a><p class="function_definition">\r\n<span class="function_definition">def onSpaceData( <i>spaceID, key, value</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCalled when there is a change in the space data.<br>\r\nThe space data is set by the user via <a href=#setSpaceData>setSpaceData</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nThe ID of the space.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nThe key of the changed data.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>value</i></span></td><td><span class="function_parameter_description">\r\nThe value of the changed data.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="onSpaceGeometryLoaded"></a><p class="function_definition">\r\n<span class="function_definition">def onSpaceGeometryLoaded( <i>spaceID, mapping</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe space required by the grid collision data is loaded.<br>\r\nSet by user through <a href=#addSpaceGeometryMapping>addSpaceGeometryMapping</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nThe ID of the space.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>mapping</i></span></td><td><span class="function_parameter_description">\r\nThe map value of the grid collision data.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onAllSpaceGeometryLoaded"></a><p class="function_definition">\r\n<span class="function_definition">def onAllSpaceGeometryLoaded( <i>spaceID, isBootstrap, mapping</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe space required for grid collision and other data is completely loaded.<br>\r\nSet by user through <a href=#addSpaceGeometryMapping>addSpaceGeometryMapping</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>spaceID</i></span></td><td><span class="function_parameter_description">\r\nThe ID of the space.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>isBootstrap</i></span></td><td><span class="function_parameter_description">\r\nIf a space is partitioned by multiple cells, isBootstrap describes \r\nwhether it is the originating cell of the loading request.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>mapping</i></span></td><td><span class="function_parameter_description">\r\nThe map value of grid collision data.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<hr>\r\n<h2>Attribute documentation</h2>\r\n\r\n<a name="LOG_TYPE_DBG"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_DBG</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is debug.<br>\r\nSet by <a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="LOG_TYPE_ERR"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_ERR</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is error.<br>\r\nSet by <a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="LOG_TYPE_INFO"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_INFO</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is general information.<br>\r\nSet by <a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="LOG_TYPE_NORMAL"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_NORMAL</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is normal.<br>\r\nSet by <a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="LOG_TYPE_WAR"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_WAR</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is warning.<br>\r\nSet by <a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="NEXT_ONLY"></a><p class="attribute_definition">\r\n<span class="attribute_definition">NEXT_ONLY</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis constant is currently unused in Cellap.\r\n</div>\r\n\r\n<a name="cellAppData"></a><p class="attribute_definition">\r\n<span class="attribute_definition">cellAppData</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis property contains a dictionary-like object that is automatically \r\nsynchronized across all CellApps. When a value in the dictionary is \r\nmodified, this change is broadcast to all Cellapps.\r\n\r\n<br><br>\r\nExample:\r\n\r\n<pre><a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#cellAppData>cellAppData</a>[ "hello" ] = "there"\r\n</pre>\r\n<br><br>\r\nThe rest of Cellap can access the following:\r\n\r\n<pre>print <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#cellAppData>cellAppData</a>[ "hello" ]\r\n</pre>\r\n<br><br>\r\nKeys and values can be of any type, but these types must be encapsulated \r\nand unpacked on all target components.\r\n<br><br>\r\nWhen a value is changed or deleted, a callback function is called on all \r\ncomponents. See: <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onCellAppData>onCellAppData</a> and <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onDelCellAppData>onDelCellAppData</a>.\r\n<br><br>\r\nNote: Only the top-level value will be broadcast. If you have a value \r\n(such as a list) that changes the internal value (such as just changing \r\na number), this information will not be broadcast.\r\n<br><br>\r\nDo not do the following:\r\n\r\n<pre><a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#cellAppData>cellAppData</a>[ "list" ] = [1, 2, 3]\r\n<a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#cellAppData>cellAppData</a>[ "list" ][1] = 7\r\n</pre>\r\nThis will cause the local access to read [1, 7, 3] and the remote [1, 2, 3]\r\n</div>\r\n\r\n<a name="component"></a><p class="attribute_definition">\r\n<span class="attribute_definition">component</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis is the component that is running in the current Python environment. (So far) Possible values are \'cell\', \'base\', \'client\', \'database\', \'bot\' and \'editor\'.\r\n</div>\r\n\r\n<a name="entities"></a><p class="attribute_definition">\r\n<span class="attribute_definition">entities</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nentities is a dictinary object that contains all entities in the current \r\nprocess, including <a href=../../keywords.html#ghost>ghost</a> entities.<br>\r\n<br>\r\nDebugging leaked entities: (instances that call destroy without releasing \r\nmemory, usually as a result of the reference not being released)<br>\r\n<pre>\r\n>>> KBEngine.entities.garbages.items()\r\n[(1025, Avatar object at 0x7f92431ceae8.)]\r\n<br>\r\n>>> e = _[0][1]\r\n>>> import gc\r\n>>> gc.get_referents(e)\r\n[{\'spacesIsOk\': True, \'bootstrapIdx\': 1}, <class \'Avatar.Avatar\'>]\r\n</pre>\r\n<br>\r\nDebugging a leaked KBEngine-encapsulated Python object:<br>\r\n<a href=#debugTracing>KBEngine.debugTracing</a>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href="../Classes/Entity.html">Entities</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="globalData"></a><p class="attribute_definition">\r\n<span class="attribute_definition">globalData</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis attribute contains a dictionary-like object that is automatically \r\ncopied between all BaseApps and CellApps. When a value in a dictionary is \r\nmodified, this change is broadcast to all BaseApps and CellApps. \r\nCellAppMgr solves completion conditions and ensures the authority of \r\ninformation replication.\r\n<br><br>\r\nExample:\r\n\r\n<pre><a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#globalData>globalData</a>[ "hello" ] = "there"\r\n</pre>\r\n<br><br>\r\nThe rest of <a href="../index.html">Cellapp</a> or <a href="../index.html"><a href="../../baseapp/index.html">Baseapp</a></a>\r\ncan access the following:\r\n\r\n<pre>print <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#globalData>globalData</a>[ "hello" ]\r\n</pre>\r\n<br><br>\r\nKeys and values can be of any type, but these types must be encapsulated and unpacked on all target components. \r\n<br><br>\r\n\r\nWhen a value is changed or deleted, a callback function is called on all components.\r\nSee: <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onGlobalData>onGlobalData</a> and <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onGlobalDataDel>onGlobalDataDel</a>.\r\n<br><br>\r\nNote: Only the top-level value will be broadcast. If you have a volatile value (such as a list) that changes the internal value (such as just changing a number), this information will not be broadcast.\r\n<br><br>\r\nDo not do the following:\r\n\r\n<pre><a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#globalData>globalData</a>[ "list" ] = [1, 2, 3]\r\n<a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#globalData>globalData</a>[ "list" ][1] = 7\r\n</pre>\r\nThis will cause the local access to read [1, 7, 3] and the remote [1, 2, 3]\r\n</div>\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>Entity - KBEngine cell</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Entity</h1>\r\n\r\n<p style="text-align: center;"><span class="module_h1">[<a href="../Modules/KBEngine.html" class="module_h1">KBEngine module</a>]</span></p>\r\n<p>Entity is part of the <a href="../Modules/KBEngine.html">KBEngine</a> module. <a href="#detailed_description">More...</a></p><p></p><pre>import KBEngine</pre>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#accelerate" class="function_list" >accelerate</a>( self, accelerateType, acceleration ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addYawRotator" class="function_list" >addYawRotator</a>( self, targetYaw, velocity, userArg ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addProximity" class="function_list" >addProximity</a>( self, range, userArg ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addTimer" class="function_list" >addTimer</a>( self, start, interval=0.0, userData=0 ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#cancelController" class="function_list" >cancelController</a>( self, controllerID ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#clientEntity" class="function_list" >clientEntity</a>( self, destID ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#canNavigate" class="function_list" >canNavigate</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#debugView" class="function_list" >debugView</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#delTimer" class="function_list" >delTimer</a>( self, id ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#destroy" class="function_list" >destroy</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#destroySpace" class="function_list" >destroySpace</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#entitiesInView" class="function_list" >entitiesInView</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#entitiesInRange" class="function_list" >entitiesInRange</a>( self, range, entityType=None, position=None ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#isReal" class="function_list" >isReal</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#moveToEntity" class="function_list" >moveToEntity</a>( self, destEntityID, velocity, distance, userData, faceMovement, moveVertically ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#moveToPoint" class="function_list" >moveToPoint</a>( self, destination, velocity, distance, userData, faceMovement, moveVertically ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getViewRadius" class="function_list" >getViewRadius</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getViewLagArea" class="function_list" >getViewLagArea</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getRandomPoints" class="function_list" >getRandomPoints</a>( self, centerPos, maxRadius, maxPoints, layer ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#navigate" class="function_list" >navigate</a>( self, destination, velocity, distance, maxMoveDistance, maxSearchDistance, faceMovement, layer, userData ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#navigatePathPoints" class="function_list" >navigatePathPoints</a>( self, destination, maxSearchDistance, layer ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#setViewRadius" class="function_list" >setViewRadius</a>( self, radius, lagSize=5.0 ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#teleport" class="function_list" >teleport</a>( self, nearbyMBRef, position, direction ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#writeToDB" class="function_list" >writeToDB</a>( self, shouldAutoLoad, dbInterfaceName ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callbacks</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onDestroy" class="function_list" >onDestroy</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onEnterTrap" class="function_list" >onEnterTrap</a>( self, entity, rangeXZ, rangeY, controllerID, userArg ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onEnteredView" class="function_list" >onEnteredView</a>( self, entity ):</span>\r\n</td></tr>\r\n\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onGetWitness" class="function_list" >onGetWitness</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLeaveTrap" class="function_list" >onLeaveTrap</a>( self, entity, rangeXZ, rangeY, controllerID, userArg ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLoseControlledBy" class="function_list" >onLoseControlledBy</a>( self, id ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLoseWitness" class="function_list" >onLoseWitness</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onMove" class="function_list" >onMove</a>( self, controllerID, userData ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onMoveOver" class="function_list" >onMoveOver</a>( self, controllerID, userData ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onMoveFailure" class="function_list" >onMoveFailure</a>( self, controllerID, userData ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onRestore" class="function_list" >onRestore</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onSpaceGone" class="function_list" >onSpaceGone</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onTurn" class="function_list" >onTurn</a>( self, controllerID, userData ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onTeleport" class="function_list" >onTeleport</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onTeleportFailure" class="function_list" >onTeleportFailure</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onTeleportSuccess" class="function_list" >onTeleportSuccess</a>( self, nearbyEntity ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onTimer" class="function_list" >onTimer</a>( self, timerHandle, userData ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onUpdateBegin" class="function_list" >onUpdateBegin</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onUpdateEnd" class="function_list" >onUpdateEnd</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onWitnessed" class="function_list" >onWitnessed</a>( self, isWitnessed ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onWriteToDB" class="function_list" >onWriteToDB</a>( self ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><a href="#allClients" class="attribute_list" >allClients</a></td><td> Read-only PyClient\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#base" class="attribute_list" >base</a></td><td> Read-only <a href=../../keywords.html#EntityCall>BaseEntityCall </a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#client" class="attribute_list" >client</a></td><td> Read-only <a href=../../keywords.html#EntityCall>ClientEntityCall</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#controlledBy" class="attribute_list" >controlledBy</a></td><td> <a href=../../keywords.html#EntityCall>BaseEntityCall</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#className" class="attribute_list" >className</a></td><td> Read-only <a href="STRING.html">string</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#direction" class="attribute_list" >direction</a></td><td> Tuple of 3 floats as (roll, pitch, yaw)\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#hasWitness" class="attribute_list" >hasWitness</a></td><td> boolean\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#id" class="attribute_list" >id</a></td><td> Read-only Integer\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#isDestroyed" class="attribute_list" >isDestroyed</a></td><td> Read-only bool\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#isOnGround" class="attribute_list" >isOnGround</a></td><td> Read-only bool\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#isWitnessed" class="attribute_list" >isWitnessed</a></td><td> Read-only bool</td></tr>\r\n\r\n<tr valign=top><td><a href="#layer" class="attribute_list" >layer</a></td><td> int8\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#otherClients" class="attribute_list" >otherClients</a></td><td> Read-only PyClient\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#position" class="attribute_list" >position</a></td><td> <a href=../../keywords.html#vector3>Vector3</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#spaceID" class="attribute_list" >spaceID</a></td><td> Read-only uint32\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#topSpeed" class="attribute_list" >topSpeed</a></td><td> float\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#topSpeedY" class="attribute_list" >topSpeedY</a></td><td> float\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#volatileInfo" class="attribute_list" >volatileInfo</a></td><td> float\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<hr>\r\n<a name="detailed_description"></a><h2>A detailed description</h2>\r\nInstances of class <a href=../../keywords.html#entity>Entity</a> represent \r\ngame objects in the cell.\r\nAn <a href=../../keywords.html#entity>Entity</a> can either be "real" or "ghosted".\r\nA "ghost" <a href=../../keywords.html#entity>Entity</a> is a copy of a \r\n"real" <a href=../../keywords.html#entity>Entity</a> living on a neighboring cell.\r\nThere is a unique "real" <a href=../../keywords.html#entity>Entity</a> \r\ninstance for each entity, and 0 or more "ghost" <a href=../../keywords.html#entity>Entity</a> \r\ninstances.\r\n<br><br>\r\nAn <a href=../../keywords.html#entity>Entity</a> instance controls the location \r\ndata of the entity, including its position and rotation. It also controls \r\nhow often this data is sent to the client (if possible). The location data \r\ncan be updated by a unique client and modified by the controller object \r\nusing the teleport member function. Controllers are non-python objects \r\nthat can be used to change the location data over time on cell entities. \r\nThey are added to <a href=../../keywords.html#entity>Entity</a> through \r\nmember functions such as "trackEntity" and "turnToYaw" and can be removed \r\nvia "cancelController".\r\n<br><br>\r\nArea of Interest or "View" is an important concept for all <a href="KBEngine.html">KBEngine</a>\r\nentities that belong to a client. The view of an entity is the area that \r\nthe client (if it has a client) can perceive around this entity.\r\nThis is used to select the amount of data sent to the client. The actual \r\nshape of the View is defined by the range of distances on the x-axis and \r\naround the z-axis, and there is a lag region that extends outward \r\nlike a shape. An <a href=../../keywords.html#entity>Entity</a> enters \r\nanother <a href=../../keywords.html#entity>Entity</a>\'s view, but does \r\nnot leave it until it leaves the lag area. An <a href=../../keywords.html#entity>Entity</a> \r\ncan modify its View size via "setViewRadius". You can find all entities \r\nwithin a specific distance with "entitiesInRange" and set traps to capture \r\nall entities that enter the trap with "addProximity".\r\n<br><br>\r\nThe new <a href=../../keywords.html#entity>Entity</a> on cellapp can be \r\ncreated using <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=../Modules/KBEngine.html#createEntity>createEntity</a>. \r\nAn entity can also be created by the baseapp remote calls to the <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=../Modules/KBEngine.html#createCellEntity>createCellEntity</a> \r\nfunction.\r\n<br><br>\r\nAn <a href=../../keywords.html#entity>Entity</a> can access it equivalent \r\nentities on the base and client applications via <a href=../../keywords.html#EntityCall>ENTITYCALL</a>. \r\nThis requires a set of remotely-invoked functions (specified in the entity\'s .def file)\r\n\r\n<hr>\r\n<h2>Member function documentation</h2>\r\n\r\n<a name="accelerate"></a><p class="function_definition">\r\n<span class="function_definition">def accelerate( <i>self, accelerateType, acceleration</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nAccelerate the current movement of the entity.\r\n</div>\r\n\r\n<p>\r\n<span class="function_links"><b>The activities that can be accelerated include:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#moveToEntity">moveToEntity</a><br></td></tr>\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#moveToPoint">moveToPoint</a><br></td></tr>\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#navigate">navigate</a><br></td></tr>\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#addYawRotator">addYawRotator</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>accelerateType</i></span></td><td><span class="function_parameter_description">\r\nstring, the type of movement affected such as: "Movement", "Turn".\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>velocity</i></span></td><td><span class="function_parameter_description">\r\nfloat, acceleration per second, use negative to decelerate\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe current speed of the affected entity.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="addYawRotator"></a><p class="function_definition">\r\n<span class="function_definition">def addYawRotator( <i>self, targetYaw, velocity, userArg</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe control entity rotates around yaw. <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#onTurn>onTurn</a> is called when the rotation completes.\r\n<br><br>\r\nTo remove it, use <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a> \r\nwith the controller ID or use <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController("Movement")</a> \r\nto remove it.\r\n</div>\r\n\r\n<p>\r\n<span class="function_links"><b>See:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#cancelController">cancelController</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>targetYaw</i></span></td><td><span class="function_parameter_description">\r\nfloat, the given target yaw radians.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>velocity</i></span></td><td><span class="function_parameter_description">\r\nfloat, the arc per second when rotated.<br>\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userArg</i></span></td><td><span class="function_parameter_description">\r\nOptional integer that is common to all controllers. If this value is not 0, \r\nit is passed to the callback function. It is recommended to set the default \r\nvalue to 0 in the callback prototype.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="addProximity"></a><p class="function_definition">\r\n<span class="function_definition">def addProximity( <i>self, rangeXZ, rangeY, userArg</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCreate an area trigger that will notify the <a href=../../keywords.html#entity>Entity</a>\r\nwhen other entities enter or leave the trigger area. This area is a square (for efficiency).<br><br>\r\nIf another entity is within a given distance on the x-axis and z-axis, \r\nit is considered to be within the range. This <a href=../../keywords.html#entity>Entity</a> \r\nis notified via the onEnterTrap and onLeaveTrap functions, which can be \r\ndefined as follows:\r\n<br><br>\r\n\r\n<pre>\r\n\tdef onEnterTrap( self, entityEntering, rangeXZ, rangeY, controllerID, userArg = 0 ):\r\n\tdef onLeaveTrap( self, entityLeaving, rangeXZ, rangeY, controllerID, userArg = 0 ):\r\n</pre>\r\n<br><br>\r\nBecause the scope trigger is a controller, use <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a> \r\nwith the controller ID to delete it.\r\n<br><br>\r\nIt should be noted that the callback may be triggered immediately, even \r\nbefore the call to addProximity() returns.\r\n</div>\r\n\r\n<p>\r\n<span class="function_links"><b>See:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#cancelController">cancelController</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>rangeXZ</i></span></td><td><span class="function_parameter_description">\r\nfloat, the size of the xz axis area of the trigger, must be greater than or equal to zero.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>rangeY</i></span></td><td><span class="function_parameter_description">\r\nfloat, the height of the y-axis of the trigger, must be greater than or equal to zero.<br>\r\nIt should be noted that for this parameter to take effect <a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->cellapp->coordinate_system->rangemgr_y \r\nmust be set to true.\r\n<br>\r\nOpen y-axis management will increase CPU consumption, because some games \r\nhave a large number of entities at the same y-axis height or all on the \r\nground which is almost completely flat. Because of this, the collision \r\nbecomes very dense.\r\n<br>\r\n3D space games or small room-type games are more suitable for this option.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userArg</i></span></td><td><span class="function_parameter_description">\r\nOptional integer that is common to all controllers. If this value is not 0, \r\nit is passed to the callback function. It is recommended to set the default \r\nvalue to 0 in the callback prototype.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe ID of the created controller.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="addTimer"></a><p class="function_definition">\r\n<span class="function_definition">def addTimer( <i>self, start, interval=0.0, userData=0</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegister a timer. The timer triggers the callback function <i><a href="#onTimer">onTimer</a></i> \r\nThe callback function will be executed the first time after "initialOffset" \r\nseconds, and then it will be executed once every "repeatOffset" seconds \r\nwith the "userArg" parameter. (integer only)\r\n<br><br>\r\nThe <i><a href="#onTimer">onTimer</a></i> function must be defined in the \r\ncell part of the entity with two parameters. The first is an integer, the \r\ntimer\'s ID (which can be used to remove the timer\'s "<a href="#delTimer">delTimer</a>" \r\nfunction), and the second is the user parameter "userArg".\r\n<br><br>\r\nExample:\r\n\r\n<pre><pre># Here is an example of using addTimer\r\nimport <a href="../Modules/KBEngine.html">KBEngine</a>\r\n \r\nclass MyCellEntity( <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=../../keywords.html#entity>Entity</a> ):\r\n \r\n def __init__( self ):\r\n <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=../../keywords.html#entity>Entity</a>.__init__( self )\r\n \r\n # Add a timer, perform the first time after 5 seconds, and execute once every 1 second. The user parameter is 9.\r\n self.addTimer( 5, 1, 9 )\r\n \r\n # Add a timer and execute it after 1 second. The default user parameter is 0.\r\n self.addTimer( 1 )\r\n \r\n # <a href=../../keywords.html#entity>Entity</a> timer callback "onTimer" is called\r\n def onTimer( self, id, userArg ):\r\n print "MyCellEntity.onTimer called: id %i, userArg: %i" % ( id, userArg )\r\n # if this is a repeated timer, when it is no longer needed, call the following function to remove it:\r\n # self.delTimer( id )</pre>\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>initialOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval (in seconds) for the timer to execute the first callback.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>repeatOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval (in seconds) between each callback after \r\nthe first callback. The timer must be removed with the function <a href="#delTimer">delTimer</a>, \r\notherwise it will be repeated. Values less than or equal to 0 will be ignored.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userArg</i></span></td><td><span class="function_parameter_description">\r\ninteger, specifies the value of the "userArg" parameter when calling "<a href="#onTimer">onTimer</a>".\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>integer, returns the internal ID of the timer. This ID can be used \r\nto remove the timer using <a href="#delTimer">delTimer</a>.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="cancelController"></a><p class="function_definition">\r\n<span class="function_definition">def cancelController( <i>self, controllerID</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe function cancelController stops the effect of a controller on <a href=../../keywords.html#entity>Entity</a>. \r\nIt can only be called on a <a href=../../keywords.html#real>real</a> entity.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>controllerID</i></span></td><td><span class="function_parameter_description">\r\ninteger, the index of the controller to cancel. \r\nA special controller type string can also be used as its type. \r\nFor example, only one mobile/navigation controller can be activated at a \r\ntime. This can be cancelled with entity.cancelController( "Movement" ).\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="clientEntity"></a><p class="function_definition">\r\n<span class="function_definition">def clientEntity( <i>self, destID</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis method can access the method of an entity in its own client \r\n(the current entity must be bound to the client). Only the entities in \r\nthe View scope will be synchronized to the client. It can only be called \r\non a <a href=../../keywords.html#real>real</a> entity.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>destID</i></span></td><td><span class="function_parameter_description">\r\ninteger, the ID of the target entity.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="canNavigate"></a><p class="function_definition">\r\n<span class="function_definition">def canNavigate( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis method determines whether the current entity can use the navigation (<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#navigate>navigate</a>) \r\nfeature. It can only be called on a <a href=../../keywords.html#real>real</a>\r\nentity. <br>\r\nUsually it can use navigation when the entity\'s Space uses <a href=../Modules/KBEngine.html>KBENgine</a>.<a href=../Modules/KBEngine.html#addSpaceGeometryMapping>addSpaceGeometryMapping</a> \r\nto load valid navigation collision data (Navmesh or 2D tile data) and the \r\nentity is available in the effective navigation area.\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>bool, returns True if the entity can use the Navigate function \r\nin the current space, otherwise it returns False.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="debugView"></a><p class="function_definition">\r\n<span class="function_definition">def debugView( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\ndebugView outputs the <a href=../../keywords.html#entity>Entity</a>\'s View \r\ndetails to the cell\'s debug log. A description of the workings of the View \r\nsystem can be found in the <a href=../../keywords.html#entity>Entity</a> \r\nclass documentation.\r\n<br><br>\r\nA sample of information is as follows:\r\n\r\n<pre> INFO cellapp [0x00001a1c] [2014-11-04 00:28:41,409] - Avatar::debugView: 100 size=4, Seen=4, Pending=0, ViewRadius=50.000, ViewLagSize=5.000\r\n INFO cellapp [0x00001a1c] [2014-11-04 00:28:41,409] - Avatar::debugView: 100 Avatar(102), position(771.586.211.002.776.55), dist=0\r\n INFO cellapp [0x00001a1c] [2014-11-04 00:28:41,409] - Avatar::debugView: 100 Monster(1028), position(820.834.211.635.768.749), dist=49.8659\r\n INFO cellapp [0x00001a1c] [2014-11-04 00:28:41,409] - Avatar::debugView: 100 NPC(1025), position(784.024.210.95.782.273), dist=13.6915\r\n INFO cellapp [0x00001a1c] [2014-11-04 00:28:41,409] - Avatar::debugView: 100 Avatar(106), position(771.586.211.002.776.55), dist=0\r\n</pre>\r\nThe first line of information tells us:\r\n<ul>\r\n<li>It is entity #1000\'s data.</li>\r\n<li>There are 4 entities in its View area and all have been synchronized to the client.</li>\r\n<li>There are 0 entities in its view Area that are waiting to be synchronized to the client.</li>\r\n<li>The radius of the View is 50.000</li>\r\n<li>The lag area of the View extends 5.000 outward.</li>\r\n</ul>\r\n</div>\r\n\r\n<a name="delTimer"></a><p class="function_definition">\r\n<span class="function_definition">def delTimer( <i>self, id</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe delTimer function is used to remove a registered timer. The removed \r\ntimer is no longer executed. Single shot timers are \r\nautomatically removed after the callback is executed, and it is not \r\nnecessary to use the delTimer to remove it. If the delTimer function \r\nuses an invalid ID (for example, it has been removed), an error will be \r\ngenerated.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description">\r\ninteger, which specifies the timer ID to remove.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="destroy"></a><p class="function_definition">\r\n<span class="function_definition">def destroy( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function destroys its local <a href=../../keywords.html#entity>Entity</a>\r\ninstance. If the entity has a <a href=../../keywords.html#ghost>ghost</a> \r\npart on other processes, it will also notify for their destruction. This \r\nfunction is best called by the entity itself, and throws an exception if \r\nthe entity is a <a href=../../keywords.html#ghost>ghost</a>. If the \r\ncallback function onDestroy() is implemented, it is executed.\r\n</div>\r\n\r\n<a name="destroySpace"></a><p class="function_definition">\r\n<span class="function_definition">def destroySpace( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nDestroys the <a href=../../keywords.html#Space>space</a> this entity is in.\r\n</div>\r\n\r\n<a name="entitiesInView"></a><p class="function_definition">\r\n<span class="function_definition">def entitiesInView( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet a list of entities in the <a href=../../keywords.html#View>View</a> \r\nscope of this entity.\r\n\r\n<a name="entitiesInRange"></a><p class="function_definition">\r\n<span class="function_definition">def entitiesInRange( <i>self, range, entityType=None, position=None</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nSearch for <a href="Entity.html">entities</a> within a given distance. \r\nThis is a spherical search. The distances of the three axes must be \r\nmeasured. This can find <a href="Entity.html">entities</a> that are \r\noutside the <a href=../../keywords.html#View>View</a> scope of this \r\nentity, but cannot find entities in other <a href=../../keywords.html#cell>cells</a>.<br><br>\r\n\r\nExample:\r\n<pre> self.entitiesInRange( 100, \'Creature\', (100, 0, 100) )\r\n</pre>\r\nSearches for a list of entities of type \'Creature\' (an instantiated entity \r\nof a subclass of \'Creature\'). The center point is (100, 0, 100) and the \r\nsearch radius is 100 meters.\r\n\r\n<pre> [ e for e in self.entitiesInRange( 100, None, (100,0,100) ) if isinstance( e, BaseType ) ]\r\n</pre>\r\nGives a list of entities instantiated from subclasses of \'BaseType\'.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>range</i></span></td><td><span class="function_parameter_description">\r\nSearch distance around this entity, float type\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nAn optional string parameter, the entity\'s type name, used to match entities. \r\nIf the entity type is a valid class name (valid entities are ones listed in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>) \r\nonly this type of entity will be returned, otherwise all entities in this \r\nrange will be returned.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>position</i></span></td><td><span class="function_parameter_description">\r\nOptional <a href=../../keywords.html#vector3>Vector3</a> type parameter, \r\nwhich is the center of the search radius is centered on the entity itself \r\nby default.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nA list of <a href=../../keywords.html#entity>Entity</a> objects in a given range.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="isReal"></a><p class="function_definition">\r\n<span class="function_definition">def isReal( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function returns whether the <a href=../../keywords.html#entity>Entity</a>\r\nis <a href=../../keywords.html#real>real</a> or a <a href=../../keywords.html#ghost>ghost</a>.\r\n<br><br>\r\nThis function is rarely used but is useful for debugging.\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>bool, True if real, otherwise False.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="moveToEntity"></a><p class="function_definition">\r\n<span class="function_definition">def moveToEntity( <i>self, destEntityID, velocity, distance, userData, faceMovement, moveVertically</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nMoves the <a href="Entity.html">Entity</a> straight to another <a href=../../keywords.html#entity>Entity</a> position.<br>\r\nAny <a href="Entity.html">Entity</a> can only have one motion controller \r\nat any time. Repeatedly calling any move function will terminate the previous \r\nmove controller.<br>\r\nThis function will return a controller ID that can be used to cancel this move.<br>\r\n<br>\r\nFor example, <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a>( movementID ). \r\nYou can also cancel the move using <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a>( "Movement" ). \r\nThe callback function will not be called if the move is cancelled.\r\n<br><br>\r\n\r\n<pre>\r\n\tdef onMove( self, controllerID, userData ):\r\n\tdef onMoveOver( self, controllerID, userData ):\r\n\tdef onMoveFailure( self, controllerID, userData ):\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_links"><b>References:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#cancelController">cancelController</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>destEntityID</i></span></td><td><span class="function_parameter_description">\r\nint, the ID of the target <a href=../../keywords.html#entity>Entity</a>\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>velocity</i></span></td><td><span class="function_parameter_description">\r\nfloat, speed of the <a href=../../keywords.html#entity>Entity</a> move, in m/s\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>distance</i></span></td><td><span class="function_parameter_description">\r\nfloat, distance target that when reached the entity will stop moving, \r\nif the value is 0, it moves to the target position.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description">\r\nobject, optional parameter, when the callback function is invoked the \r\nuserData parameter will be this value.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>faceMovement</i></span></td><td><span class="function_parameter_description">\r\nbool, optional parameter, True if the entity faces the direction of the move. \r\nIf it is other mechanism, it is False.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>moveVertically</i></span></td><td><span class="function_parameter_description">\r\nbool, optional parameter, set to True to move in a straight line, set to \r\nFalse means to move in a straight line parallel to the ground.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nint, newly created controller ID.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="moveToPoint"></a><p class="function_definition">\r\n<span class="function_definition">def moveToPoint( <i>self, destination, velocity, distance, userData, faceMovement, moveVertically</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nMove the <a href=../../keywords.html#entity>Entity</a> to the given \r\ncoordinate point in a straight line. The callback function is invoked on \r\nsuccess or failure.<br>\r\nAny <a href="Entity.html">Entity</a> can only have one motion controller \r\nat any time. Repeatedly calling any move function will terminate the \r\nprevious move controller.<br>\r\nReturns a controller ID that can be used to cancel this move.\r\n\r\n<br><br>\r\nFor example:\r\n<br><a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a>( movementID ).\r\nYou can also cancel the move with <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a>( "Movement" ).\r\nThe callback function will not be called if the move is cancelled.\r\n<br><br>\r\nThe callback function is defined as follows:\r\n\r\n<pre>\r\n\tdef onMove( self, controllerID, userData ):\r\n\tdef onMoveOver( self, controllerID, userData ):\r\n\tdef onMoveFailure( self, controllerID, userData ):\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_links"><b>See:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#cancelController">cancelController</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>destination</i></span></td><td><span class="function_parameter_description">\r\nVector3, the target point to which the <a href=../../keywords.html#entity>Entity</a> \r\nis to be moved</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>velocity</i></span></td><td><span class="function_parameter_description">\r\nfloat, <a href=../../keywords.html#entity>Entity</a>\'s moving speed, in m/s</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>distance</i></span></td><td><span class="function_parameter_description">\r\nfloat, distance target that when reached the entity will stop moving, \r\nif the value is 0, it moves to the target position.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description">\r\nobject, data passed to the callback function\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>faceMovement</i></span></td><td><span class="function_parameter_description">\r\nbool, True if the entity faces the direction of the move. If it is other mechanism, it is false.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>moveVertically</i></span></td><td><span class="function_parameter_description">\r\nbool, set to True to move in a straight line, set to \r\nFalse means to move in a straight line parallel to the ground.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nint, newly created controller ID.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getViewRadius"></a><p class="function_definition">\r\n<span class="function_definition">def getViewRadius( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function returns the current View radius value of this <a href=../../keywords.html#entity>Entity</a>.\r\n<br><br>\r\nData can be set via \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#setViewRadius>setViewRadius</a>( radius, lagSize ).\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>float, View radius\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getViewLagArea"></a><p class="function_definition">\r\n<span class="function_definition">def getViewLagArea( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function returns the current lag area value of this <a href=../../keywords.html#entity>Entity</a> View.\r\n<br><br>\r\nData can be set via \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#setViewRadius>setViewRadius</a>( radius, lagSize ).\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>float, The current lag area value of this Entity\'s View.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getRandomPoints"></a><p class="function_definition">\r\n<span class="function_definition">def getRandomPoints( <i>self, centerPos, maxRadius, maxPoints, layer</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is used to get an array of random coordinate point that \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#navigate>navigate</a> \r\ncan reach in a certain area centered on a certain coordinate point.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>centerPos</i></span></td><td><span class="function_parameter_description">\r\nVector3, <a href=../../keywords.html#entity>Entity</a> center coordinates\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>maxRadius</i></span></td><td><span class="function_parameter_description">\r\nfloat, the maximum search radius\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>maxPoints</i></span></td><td><span class="function_parameter_description">\r\nuint32, the maximimum number of random coordinate points returned.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>layer</i></span></td><td><span class="function_parameter_description">\r\nint8, layer of navmesh to search.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\ntuple, an array of one or more coordinates.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="navigate"></a><p class="function_definition">\r\n<span class="function_definition">def navigate( <i>self, destination, velocity, distance, maxMoveDistance, maxSearchDistance, faceMovement, layer, userData</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nUse the navigation system to move this <a href=../../keywords.html#entity>Entity</a> \r\nto a target point. A callback will be invoked on success or failure. <br>\r\n<a href="KBEngine.html">KBEngine</a> can have several pre-generated \r\nnavigation meshes with different mesh sizes (leading to different navigation paths).<br>\r\nAny <a href="Entity.html">Entity</a> can only have one motion controller \r\nat any time. Repeatedly calling any move function will terminate the \r\nprevious move controller.<br>\r\nReturns a controller ID that can be used to cancel this move.\r\n\r\n<br><br>For example:\r\n<br><a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a>( movementID ).\r\nYou can also cancel the movement controller with <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a>( "Movement" ). \r\nThe callback function will not be called if the move is cancelled.\r\n<br><br>\r\nThe callback functions are defined as follows:\r\n\r\n<pre>\r\n\tdef onMove( self, controllerID, userData ):\r\n\tdef onMoveOver( self, controllerID, userData ):\r\n\tdef onMoveFailure( self, controllerID, userData ):\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_links"><b>See:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#cancelController">cancelController</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>destination</i></span></td><td><span class="function_parameter_description">\r\nVector3, the target point where the <a href=../../keywords.html#entity>Entity</a> moves.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>velocity</i></span></td><td><span class="function_parameter_description">\r\nfloat, <a href=../../keywords.html#entity>Entity</a>\'s move speed, in m/s\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>distance</i></span></td><td><span class="function_parameter_description">\r\nfloat, distance target that when reached the entity will stop moving, if the value is 0, it moves to the target position.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>maxMoveDistance</i></span></td><td><span class="function_parameter_description">\r\nfloat, the maximum move distance\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>maxSearchDistance</i></span></td><td><span class="function_parameter_description">\r\nfloat, the maximum search distance from the navigatio ndata.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>faceMovement</i></span></td><td><span class="function_parameter_description">\r\nbool, True if the entity faces the direction of the move (default). Otherwise False.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>layer</i></span></td><td><span class="function_parameter_description">\r\nint8, navmesh layer to search\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description">\r\nobject, the data passed to the callback function\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nint, the newly created controller ID.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="navigatePathPoints"></a><p class="function_definition">\r\n<span class="function_definition">def navigatePathPoints( <i>self, destination, maxSearchDistance, layer</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis functions returns a list of path points from the current <a href=../../keywords.html#entity>Entity</a> \r\nlocation to the destination.\r\n<br><br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>destination</i></span></td><td><span class="function_parameter_description">\r\nVector3, target point where the <a href=../../keywords.html#entity>Entity</a> moves\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>maxSearchDistance</i></span></td><td><span class="function_parameter_description">\r\nfloat, the maximum search distance\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>layer</i></span></td><td><span class="function_parameter_description">\r\nint8, navmesh layer to search for a path on.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="setViewRadius"></a><p class="function_definition">\r\n<span class="function_definition">def setViewRadius( <i>self, radius, lagSize=5.0</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nSpecifies the size of the <a href=../../keywords.html#entity>Entity</a>\'s \r\n<a href=../../keywords.html#View>View</a>.\r\n<br><br>\r\nThis function can only be used by <a href=../../keywords.html#Witness>Witness</a> related entities.\r\n<br><br>\r\nNote: You can set the default View radius by setting the <a href=../../keywords.html#kbengine.xml>kbengine.xml</a> \r\nconfiguration option \'cellapp/defaultViewRadius\'.\r\n<br><br>\r\nData can be obtained with <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#getViewRadius>getViewRadius</a>( ) and <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#getViewLagArea>getViewLagArea</a>( ).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>radius</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the radius of the View area\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>lagSize</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the size of the lag area of the View. A reasonable \r\nsetting of the lag area will reduce the sensitivity of View collisions \r\nand reduce CPU consumption. Views where one entity \r\nenters another entity must span the View radius area, but entities that \r\nleave the View area need to move out of the View radius area including \r\nthe lag area.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nNone\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="teleport"></a><p class="function_definition">\r\n<span class="function_definition">def teleport( <i>self, nearbyMBRef, position, direction</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nInstantly move an <a href=../../keywords.html#entity>Entity</a> to a \r\nspecified space. This function allows you to specify the position and \r\norientation of the entity after is has been moved. <br>\r\nIf you need to jump in different <a href=../../keywords.html#Space>spaces</a> \r\n(usually for different scene or room jumps), you can pass a <a href=../../keywords.html#EntityCall>CellEntityCall</a> \r\nto this function (the entity corresponding to the entityCall must be \r\nin the destination <a href=../../keywords.html#Space>Space</a>).\r\n<br><br>\r\nThis function can only be called on <a href=../../keywords.html#real>real</a> \r\nentities.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>nearbyMBRef</i></span></td><td><span class="function_parameter_description">\r\nA <a href=../../keywords.html#EntityCall>CellEntityCall</a> (the entity \r\ncorresponding to this entityCall must be in the destination <a href=../../keywords.html#Space>Space</a> ) \r\nthat determines which <a href=../../keywords.html#Space>Space</a> an <a href=../../keywords.html#entity>Entity</a> \r\nis to jump to. It is considered to be the transfer destination. This can \r\nbe set to None, in which case it will teleport on the current cell.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>position</i></span></td><td><span class="function_parameter_description">\r\nA sequence of 3 floats (x, y, z), the coordinates of where to teleport the <a href=../../keywords.html#entity>Entity</a> .\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>direction</i></span></td><td><span class="function_parameter_description">\r\nA sequence of 3 floats (roll, pitch, yaw), the orientation of the <a href=../../keywords.html#entity>Entity</a> \r\nafter teleportation.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="writeToDB"></a><p class="function_definition">\r\n<span class="function_definition">def writeToDB( <i>self, shouldAutoLoad, dbInterfaceName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function saves the data related to this entity to the database, \r\nincluding the data of the base entity. The onWriteToDB function of the \r\nbase entity is called before the data is passed to the database.\r\n<br><br>\r\nThe data of the cell entity is also backed up in the base entity to \r\nensure that the data is up-to-date when crash recovery data is encountered\r\n<br><br>\r\nThis function can only be called on <a href=../../keywords.html#real>real</a> \r\nentities, and the entity must exist in the base section.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>shouldAutoLoad</i></span></td><td><span class="function_parameter_description">\r\nbool, optional parameter, specifies whether this entity needs to be \r\nloaded from the database when the service starts.<br>\r\nNote: The entity is automatically loaded when the server starts. The \r\ndefault is to call createEntityAnywhereFromDBID to create an entity to a \r\nminimally loaded baseapp. The entire process will be completed before the \r\nfirst started baseapp calls onBaseAppReady.<br>\r\n<br>The script layer can reimplement the entity creation method in a \r\ncustomized script (kbengine_defaults.xml->baseapp->entryScriptFile definition), \r\nfor example:<br>\r\ndef onAutoLoadEntityCreate(entityType, dbid): <br>\r\n KBEngine.createEntityFromDBID(entityType, dbid)<br>\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbInterfaceName</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, specified by a database interface, uses the \r\ninterface name "default" by default. The database interface is defined in \r\nkbengine_defaults.xml->dbmgr->databaseInterfaces.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n\r\n<a name="onDestroy"></a><p class="function_definition">\r\n<span class="function_definition">def onDestroy( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this function is implemented in a \r\nscript, it is called after <a href="Entity.html">Entity</a>.<a href=Entity.html#destroy>destroy</a>() \r\ndestroys this entity. This function has no parameters.\r\n</div>\r\n\r\n<a name="onEnterTrap"></a><p class="function_definition">\r\n<span class="function_definition">def onEnterTrap( <i>self, entity, rangeXZ, rangeY, controllerID, userArg</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\nWhen a scope trigger is registered using <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#addProximity>addProximity</a> \r\nand another entity enters the trigger, this callback function is called. \r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entity</i></span></td><td><span class="function_parameter_description">\r\nEntity that has entered the area\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>rangeXZ</i></span></td><td><span class="function_parameter_description">\r\nfloat, the size of the xz axis of the trigger, must be greater than or equal to zero.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>rangeY</i></span></td><td><span class="function_parameter_description">\r\nfloat, the size of the y-axis height of the trigger, must be greater than \r\nor equal to zero.<br>\r\nIt should be noted that for this parameter to take effect you must enable \r\n<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->cellapp->coordinate_system->rangemgr_y\r\n<br>\r\nOpening y-axis management will increase CPU consumption, because some games \r\nhave a large number of entities at the same y-axis height or on the ground \r\nat nearly the same height. Because of this, the collision becomes very dense.<br>\r\n3D space games or small room-type games are more suitable for enabling this \r\noption.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>controllerID</i></span></td><td><span class="function_parameter_description"> The controller id of this trigger.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userArg</i></span></td><td><span class="function_parameter_description">\r\nThe value of the parameter given by the user when calling <a href=Entity.html#addProximity>addProximity</a>, \r\nthe user can decide how to use this parameter.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onEnteredView"></a><p class="function_definition">\r\n<span class="function_definition">def onEnteredView( <i>self, entity</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this function is implemented in a \r\nscript, when an entity enters the <a href=../../keywords.html#View>View</a> \r\nscope of the current entity, this callback is triggered.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entity</i></span></td><td><span class="function_parameter_description"> \r\nThe entity which has entered the View scope.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="onGetWitness"></a><p class="function_definition">\r\n<span class="function_definition">def onGetWitness( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this function is implemented in a script, \r\nit is called when the entity has a <a href=../../keywords.html#Witness>Witness</a> \r\nbound to it.<br>\r\nYou can also access the entity property <a href=#hasWitness>Entity.hasWitness</a> \r\nto get the current state of the entity.\r\n\r\n</div>\r\n\r\n<a name="onLeaveTrap"></a><p class="function_definition">\r\n<span class="function_definition">def onLeaveTrap( <i>self, entity, rangeXZ, rangeY, controllerID, userArg</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this function is implemented in a \r\nscript, it is triggered when an entity leaves the trigger area registered \r\nby the current entity. The scope trigger is registered with <a href=../../keywords.html#entity>Entity</a>.<a href=#addProximity>addProximity</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entity</i></span></td><td><span class="function_parameter_description">\r\nThe entity that has left the trigger area.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>rangeXZ</i></span></td><td><span class="function_parameter_description">\r\nfloat, the size of the xz axis of the trigger, must be greater than or equal to zero.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>rangeY</i></span></td><td><span class="function_parameter_description">\r\nfloat, the size of the y-axis height of the trigger, must be greater than \r\nor equal to zero.<br>\r\nIt should be noted that for this parameter to take effect you must enable \r\n<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->cellapp->coordinate_system->rangemgr_y\r\n<br>\r\nOpening y-axis management will increase CPU consumption, because some games \r\nhave a large number of entities at the same y-axis height or on the ground \r\nat nearly the same height. Because of this, the collision becomes very dense.<br>\r\n3D space games or small room-type games are more suitable for enabling this \r\noption.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>controllerID</i></span></td><td><span class="function_parameter_description"> \r\nThe controller ID of this trigger.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userArg</i></span></td><td><span class="function_parameter_description">\r\nThe value of the parameter given by the user when calling <a href=Entity.html#addProximity>addProximity</a>, \r\nthe user can decide how to use this parameter.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onLoseControlledBy"></a><p class="function_definition">\r\n<span class="function_definition">def onLoseControlledBy( <i>self, id</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this function is implemented in a \r\nscript, this callback is triggered when this entity loses the <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#controlledBy >controlledBy</a>\r\nentity.<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description"> \r\nID of the controlledBy entity.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onLoseWitness"></a><p class="function_definition">\r\n<span class="function_definition">def onLoseWitness( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this function is implemented in a \r\nscript, the callback is triggered whe this entity loses a <a href=../../keywords.html#Witness>Witness</a>.<br>\r\nYou can also access that <a href=#hasWitness>Entity.hasWitness</a> property \r\nto get the current state.\r\n</div>\r\n\r\n<a name="onMove"></a><p class="function_definition">\r\n<span class="function_definition">def onMove( <i>self, controllerID, userData</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this function is implemented in the \r\nscript, the callback is invoked each frame when moved after a call to <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#moveToPoint>moveToPoint</a>, \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#moveToEntity>moveToEntity</a>, or \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#navigate>navigate</a>. \r\n\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>controllerID</i></span></td><td><span class="function_parameter_description"> \r\nThe controller ID associated with the move.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description"> \r\nThe parameter given by the user when requesting to move the entity.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onMoveOver"></a><p class="function_definition">\r\n<span class="function_definition">def onMoveOver( <i>self, controllerID, userData</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description"> If this callback function is implemented in a \r\nscript, it is invoked after a call to <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#moveToPoint>moveToPoint</a>, \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#moveToEntity>moveToEntity</a>, or \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#navigate>navigate</a> \r\n when this entity reaches the target point.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>controllerID</i></span></td><td><span class="function_parameter_description"> \r\nThe controller ID associated with the move.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description"> \r\nThis parameter value is given by the user when requesting to move an entity.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onMoveFailure"></a><p class="function_definition">\r\n<span class="function_definition">def onMoveFailure( <i>self, controllerID, userData</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this function is implemented in the \r\nscript, this callback is invoked after a call to <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#moveToPoint>moveToPoint</a>, \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#moveToEntity>moveToEntity</a>, or \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#navigate>navigate</a> \r\nif the movement has failed.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>controllerID</i></span></td><td><span class="function_parameter_description"> \r\nThe controller ID associated with the move.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description"> \r\nThis parameter value is given by the user when requesting to move an entity.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="onRestore"></a><p class="function_definition">\r\n<span class="function_definition">def onRestore( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description"> If this callback function is implemented in a \r\nscript, it is invoked when the Cell application crashes and recreates \r\nthe entity on another cellapp. This function has no arguments.\r\n</div>\r\n\r\n\r\n<a name="onSpaceGone"></a><p class="function_definition">\r\n<span class="function_definition">def onSpaceGone( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback function is implemented in the \r\nscript, it will be called when the current entity\'s <a href=../../keywords.html#Space>Space</a> \r\nis destroyed. This function has no parameters.\r\n</div>\r\n\r\n\r\n\r\n<a name="onTurn"></a><p class="function_definition">\r\n<span class="function_definition">def onTurn( <i>self, controllerID, userData</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback function is implemented \r\nin a script, it will be called after reaching the specified yaw. (related to \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#addYawRotator>addYawRotator</a>)<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>controllerID</i></span></td><td><span class="function_parameter_description"> \r\nThe controller ID returned by <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#addYawRotator>addYawRotator</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description"> \r\nThis parameter value is given by user when requesting to move an entity.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="onTeleport"></a><p class="function_definition">\r\n<span class="function_definition">def onTeleport( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback function is implemented \r\nin a script, it will be called at the moment before the (Real) entity is \r\ntransmitted in the entity transfer that occurs through the baseapp\'s \r\nEntity.teleport call.<br>\r\nNote: Calling teleport on the entity\'s cell section does not trigger \r\nthis callback, if you need this feature please invoke this callback after \r\na call to <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#teleport>teleport</a>.\r\n</div>\r\n\r\n\r\n\r\n<a name="onTeleportFailure"></a><p class="function_definition">\r\n<span class="function_definition">def onTeleportFailure( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback function is implemented in a \r\nscript, it will be called after a call to <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#teleport>teleport</a> \r\nif the teleport has failed.\r\n</div>\r\n\r\n\r\n<a name="onTeleportSuccess"></a><p class="function_definition">\r\n<span class="function_definition">def onTeleportSuccess( <i>self, nearbyEntity</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback function is implemented \r\nin a script, it is invoked after a succesful call to <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#teleport>teleport</a>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>nearbyEntity</i></span></td><td><span class="function_parameter_description"> \r\nThis parameter is given by the user when calling <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#teleport>teleport</a>. \r\nThis is a real entity.\r\n<br><br>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onTimer"></a><p class="function_definition">\r\n<span class="function_definition">def onTimer( <i>self, timerHandle, userData</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called when a timer associated with this entity is triggered. \r\nA timer can be added using the <a href=../../keywords.html#entity>Entity</a>.<a href=#addTimer>addTimer</a> function.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>timerHandle</i></span></td><td><span class="function_parameter_description">\r\nThe ID of the timer.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description">\r\ninteger, given by the user when calling <a href=../../keywords.html#entity>Entity</a>.<a href=#addTimer>addTimer</a>.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onUpdateBegin"></a><p class="function_definition">\r\n<span class="function_definition">def onUpdateBegin( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">Invoked when a synchronization frame begins.\r\n</div>\r\n\r\n\r\n\r\n<a name="onUpdateEnd"></a><p class="function_definition">\r\n<span class="function_definition">def onUpdateEnd( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">Invoked after a synchronization frame \r\nhas completed.\r\n</div>\r\n\r\n\r\n\r\n<a name="onWitnessed"></a><p class="function_definition">\r\n<span class="function_definition">def onWitnessed( <i>self, isWitnessed</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback function is implemented \r\nin a script, it is called when this entity enters the View area of \r\nanother entity bound to a Witness (also can be understood as when this \r\nentity is observed by a client). This function can be used to activate \r\nthe entity\'s AI when it is observed, and stopping AI execution when the \r\nentity ceases to be observed, thus reducing CPU consumption of the server \r\nto increase efficiency.\r\n</div>\r\n\r\n\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>isWitnessed</i></span></td><td><span class="function_parameter_description"> \r\nbool, True if the entity is observed and False when the entity is not \r\nobserved.<br>\r\nYou can also access the entity property <a href=#isWitnessed>Entity.isWitnessed</a> \r\nto get the current state of the entity.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onWriteToDB"></a><p class="function_definition">\r\n<span class="function_definition">def onWriteToDB( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback function is implemented \r\nin a script, it is called when the entity is about to be archived into \r\nthe database.\r\n</div>\r\n\r\n<hr>\r\n<h2>Attributes documentation</h2>\r\n\r\n<a name="allClients"></a><p class="attribute_definition">\r\n<span class="attribute_definition">allClients</span>\r\n</p>\r\n\r\n<div class="attribute_description">By calling the entity\'s remote client \r\nmethods through this attribute, the engine broadcasts the message to all \r\nother entities bound to a client that are within this entity\'s View area \r\n(including its own client, and the entity bound to the client is usually \r\nthe player)<br>\r\n<br>\r\nExample:<br>\r\nAvatar has player A, player B, and monster C in the View range.<br>\r\navatar.allClients.attack(monsterID\uff0cskillID, damage)<br><br>\r\nAt this point, the player himself, player A\'s, and player B\'s clients will \r\nall call the entity\'s attack method, and their client can invoke the \r\nspecified skill\'s attack action to perform.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_links"><b>Other references:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#clientEntity">clientEntity</a><br><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#otherClients">otherClients</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="base"></a><p class="attribute_definition">\r\n<span class="attribute_definition">base</span>\r\n</p>\r\n\r\n<div class="attribute_description">base is the entityCall used to contact \r\nthe base <a href=../../baseapp/Classes/Entity.html>Entity</a>. This attribute \r\nis read-only and is None if the entity has no associated base <a href=../../baseapp/Classes/Entity.html>Entity</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_links"><b>Other references:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#clientEntity">clientEntity</a><br><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#allClients">allClients</a><br><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#otherClients">otherClients</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, <a href=../../keywords.html#EntityCall>ENTITYCALL</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="className"></a><p class="attribute_definition">\r\n<span class="attribute_definition">className</span>\r\n</p>\r\n\r\n<div class="attribute_description">The class name of the entity.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, string\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="client"></a><p class="attribute_definition">\r\n<span class="attribute_definition">client</span>\r\n</p>\r\n\r\n<div class="attribute_description">client is the entityCall used to contact \r\nassociated client. This attribute is read-only, and is None if this entity \r\ndoes not have an associated client.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_links"><b>Other references:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#clientEntity">clientEntity</a><br><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#allClients">allClients</a><br><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#otherClients">otherClients</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, <a href=../../keywords.html#EntityCall>ENTITYCALL</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="controlledBy"></a><p class="attribute_definition">\r\n<span class="attribute_definition">controlledBy</span>\r\n</p>\r\n\r\n<div class="attribute_description">If this attribute is set to the \r\nBaseEntityCall of the server-side entity associated with a client, this \r\nentity is controlled by the corresponding client to move. If the attribute \r\nis None, the entity is moved by the server. When the client logs in and \r\ncalls giveClientTo on this entity, this attribute is automatically set to \r\nits own BaseEntityCall.<br>\r\nScripts can flexibly control the movement of the entity by the server or \r\nby the client (its own client or give control to other clients).\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_links"><b>Other references:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#onLoseControlledBy">onLoseControlledBy</a></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#EntityCall>BaseEntityCall </a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="direction"></a><p class="attribute_definition">\r\n<span class="attribute_definition">direction</span>\r\n</p>\r\n\r\n<div class="attribute_description">This attribute describes the orientation \r\nof the <a href=../../keywords.html#entity>Entity</a> in world space. Users \r\ncan change this attribute and the data will be synchronized to the client.\r\n</div>\r\n\r\nExample:\r\n\r\nself.direction.y = 1.0\r\nself.direction.z = 1.0\r\n\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Vector3, which contains (roll, pitch, yaw) in radians.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="hasWitness"></a><p class="attribute_definition">\r\n<span class="attribute_definition">hasWitness</span>\r\n</p>\r\n\r\n<div class="attribute_description">If this read-only attribute is True, \r\nit means that the entity has already bound a <a href=../../keywords.html#Witness>Witness</a>. \r\nIf the entity is bound to <a href=../../keywords.html#Witness>Witness</a>, \r\nthe client can obtain information from the entity\'s view scope. Otherwise, False.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, bool \r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="id"></a><p class="attribute_definition">\r\n<span class="attribute_definition">id</span>\r\n</p>\r\n\r\n<div class="attribute_description">id is the id of the <a href=../../keywords.html#entity>Entity</a> \r\nobject. This id is an integer that is the same between base, cell, \r\nand client associated entities. This attribute is read-only.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, int32 \r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="isDestroyed"></a><p class="attribute_definition">\r\n<span class="attribute_definition">isDestroyed</span>\r\n</p>\r\n\r\n<div class="attribute_description">If this attribute is True, this <a href=../../keywords.html#entity>Entity</a> \r\nhas already been destroyed.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, bool\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="isOnGround"></a><p class="attribute_definition">\r\n<span class="attribute_definition">isOnGround</span>\r\n</p>\r\n\r\n<div class="attribute_description">If the value of this attribute is True, \r\nthe <a href=../../keywords.html#entity>Entity</a> is on the ground, otherwise \r\nit is False.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, bool\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="isWitnessed"></a><p class="attribute_definition">\r\n<span class="attribute_definition">isWitnessed</span>\r\n</p>\r\n\r\n<div class="attribute_description">If the current entity is in the View \r\nscope of another entity bound to Witness (can also be understood as an\r\n entity observed by a client), this property is True, otherwise it is False.\r\n<br><br>\r\n<span class="attribute_links"><b>Other references:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#onWitnessed>onWitnessed</a></td></tr>\r\n</table>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, bool \r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="layer"></a><p class="attribute_definition">\r\n<span class="attribute_definition">layer</span>\r\n</p>\r\n\r\n<div class="attribute_description">A space can load multiple navmesh data \r\nat the same time. Different navmesh can be in different layers. Different \r\nlayers can be abstracted into the ground, the water surface, and so on. \r\nThis attribute determines which layer an entity exists in.\r\n<br><br>\r\nReference:<br>\r\n<a href=../Modules/KBEngine.html#addSpaceGeometryMapping>KBEngine.addSpaceGeometryMapping</a>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>int8 \r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="otherClients"></a><p class="attribute_definition">\r\n<span class="attribute_definition">otherClients</span>\r\n</p>\r\n\r\n<div class="attribute_description">By calling the entity\'s remote client \r\nmethods through this property, the engine broadcasts the message to all \r\nother entities bound to the cliend within this entity\'s View scope (Not \r\nincluding its own client. The entity bound to the client is usually the player.).\r\n<br><br>\r\nExample:<br>\r\navatar has player A, player B, and monster C in the View range.<br>\r\navatar.otherClients.attack(monsterID, skillID, damage)\r\n<br><br>\r\nAt this point, player A\'s and player B\'s client will call the entity \r\nattack method, and their client can invoke the specified skill\'s attack \r\naction to perform.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_links"><b>Other references:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#clientEntity">clientEntity</a><br><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#otherClients">otherClients</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="position"></a><p class="attribute_definition">\r\n<span class="attribute_definition">position</span>\r\n</p>\r\n\r\n<div class="attribute_description">The coordinates of this entity in world \r\nspace (x, y, z). This attribute can be changed by the user and will be \r\nsynchronized to the client after the change. It is important to note that this \r\nattribute should not be referenced. Referencing this attribute is likely \r\nto incorrectly modify the real coordinates of the entity.\r\n<br><br>\r\n\r\nExample:\r\n<pre>self.position.y = 10.0\r\n</pre>\r\n<br><br>\r\nIf you want to copy this attribute value you can do the following:\r\n<br>\r\n<pre>\r\n\timport Math\r\n\tself.copyPosition = Math.<a href=../../keywords.html#vector3>Vector3</a>( self.position )\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#vector3>Vector3</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="spaceID"></a><p class="attribute_definition">\r\n<span class="attribute_definition">spaceID</span>\r\n</p>\r\n\r\n<div class="attribute_description">This attribute is the ID of the <a href=../../keywords.html#Space>space</a> \r\nin which the entity is located. The cell and client ids are the same.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, Integer\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="topSpeed"></a><p class="attribute_definition">\r\n<span class="attribute_definition">topSpeed</span>\r\n</p>\r\n\r\n<div class="attribute_description">The maximum xz movement speed \r\nof the entity (m/s). This attribute is usually larger than the actualy \r\nmovement speed. The server checks the client\'s movement legality through \r\nthis attribute. If the movement distance excedes the speed limit, it is \r\nforced back to the previous position.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_links"><b>Other references:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#topSpeedY">topSpeedY</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>float\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="topSpeedY"></a><p class="attribute_definition">\r\n<span class="attribute_definition">topSpeedY</span>\r\n</p>\r\n\r\n<div class="attribute_description">The maximum y-axis movement speed \r\nof the entity (m/s). This attribute is usually larger than the actualy \r\nmovement speed. The server checks the client\'s movement legality through \r\nthis attribute. If the movement distance excedes the speed limit, it is \r\nforced back to the previous position.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_links"><b>Other references:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#topSpeed">topSpeed</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>float\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="volatileInfo"></a><p class="attribute_definition">\r\n<span class="attribute_definition">volatileInfo</span>\r\n</p>\r\n\r\n<div class="attribute_description">This attribute specifies the <a href=../../keywords.html#entity>Entity</a>\'s \r\nvolatile data synchronization policy.<br>\r\nVolatile data includes the coordinate position of the entity and the \r\norientation of the entity. Since volatile data is easily changed, the \r\nengine uses a set of optimized solutions to synchronize it to the \r\nclient.<br>\r\nThis attribute is four floats (position, yaw, pitch, roll) that represents \r\nthe distance value, and the server synchronizes the relevant data to it \r\nwhen an entity reaches a close distance. If the distance value is larger \r\nthan the View radius, it means that it is always synchronized\r\n<br><br>\r\nThere is also a special bool attribute that is optimized. Its role is to \r\ncontrol whether or not the server is optimized for synchronization. The \r\ncurrent main optimization is the Y axis.<br>\r\nIf true, the server does not synchronize the y-axis coordinates of the \r\nentity when some actions (e.g., navigate) cause the server to determine \r\nthe entity is on the ground. This can save a lot of bandwidth when \r\nsynchronizing a large number of entities. The default is true.<br>\r\n\r\n<br><br>\r\nUsers can also set the synchronization policies for different entities in .def:\r\n\r\n<pre><Volatile>\r\n <position/> <!-- always synchronize -->\r\n <yaw/> <!-- always synchronize -->\r\n <pitch>20</pitch> <!-- synchronize within 20m or less -->\r\n <optimized> true </optimized> \r\n</Volatile> <!-- roll is always synchronized if not specified -->\r\n\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>sequence, four floats (float, float, float, float)\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine baseapp</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Baseapp process</h1>\r\nThe Baseapp process is mainly responsible for communication with the client, \r\nlocation independent game logic (guild manager, chat system, leaderboard, etc.), \r\narchiving, backup, and so on.\r\n\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine base</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>KBEngine module</h1>\r\nThis <a href="KBEngine.html">KBEngine</a> module provides the Python script \r\naccess to the <a href="../Classes/Entity.html">entity</a>\'s base part, in particular \r\nit provides the registration and removal of timers, as well as the creation \r\nof <a href="../Classes/Entity.html">entities</a>.\r\n<h2><a href="#" onClick="obj=document.getElementById( \'classes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Classes</a></h2>\r\n<table id="classes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="class_list"><a href="../Classes/Entity.html" class="class_list" >Entity</a></span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="class_list"><a href="../Classes/Proxy.html" class="class_list" >Proxy</a></span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addWatcher" class="function_list" >addWatcher</a>( path, dataType, getFunction ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#address" class="function_list" >address</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#MemoryStream" class="function_list" >MemoryStream</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#charge" class="function_list" >charge</a>( ordersID, dbID, byteDatas, pycallback ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createEntity" class="function_list" >createEntity</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createEntityAnywhere" class="function_list" >createEntityAnywhere</a>( entityType, *params, callback ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createEntityRemotely" class="function_list" >createEntityRemotely</a>( entityType, baseMB, *params, callback ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createEntityFromDBID" class="function_list" >createEntityFromDBID</a>( entityType, dbID, callback, dbInterfaceName ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createEntityAnywhereFromDBID" class="function_list" >createEntityAnywhereFromDBID</a>( entityType, dbID, callback, dbInterfaceName ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createEntityRemotelyFromDBID" class="function_list" >createEntityRemotelyFromDBID</a>( entityType, dbID, baseMB, callback, dbInterfaceName ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createEntityLocally" class="function_list" >createEntityLocally</a>( entityType, *params ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#debugTracing" class="function_list" >debugTracing</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#delWatcher" class="function_list" >delWatcher</a>( path ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#deleteEntityByDBID" class="function_list" >deleteEntityByDBID</a>( entityType, dbID, callback, dbInterfaceName ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#deregisterReadFileDescriptor" class="function_list" >deregisterReadFileDescriptor</a>( fileDescriptor ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#deregisterWriteFileDescriptor" class="function_list" >deregisterWriteFileDescriptor</a>( fileDescriptor ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#executeRawDatabaseCommand" class="function_list" >executeRawDatabaseCommand</a>( command, callback, threadID, dbInterfaceName ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#genUUID64" class="function_list" >genUUID64</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getResFullPath" class="function_list" >getResFullPath</a>( res ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getWatcher" class="function_list" >getWatcher</a>( path ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getWatcherDir" class="function_list" >getWatcherDir</a>( path ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getAppFlags" class="function_list" >getAppFlags</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#hasRes" class="function_list" >hasRes</a>( res ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#isShuttingDown" class="function_list" >isShuttingDown</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#listPathRes" class="function_list" >listPathRes</a>( path, extension ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#lookUpEntityByDBID" class="function_list" >lookUpEntityByDBID</a>( entityType, dbID, callback, dbInterfaceName ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#matchPath" class="function_list" >matchPath</a>( res ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#open" class="function_list" >open</a>( res, mode ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#publish" class="function_list" >publish</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#quantumPassedPercent" class="function_list" >quantumPassedPercent</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#registerReadFileDescriptor" class="function_list" >registerReadFileDescriptor</a>( fileDescriptor, callback ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#registerWriteFileDescriptor" class="function_list" >registerWriteFileDescriptor</a>( fileDescriptor, callback ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#reloadScript" class="function_list" >reloadScript</a>( fullReload ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#scriptLogType" class="function_list" >scriptLogType</a>( logType ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#setAppFlags" class="function_list" >setAppFlags</a>( flags ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#time" class="function_list" >time</a>( ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callback functions</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onBaseAppReady" class="function_list" >onBaseAppReady</a>( isBootstrap ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onBaseAppShutDown" class="function_list" >onBaseAppShutDown</a>( state ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onCellAppDeath" class="function_list" >onCellAppDeath</a>( addr ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onFini" class="function_list" >onFini</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onBaseAppData" class="function_list" >onBaseAppData</a>( key, value ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onBaseAppDataDel" class="function_list" >onBaseAppDataDel</a>( key ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onGlobalData" class="function_list" >onGlobalData</a>( key, value ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onGlobalDataDel" class="function_list" >onGlobalDataDel</a>( key ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onInit" class="function_list" >onInit</a>( isReload ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLoseChargeCB" class="function_list" >onLoseChargeCB</a>( orderID, dbID, success, datas ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onReadyForLogin" class="function_list" >onReadyForLogin</a>( isBootstrap ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onReadyForShutDown" class="function_list" >onReadyForShutDown</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onAutoLoadEntityCreate" class="function_list" >onAutoLoadEntityCreate</a>( entityType, dbID ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><a href="#LOG_ON_ACCEPT" class="attribute_list" >LOG_ON_ACCEPT</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_ON_REJECT" class="attribute_list" >LOG_ON_REJECT</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_ON_WAIT_FOR_DESTROY" class="attribute_list" >LOG_ON_WAIT_FOR_DESTROY</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_DBG" class="attribute_list" >LOG_TYPE_DBG</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_ERR" class="attribute_list" >LOG_TYPE_ERR</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_INFO" class="attribute_list" >LOG_TYPE_INFO</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_NORMAL" class="attribute_list" >LOG_TYPE_NORMAL</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#LOG_TYPE_WAR" class="attribute_list" >LOG_TYPE_WAR</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#NEXT_ONLY" class="attribute_list" >NEXT_ONLY</a></td><td> </td></tr>\r\n\r\n<tr valign=top><td><a href="#component" class="attribute_list" >component</a></td><td> Read-only <a href="STRING.html">string</a></td></tr>\r\n\r\n<tr valign=top><td><a href="#entities" class="attribute_list" >entities</a></td><td> <a href="Entities.html">Entities</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#baseAppData" class="attribute_list" >baseAppData</a></td><td> <a href="baseAppData.html">GlobalDataClient</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#globalData" class="attribute_list" >globalData</a></td><td> <a href="baseAppData.html">GlobalDataClient</a></td></tr>\r\n\r\n</table>\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="addWatcher"></a><p class="function_definition">\r\n<span class="function_definition">def addWatcher( <i>path, dataType, getFunction</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nInteracts with the debug monitoring system, allowing the user to register \r\na monitoring variable with the monitoring system.\r\n<br><br>\r\nExample:\r\n<br>\r\n\r\n<pre>\r\n>>> def countPlayers( ):\r\n>>> i = 0\r\n>>> for e in KBEngine.entities.values():\r\n>>> \tif e.__class__.__name__ == "Avatar":\r\n>>> \t\ti += 1\r\n>>> return i\r\n>>>\r\n>>> <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#addWatcher>addWatcher</a>( "players", "UINT32", countPlayers )\r\n</pre>\r\n<br><br>\r\nThis function adds a watch variable under the "scripts/players" watch path. \r\nThe function countPlayers is called when the watcher observes.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nCreate a monitored path.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dataType</i></span></td><td><span class="function_parameter_description">\r\nThe value type of the monitor variable. Reference: <a href=../../basetypes.html>Basic data types</a>\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>getFunction</i></span></td><td><span class="function_parameter_description">\r\nThis function is called when the observer retrieves the variable. This \r\nfunction returns a value representing a watch variable without arguments.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="address"></a><p class="function_definition">\r\n<span class="function_definition">def address( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReturns the address of the internal network interface.\r\n</div>\r\n\r\n\r\n\r\n\r\n<a name="MemoryStream"></a><p class="function_definition">\r\n<span class="function_definition">def MemoryStream( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReturns a new MemoryStream object.<br>\r\n<br>\r\nThe MemoryStreamobject stores binary information. This type is provided \r\nto allow the user to easily serialize and deserialize the Python base \r\ntypes following KBEngine underlying serialization rules.\r\n<br><br>\r\nFor example, you can use this object to construct a network packet that \r\nKBEngine can parse.\r\n<br><br>\r\nUsage:\r\n<pre>\r\n>>> s = KBEngine.MemoryStream()\r\n>>> s\r\n>>> b\'\'\r\n>>> s.append("UINT32", 1)\r\n>>> s.pop("UINT32")\r\n>>> 1\r\n</pre>\r\n<br><br>\r\nThe types that MemoryStream currently supports are only basic data types. \r\nReference: <a href=../../basetypes.html>Basic data types</a>\r\n</div>\r\n\r\n\r\n\r\n<a name="charge"></a><p class="function_definition">\r\n<span class="function_definition">def charge( <i>ordersID, dbID, byteDatas, pycallback</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nBilling interface.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>ordersID</i></span></td><td><span class="function_parameter_description">\r\nstring, order ID.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbID</i></span></td><td><span class="function_parameter_description">\r\nuint64, the <a href=../Classes/Entity.html#databaseID>databaseID</a> of \r\nthe entity.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>byteDatas</i></span></td><td><span class="function_parameter_description">\r\nbytes, with data, which is parsed and defined by the developer.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>pycallback</i></span></td><td><span class="function_parameter_description">\r\nBilling callback.<br>\r\nBilling callback prototype: (When calling KBEngine.chargeResponse in \r\ninterfaces, the callback is called if an order is set to callback)<br>\r\n def on*ChargeCB(self, orderID, dbID, success, datas):<br>\r\n ordersID: string, OrderID<br>\r\n dbID: uint64, usually the <a href=../Classes/Entity.html#databaseID>databaseID</a> of the entity.<br>\r\n success: bool, whether the order succeeded\r\n datas: bytes, with data, parsed and defined by the developer.<br>\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="createEntity"></a><p class="function_definition">\r\n<span class="function_definition">def createEntity( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\n<a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#createEntityLocally>createEntityLocally</a> \r\nalias.\r\n</div>\r\n\r\n<a name="createEntityAnywhere"></a><p class="function_definition">\r\n<span class="function_definition">def createEntityAnywhere( <i>entityType, params, callback</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCreate a new base <a href="../Classes/Entity.html">Entity</a>. The server \r\ncan choose any <a href="../index.html">Baseapp</a> to create an <a href="../Classes/Entity.html">Entity</a>.\r\n<br><br>\r\nThis method should be preferred over <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#createEntityLocally>createEntityLocally</a> \r\nso the server has the flexibility to choose a suitable <a href="../index.html">Baseapp</a> \r\nto create an entity.\r\n<br><br>\r\nThe function parameters need to provide the type of entity created, and there is \r\nalso a Python dictionary as a parameter to initialize the entities value.\r\n<br><br>\r\nThe Python dictionary does not require the user to provide all of the \r\nproperties, and the default values provided by the entity definition file \r\n".def" are defaults.\r\n<br><br>\r\nExample:<br>\r\n<pre>\r\nparams = {\r\n\t"name" : "kbe", # base, BASE_AND_CLIENT\r\n\t"HP" : 100,\t# cell, ALL_CLIENT, in cellData\r\n\t"tmp" : "tmp"\t# baseEntity.tmp\r\n}\r\n\r\ndef onCreateEntityCallback(entity)\r\n\tprint(entity)\r\n\r\ncreateEntityAnywhere("Avatar", params, onCreateEntityCallback)\r\n</pre>\r\n\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, specifies the type of <a href="../Classes/Entity.html">Entity</a> \r\nto create. Valid entity types are listed in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>params</i></span></td><td><span class="function_parameter_description">\r\noptional parameter, a Python dictionary object. If a specified key is an \r\n<a href="../Classes/Entity.html">Entity</a> attribute, its value will be \r\nused to initialize the properties of this <a href="../Classes/Entity.html">Entity</a>.\r\nIf the key is a <a href="Cell.html">Cell</a> attribute, it will be added \r\nto the \'<a href=../Classes/Entity.html#cellData>cellData</a>\' attribute \r\nof the <a href="../Classes/Entity.html">Entity</a>. This <a href=../Classes/Entity.html#cellData>cellData</a>\' \r\nattribute is a Python dictionary and will be used later to initialize the \r\nattributes of the cell entity.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nAn optional callback function that is called when the entity is created. \r\nThe callback function takes one argument, when the <a href="../Classes/Entity.html">Entity</a>\r\nis created successfully it is the entity\'s <a href=../../keywords.html#EntityCall>entityCall</a>, \r\non failure it is None.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nReturns the <a href=../../keywords.html#EntityCall>entityCall</a> of the \r\n<a href="../Classes/Entity.html">Entity</a> through the callback.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="createEntityRemotely"></a><p class="function_definition">\r\n<span class="function_definition">def createEntityRemotely( <i>entityType, baseMB, params, callback</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCreate a new <a href="../Classes/Entity.html">Entity</a> on the specified \r\nbaseapp through the baseMB parameter.\r\n<br><br>\r\n<a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#createEntityLocally>createEntityAnywhere</a> \r\nshould be preferred over this method to allow the server to decide which is the most suitable \r\n<a href="../index.html">Baseapp</a> to create the entity on for load balancing purposes.\r\n\r\n<br><br>\r\nThe function parameters need to provide the type of the created entity, \r\nand there is also a Python dictionary as a parameter to initialize the \r\nentity\'s value.\r\n<br><br>\r\n\r\nThis Python dictionary does not require the user to provide all of the \r\nproperties, and the default values provided by the entity definition \r\nfile ". def" are defaults.\r\n<br><br>\r\nExample:<br>\r\n<pre>\r\nparams = {\r\n\t"name" : "kbe", # base, BASE_AND_CLIENT\r\n\t"HP" : 100,\t# cell, ALL_CLIENT, in cellData\r\n\t"tmp" : "tmp"\t# baseEntity.tmp\r\n}\r\n\r\ndef onCreateEntityCallback(entity)\r\n\tprint(entity)\r\n\r\ncreateEntityRemotely("Avatar", baseEntityCall, params, onCreateEntityCallback)\r\n</pre>\r\n\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, specifies the type of <a href="../Classes/Entity.html">Entity</a> \r\nto create. Valid entity types are listed in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>baseMB</i></span></td><td><span class="function_parameter_description">\r\nBaseEntityCall which is a base <a href="../Classes/Entity.html">Entity</a> EntityCall.\r\nThe entity will be created on the baseapp process corresponding to this \r\nentity.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>params</i></span></td><td><span class="function_parameter_description">\r\nOptional parameters, a Python dictionary object. If a specified key is an \r\n<a href="../Classes/Entity.html">Entity</a> attribute, its value will be \r\nused to initialize the properties of this <a href="../Classes/Entity.html">Entity</a>. \r\nIf this key is a <a href="Cell.html">Cell</a> attribute, it will be added \r\nto the <a href="../Classes/Entity.html">Entity</a>\'s \'<a href=../Classes/Entity.html#cellData>cellData</a>\' \r\nattribute. This \'<a href=../Classes/Entity.html#cellData>cellData</a>\' \r\nattribute is a Python dictionary and will be used later to initialize \r\nthe attributes of the cell entity.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nAn optional callback function that is called when the entity is created. \r\nThe callback takes one argument, on success it is an <a href="../Classes/Entity.html">Entity</a>\u5b9e\u4f53\u7684<a href=../../keywords.html#EntityCall>entityCall</a>, \r\non failure it is None.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nReturns the <a href="../Classes/Entity.html">Entity</a>\'s <a href=../../keywords.html#EntityCall>entityCall</a> \r\nthrough the callback.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="createEntityFromDBID"></a><p class="function_definition">\r\n<span class="function_definition">def createEntityFromDBID( <i>entityType, dbID, callback, dbInterfaceName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCreate an <a href="../Classes/Entity.html">Entity</a> by loading data \r\nfrom the database. The new <a href="../Classes/Entity.html">Entity</a> will \r\nbe created on the <a href="../index.html">Baseapp</a> that called this function. \r\nIf the <a href="../Classes/Entity.html">Entity</a> has been checked out \r\nfrom the database, a reference to this existing entity will be returned.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, specifies the <a href="../Classes/Entity.html">Entity</a> type to \r\nload. Valid entity types are listed in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbID</i></span></td><td><span class="function_parameter_description">\r\nSpecifies the database ID of the entity to create. The database ID of this \r\nentity is stored in the entity\'s <a href=../Classes/Entity.html#databaseID>databaseID</a> \r\nattribute.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nAn optional callback function that is called when the operation is complete. \r\nThe callback function has three parameters: baseRef, databaseID, and wasActive. \r\nIf the operation is successful, baseRef will be an <a href=../../keywords.html#EntityCall>entityCall</a> \r\nor a direct reference to the newly created <a href="../Classes/Entity.html">Entity</a>. \r\nThe databaseID will be the database ID of the entity. wasActive will be \r\nTrue if baseRef is a reference to an already existing entity (checked out \r\nfrom the database). If the operation fails the three parameters will be \r\nbaseRef - None, databaseID - 0, wasActive - False.\r\n<br>\r\nThe most common reason for failure is that the entity does not exist in \r\nthe database, but occasionally other errors such as timeouts or ID \r\nallocation failure.\r\n\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbInterfaceName</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, specified by a database interface, and the \r\n"default" interface is used by default. Database interfaces are defined \r\nin kbengine_defaults.xml->dbmgr->databaseInterfaces.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="createEntityAnywhereFromDBID"></a><p class="function_definition">\r\n<span class="function_definition">def createEntityAnywhereFromDBID( <i>entityType, dbID, callback, dbInterfaceName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCreate an <a href="../Classes/Entity.html">Entity</a> by loading data \r\nfrom the database. The server may choose any <a href="../index.html">Baseapp</a> \r\nto create the <a href="../Classes/Entity.html">Entity</a>.\r\n<br><br>\r\nUsing this function will help BaseApps load balance.\r\n<br><br>\r\nIf the entity has been checked out from the database, a reference to the \r\nexisting <a href="../Classes/Entity.html">Entity</a> will be returned. \r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, specifies the <a href="../Classes/Entity.html">Entity</a> type to \r\nload. Valid entity types are listed in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbID</i></span></td><td><span class="function_parameter_description">\r\nSpecifies the database ID of the entity to create. The database ID of this \r\nentity is stored in the entity\'s <a href=../Classes/Entity.html#databaseID>databaseID</a> \r\nattribute.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nAn optional callback function that is called when the operation is complete. \r\nThe callback function has three parameters: baseRef, databaseID, and wasActive. \r\nIf the operation is successful, baseRef will be an <a href=../../keywords.html#EntityCall>entityCall</a> \r\nor a direct reference to the newly created <a href="../Classes/Entity.html">Entity</a>. \r\nThe databaseID will be the database ID of the entity. wasActive will be \r\nTrue if baseRef is a reference to an already existing entity (checked out \r\nfrom the database). If the operation fails the three parameters will be \r\nbaseRef - None, databaseID - 0, wasActive - False.\r\n<br>\r\nThe most common reason for failure is that the entity does not exist in \r\nthe database, but occasionally other errors such as timeouts or ID \r\nallocation failure.\r\n\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbInterfaceName</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, specified by a database interface, and the \r\n"default" interface is used by default. Database interfaces are defined \r\nin kbengine_defaults.xml->dbmgr->databaseInterfaces.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe <a href="../Classes/Entity.html">Entity</a>\'s <a href=../../keywords.html#EntityCall>entityCall</a> \r\nthrough the callback.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="createEntityRemotelyFromDBID"></a><p class="function_definition">\r\n<span class="function_definition">def createEntityRemotelyFromDBID( <i>entityType, dbID, baseMB, callback, dbInterfaceName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nLoad data from the database and create an <a href="../Classes/Entity.html">Entity</a> \r\non the baseapp specified via the baseMB parameter.\r\n<br><br>\r\nIf the entity has been checked out from the database, a reference to the \r\nexisting <a href="../Classes/Entity.html">Entity</a> will be returned.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, specifies the <a href="../Classes/Entity.html">Entity</a> type to \r\nload. Valid entity types are listed in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbID</i></span></td><td><span class="function_parameter_description">\r\nSpecifies the database ID of the entity to create. The database ID of this \r\nentity is stored in the entity\'s <a href=../Classes/Entity.html#databaseID>databaseID</a> \r\nattribute.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nAn optional callback function that is called when the operation is complete. \r\nThe callback function has three parameters: baseRef, databaseID, and wasActive. \r\nIf the operation is successful, baseRef will be an <a href=../../keywords.html#EntityCall>entityCall</a> \r\nor a direct reference to the newly created <a href="../Classes/Entity.html">Entity</a>. \r\nThe databaseID will be the database ID of the entity. wasActive will be \r\nTrue if baseRef is a reference to an already existing entity (checked out \r\nfrom the database). If the operation fails the three parameters will be \r\nbaseRef - None, databaseID - 0, wasActive - False.\r\n<br>\r\nThe most common reason for failure is that the entity does not exist in \r\nthe database, but occasionally other errors such as timeouts or ID \r\nallocation failure.\r\n\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbInterfaceName</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, specified by a database interface, and the \r\n"default" interface is used by default. Database interfaces are defined \r\nin kbengine_defaults.xml->dbmgr->databaseInterfaces.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nReturns the <a href="../Classes/Entity.html">Entity</a>\'s <a href=../../keywords.html#EntityCall>entityCall</a> \r\nthrough the callback.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="createEntityLocally"></a><p class="function_definition">\r\n<span class="function_definition">def createEntityLocally( <i>entityType, params</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCreate a new <a href="../Classes/Entity.html">Entity</a>. \r\nThe function parameters need to provide the type of the created entity, \r\nand there is also an optional Python dictionary as paramater to initialize \r\nthe entity\'s values.\r\n<br><br>\r\nThe Python dictionary does not require the user to provide all of the properties, and the default values provided by the entity definition file ".def" are defaults.\r\n<br><br>\r\n<a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#createEntityLocally>createEntityAnywhere</a> \r\nshould be preferred over this method to allow the server to decide which is the most suitable \r\n<a href="../index.html">Baseapp</a> to create the entity on for load balancing purposes.\r\n<br><br>\r\nIt should be noted that this method returns the entity instantly without \r\na callback, and is also guaranteed to return a direct reference to the <a href=../Classes/Entity.html>Entity</a> object, \r\nrather than its <a href=../../keywords.html#EntityCall>EntityCall</a>. \r\nIt is suitable to use this method over <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#createEntityAnywhere>createEntityAnywhere</a> \r\nwhen you need to manage the entities life cycle (such as control when \r\ndestroy is called on the entity) or access the entities attributes from \r\nthe creating entity, because as described in the <a href=../../keywords.html#EntityCall>EntityCall</a> \r\ndocumentation, it is not possible to access attributes or call methods not \r\nlisted in the entity\'s def file using the <a href=../../keywords.html#EntityCall>EntityCall</a>. \r\nThis method is also necessary to use when you need a direct reference to an entity \r\n(as it\'s not possible to get one on a different baseapp). Many functions take \r\nan EntityCall as a parameter, but some require a direct reference to the \r\nentity (such as <a href=../Classes/Proxy.html>Proxy</a>.<a href=../Classes/Proxy.html#giveClientTo>giveClientTo</a>).\r\n<br><br>\r\nExample:<br>\r\n<pre>\r\nparams = {\r\n\t"name" : "kbe", # base, BASE_AND_CLIENT\r\n\t"HP" : 100,\t# cell, ALL_CLIENT, in cellData\r\n\t"tmp" : "tmp"\t# baseEntity.tmp\r\n}\r\n\r\nbaseEntity = createEntityLocally("Avatar", params)\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, specifies the type of entity to create. Valid entity types are \r\nlisted in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>params</i></span></td><td><span class="function_parameter_description">\r\noptional parameter, a Python dictionary object. If a specified key is an \r\n<a href="../Classes/Entity.html">Entity</a> attribute, its value will be \r\nused to initialize the properties of this <a href="../Classes/Entity.html">Entity</a>.\r\nIf the key is a <a href="Cell.html">Cell</a> attribute, it will be added \r\nto the \'<a href=../Classes/Entity.html#cellData>cellData</a>\' attribute \r\nof the <a href="../Classes/Entity.html">Entity</a>. This <a href=../Classes/Entity.html#cellData>cellData</a>\' \r\nattribute is a Python dictionary and will be used later to initialize the \r\nattributes of the cell entity.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>The newly created <a href="../Classes/Entity.html">Entity</a>.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="debugTracing"></a><p class="function_definition">\r\n<span class="function_definition">def debugTracing( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nOutputs the Python extended object counter currently tracked by KBEngine.<br>\r\nExtended objects include: fixed dictionary, fixed array, Entity, EntityCall...<br>\r\nIf the counter is not zero when the server is shut down normally, it means \r\nthat the leak already exists and the log will output an error message.<br><br>\r\nERROR cellapp [0x0000cd64] [2014-11-12 00:38:07,300] - PyGC::debugTracing(): FixedArray : leaked(128)<br>\r\nERROR cellapp [0x0000cd64] [2014-11-12 00:38:07,300] - PyGC::debugTracing(): EntityCall : leaked(8)\r\n</div>\r\n\r\n\r\n\r\n<a name="delWatcher"></a><p class="function_definition">\r\n<span class="function_definition">def delWatcher( <i>path</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nInteracts with the debug monitoring system, allowing users to delete \r\nmonitored variables in the script.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nThe path to the variable to delete.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="deleteEntityByDBID"></a><p class="function_definition">\r\n<span class="function_definition">def deleteEntityByDBID( <i>entityType, dbID, callback, dbInterfaceName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nDeletes the specified entity (including the child table data generated \r\nby the attribute) from the database. If the entity is not checked out \r\nfrom the database, the deletion is successful. If the entity has been \r\nchecked out from the database, <a href="KBEngine.html">KBEngine</a> will fail to delete and return the \r\n<a href="../Classes/Entity.html">Entity</a>\'s <a href=../../keywords.html#EntityCall>entityCall</a> \r\nin the callback.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, specifies the type of Entity to delete. Valid entity types are \r\nlisted in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbID</i></span></td><td><span class="function_parameter_description">\r\nSpecifies the database ID of the entity to delete. The database ID of the \r\nentity is stored in the entity\'s databaseID attribute.<a href=../Classes/Entity.html#databaseID>databaseID</a>\u5c5e\u6027\u3002\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nAn optional callback, with only one parameter. When the entity has not \r\nbeen checked out from the database it will be deleted successfully and \r\nthe parameter will be True. If the entity has been checked out from the \r\ndatabase then the parameter is the <a href="../Classes/Entity.html">Entity</a>\'s <a href=../../keywords.html#EntityCall>entityCall</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbInterfaceName</i></span></td><td><span class="function_parameter_description">\r\nString, optional parameter, specifies a database interface. By default it \r\nuses the "default" interface. Database interfaces are defined by kbengine_defaults.xml->dbmgr->databaseInterfaces.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="deregisterReadFileDescriptor"></a><p class="function_definition">\r\n<span class="function_definition">def deregisterReadFileDescriptor( <i>fileDescriptor</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nUnregisters the callback registered with <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#registerReadFileDescriptor>registerReadFileDescriptor</a>.\r\n<br>\r\n<br>\r\nExample:<br>\r\n<a href=http://www.kbengine.org/assets/other/py/Poller.py>http://www.kbengine.org/assets/other/py/Poller.py</a>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fileDescriptor</i></span></td><td><span class="function_parameter_description">\r\nsocket descriptor/file descriptor\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="deregisterWriteFileDescriptor"></a><p class="function_definition">\r\n<span class="function_definition">def deregisterWriteFileDescriptor( <i>fileDescriptor</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nUnregisters the callback registered with <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#registerWriteFileDescriptor>registerWriteFileDescriptor</a>.\r\n<br>\r\n<br>\r\nExample:<br>\r\n<a href=http://www.kbengine.org/assets/other/py/Poller.py>http://www.kbengine.org/assets/other/py/Poller.py</a>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fileDescriptor</i></span></td><td><span class="function_parameter_description">\r\nsocket descriptor/file descriptor.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="executeRawDatabaseCommand"></a><p class="function_definition">\r\n<span class="function_definition">def executeRawDatabaseCommand( <i>command, callback, threadID, dbInterfaceName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis script function executes a database command on the database, which \r\nis directly parsed by the relevant database.\r\n<br><br>\r\nPlease note that using this function to modify entity data may not be \r\neffective because if the entity has been checked out, the modified data \r\nwill still be archived by the entity and cause overwriting.<br>\r\nThis function is strongly not recommended for reading or modifying entity data.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>command</i></span></td><td><span class="function_parameter_description">\r\nThis database command will be different for different database configuration \r\nscenarios. For a MySQL database it is an SQL query.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td>\r\n<td><p class="function_parameter_description">\r\nOptional parameter, callback object (for example, a function) called \r\nback with the command execution result. <br>\r\nThis callback has 4 parameters: result set, number of rows affected, \r\nauto value, error message.<br>\r\nExample:<br>\r\ndef sqlcallback(result, rows, insertid, error):\r\n print(result, rows, insertid, error)\r\n<br><br>\r\n\r\nAs the above example shows, the result parameter corresponds to the \r\n"result set", and the result set parameter is a row List. Each line is a \r\nlist of strings containing field values. If the command execution does not \r\nreturn a result set (for example, a DELETE command), or the command \r\nexecution encounters an error, the result set is None.\r\n<br><br>\r\n\r\nThe rows parameter is the "number of rows affected", which is an integer \r\nindicating the number of rows affected by the command execution. This \r\nparameter is only relevant for commands that do not return results \r\n(such as DELETE).<br>\r\nThis parameter is None if there is a result set return or if there is an \r\nerror in the command execution.\r\n<br><br>\r\n\r\nThe insertid is a long value, similar to an entity\'s databaseID. When \r\nsuccessfully inserting data int a table with an auto long type field, it \r\nreturns the data at the time of insertion. <br>\r\nMore information can be found in mysql\'s mysql_insert_id() method. In \r\naddition, this parameter is only meaningful when the database type is \r\nmysql.\r\n<br><br>\r\n\r\nError corresponds to the "error message", when the command execution \r\nencounters an error, this parameter is a string describing the error. \r\nThis parameter is None when the command execution has not occurred.\r\n</p></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>threadID</i></span></td><td><span class="function_parameter_description">\r\nint32, optional parameter, specifies a thread to process this command. \r\nUsers can use this parameter to control the execution order of certain \r\ncommands (dbmgr is multi-threaded). The default is not specified. If threadId \r\nis the ID of an entity, it will be added to the entity\'s archive queue \r\nand written by the thread one by one.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbInterfaceName</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, specifies a database interface. By default it \r\nuses the "default" interface. Database interfaces are defined by kbengine_defaults.xml->dbmgr->databaseInterfaces.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="genUUID64"></a><p class="function_definition">\r\n<span class="function_definition">def genUUID64( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function generates a 64-bit unique ID.<br>\r\nNote: This function depends on the baseapp server process startup parameter \r\n\'gus\'. Please set the startup parameters to be unique.<br>\r\nIn addition, if gus exceeds 65535, this function can only remain unique \r\nfor the current process.\r\n<br>\r\n<br>\r\nUsage:<br>\r\nUnique IDs can be generated on multiple service processes and do not \r\nconflict.<br>\r\nA room ID can be generated on multiple service processes and no \r\nuniqueness verification is required.<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nReturns a 64-bit integer.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="getResFullPath"></a><p class="function_definition">\r\n<span class="function_definition">def getResFullPath( <i>res</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet the absolute path of a resource.\r\n<br>Note: Resource must be accessible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, the relative path of the resource\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nstring, if there is an absolute path to the given resource, otherwise \r\nreturns null.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="getWatcher"></a><p class="function_definition">\r\n<span class="function_definition">def getWatcher( <i>path</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGets the value of a watch variable from the KBEngine debugging system.\r\n<br>\r\n<br>\r\nExample: In the Python console of baseapp1: <br>\r\n>>>KBEngine.getWatcher("/root/stats/runningTime")\r\n<br>\r\n12673648533\r\n<br>\r\n<br>\r\n>>>KBEngine.getWatcher("/root/scripts/players")\r\n<br>\r\n32133\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nstring, the absolute path of the variable including the variable name \r\n(can be viewed on the GUIConsole watcher page).\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe value of the variable.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="getWatcherDir"></a><p class="function_definition">\r\n<span class="function_definition">def getWatcherDir( <i>path</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet a list of elements (directories, variable names) under the watch \r\ndirectory from the KBEngine debugging system.\r\n<br>\r\n<br>\r\nExample: In the Python console of baseapp1 enter:<br>\r\n>>>KBEngine.getWatcher("/root")\r\n<br>\r\n(\'stats\', \'objectPools\', \'network\', \'syspaths\', \'ThreadPool\', \'cprofiles\', \'scripts\', \'numProxices\', \'componentID\', \'componentType\', \'uid\', \'numClients\', \'globalOrder\', \'username\', \'load\', \'gametime\', \'entitiesSize\', \'groupOrder\')\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nstring, the absolute path to this variable (can be viewd on the GUIConsole \r\nwatcher page).\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nMonitors the list of elements in the directory (directory, variable name).\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getAppFlags"></a><p class="function_definition">\r\n<span class="function_definition">def getAppFlags( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet the flags of the current engine APP, Reference: <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#setAppFlags>setAppFlags</a>.\r\n<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nKBEngine.APP_FLAGS_*\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="hasRes"></a><p class="function_definition">\r\n<span class="function_definition">def hasRes( <i>res</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nUse this interface to determine if a relative path exists.<br>\r\nNote: Resource must be accessible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n<br>\r\n<br>\r\nExample:\r\n<br>\r\n<br>\r\n>>>KBEngine.hasRes("scripts/entities.xml")\r\n<br>\r\nTrue\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, the relative path of the resource\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nbool, True if relative path exists, otherwise False.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n\r\n<a name="isShuttingDown"></a><p class="function_definition">\r\n<span class="function_definition">def isShuttingDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReturns whether the server is shutting down.<br>\r\nAfter the <a href=KBEngine.html#onBaseAppShutDown>onBaseAppShutDown(state=0)</a> \r\nis called, this function returns True.\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nTrue if the server is shutting down, otherwise False.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="listPathRes"></a><p class="function_definition">\r\n<span class="function_definition">def listPathRes( <i>path, extension</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet a list of resources in a resource directory<br>\r\nNote: Resources must be accessible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n<br>\r\n<br>\r\nExample:\r\n<br>\r\n<br>\r\n>>>KBEngine.listPathRes("scripts/cell/interfaces")\r\n<br>\r\n(\'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/AI.py\', \'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/New Text Document.txt\')\r\n<br><br>\r\n>>>KBEngine.listPathRes("scripts/cell/interfaces", "txt")\r\n<br>\r\n(\'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/New Text Document.txt\')\r\n<br><br>\r\n>>>KBEngine.listPathRes("scripts/cell/interfaces", "txt|py")\r\n<br>\r\n(\'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/AI.py\', \'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/New Text Document.txt\')\r\n<br><br>\r\n>>>KBEngine.listPathRes("scripts/cell/interfaces", ("txt", "py"))\r\n<br>\r\n(\'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/AI.py\', \'/home/kbe/kbengine/demo/res/scripts/cell/interfaces/New Text Document.txt\')\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, the relative path of the resource directory\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>extension</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, file extension to filter by\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nTuple, resource list.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="lookUpEntityByDBID"></a><p class="function_definition">\r\n<span class="function_definition">def lookUpEntityByDBID( <i>entityType, dbID, callback, dbInterfaceName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nQueries whether an entity is checked out of the database, and if the \r\nentity has been checked out of the database, <a href="KBEngine.html">KBEngine</a>\r\nwill return the <a href="../Classes/Entity.html">Entity</a>\'s <a href=../../keywords.html#EntityCall>entityCall</a> \r\nin the callback.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, specifies the type of Entity to query. Valid entity types are \r\nlisted in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbID</i></span></td><td><span class="function_parameter_description">\r\nSpecifies the database ID of the <a href="../Classes/Entity.html">Entity</a> \r\nto be queried. The database ID is stored in the entity\'s <href=../Classes/Entity.html#databaseID>databaseID</a> \r\nattribute.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nA callback with one parameter, True when the entity is not checked out \r\nfrom the database, if it is checked out then it is the <a href="../Classes/Entity.html">Entity</a>\'s <a href=../../keywords.html#EntityCall>entityCall</a>. \r\nFalse in any other case.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbInterfaceName</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, specifies a database interface. Uses the \r\n"default" interface by default. Database interfaces are defined in kbengine_defaults.xml->dbmgr->databaseInterfaces.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="matchPath"></a><p class="function_definition">\r\n<span class="function_definition">def matchPath( <i>res</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet the absolute path of a resource from its relative path.<br>\r\nNote: Resources must be accessible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n<br>\r\n<br>\r\nExamples:\r\n<br>\r\n<br>\r\n>>>KBEngine.matchPath("scripts/entities.xml")<br>\r\n\'/home/kbe/kbengine/demo/res/scripts/<a href=../../keywords.html#entities.xml>entities.xml</a>\'\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, the relative path of the resource (including its name).\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nstring, the absolute path of the resource.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="open"></a><p class="function_definition">\r\n<span class="function_definition">def open( <i>res, mode</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nUse this function to open resources with their relative paths.<br>\r\nNote: Resource must be accessible under <a href=../../keywords.html#KBE_RES_PATH>KBE_RES_PATH</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>res</i></span></td><td><span class="function_parameter_description">\r\nstring, the relative path of the resource.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>mode</i></span></td><td><span class="function_parameter_description">\r\nstring, file operation mode:<br>\r\nw Open in write mode,<br>\r\na Open in append mode (Start from EOF, create new file if necessary) <br>\r\nr+ Open <br>\r\nw+ in read/write mode Open in read/write mode (see w) <br>\r\na+ Open in read/write mode (See a) <br>\r\nrb Opens <br>\r\nwb in binary read mode Opens in binary write mode (see w) <br>\r\nab Opens in binary append mode (see a) <br>\r\nrb+ Opens in binary read and write mode (see r+) <br>\r\nwb+ Opens in binary read and write mode (see w+ ) <br>\r\nab+ opens in binary read/write mode (see a+) <br>\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="publish"></a><p class="function_definition">\r\n<span class="function_definition">def publish( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function returns the server\'s current release mode.\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nint8, 0: debug, 1: release, others can be customized.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="quantumPassedPercent"></a><p class="function_definition">\r\n<span class="function_definition">def quantumPassedPercent( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReturns the percentage of the current tick that takes one clock cycle.\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nReturns the percentage of the current tick that takes one clock cycle.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="registerReadFileDescriptor"></a><p class="function_definition">\r\n<span class="function_definition">def registerReadFileDescriptor( <i>fileDescriptor, callback</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegisters a callback function that is called when the file descriptor is \r\nreadable.\r\n<br>\r\n<br>\r\nExample:<br>\r\n<a href=http://www.kbengine.org/assets/other/py/Poller.py>http://www.kbengine.org/assets/other/py/Poller.py</a>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fileDescriptor</i></span></td><td><span class="function_parameter_description">\r\nsocket descriptor/file descriptor.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nA callback function with the socket descriptor/file descriptor as its only \r\nparameter.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="registerWriteFileDescriptor"></a><p class="function_definition">\r\n<span class="function_definition">\r\ndef registerWriteFileDescriptor( <i>fileDescriptor, callback</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegisters a callback function that is called when the socket descriptor/file \r\ndescriptor is writable.\r\n<br>\r\n<br>\r\nExample:<br>\r\n<a href=http://www.kbengine.org/assets/other/py/Poller.py>http://www.kbengine.org/assets/other/py/Poller.py</a>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fileDescriptor</i></span></td><td><span class="function_parameter_description">\r\nsocket descriptor/file descriptor\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nA callback function with the socket descriptor/file descriptor as its only parameter.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="reloadScript"></a><p class="function_definition">\r\n<span class="function_definition">def reloadScript( <i>fullReload</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nReloads Python modules related to entity and custom data types. The \r\ncurrent entity\'s class is set to the newly loaded class. This method \r\nshould only be used for development mode and not for product mode. The \r\nfollowing points should be noted:\r\n<br><br>\r\n1) The overloaded script can only be executed on <a href="../index.html">Baseapp</a>, \r\nand the user should ensure that all server components are loaded.\r\n<br><br>\r\n2) The custom type should ensure that the objects already instantiated in \r\nmemory are updated after the script is reloaded. Here is an example:\r\n<br><br>\r\n\r\n<pre>for e in <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#entities>entities</a>.values():\r\n if type( e ) is Avatar.Avatar:\r\n e.customData.__class__ = CustomClass\r\n</pre>\r\nWhen this mehod completes, <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onInit>onInit</a>( True ) \r\nis called.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>fullReload</i></span></td><td><span class="function_parameter_description">\r\nbool, optional parameter that specifies whether to reload entity definitions \r\nat the same time. If this parameter is False, the entity definition will \r\nnot be reloaded. The default is True.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>True if the reload succeeds, otherwise False.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="scriptLogType"></a><p class="function_definition">\r\n<span class="function_definition">def scriptLogType( <i>logType</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nSet the type of information output by the current Python.print (Reference: KBEngine.LOG_TYPE_*).\r\n</div>\r\n\r\n\r\n\r\n<a name="setAppFlags"></a><p class="function_definition">\r\n<span class="function_definition">def setAppFlags( <i>flags</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nSet the flags of the current engine APP.\r\n<br>\r\n<br>\r\nKBEngine.APP_FLAGS_NONE // Default (not set)<br>\r\nKBEngine.APP_FLAGS_NOT_PARTCIPATING_LOAD_BALANCING //Do not participate in load balancing<br>\r\n<br>\r\nExample:<br>\r\nKBEngine.setAppFlags(KBEngine.APP_FLAGS_NOT_PARTCIPATING_LOAD_BALANCING | KBEngine.APP_FLAGS_*)\r\n</div>\r\n\r\n\r\n<a name="time"></a><p class="function_definition">\r\n<span class="function_definition">def time( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis method returns the current game time (number of cycles).\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nuint32, the time of the current game. This refers to the number of cycles. \r\nThe period is affected by the frequency. The frequency is determined by \r\nthe configuration file <a href=../../keywords.html#kbengine.xml>kbengine.xml</a> or <a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->gameUpdateHertz.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n<a name="onBaseAppReady"></a><p class="function_definition">\r\n<span class="function_definition">def onBaseAppReady( <i>isBootstrap</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis callback function is called when the current <a href="../index.html">Baseapp</a> \r\nprocess is ready.<br>\r\nNote: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>isBootstrap</i></span></td><td><span class="function_parameter_description">\r\nbool, True if this is the first <a href="../index.html">Baseapp</a> started\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onBaseAppShutDown"></a><p class="function_definition">\r\n<span class="function_definition">def onBaseAppShutDown( <i>state</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe <a href="../index.html">Baseapp</a> shutdown procedure will call \r\nthis function. <br>\r\nNote: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>state</i></span></td><td><span class="function_parameter_description">\r\nIf state is 0, it means that it is before all clients are disconnected, \r\nif state is 1, it means that it is before all entities are written to the database, \r\nif state is 2, it mean all entities have been written to the database.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onCellAppDeath"></a><p class="function_definition">\r\n<span class="function_definition">def onCellAppDeath( <i>addr</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis callback function will be called on the death of a cellapp.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>addr</i></span></td><td><span class="function_parameter_description">\r\nDead cellapp address.<br>\r\ntuple:(ip, port) Network byte order\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onFini"></a><p class="function_definition">\r\n<span class="function_definition">def onFini( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis callback function is called after the engine is officially shut down. \r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<a name="onBaseAppData"></a><p class="function_definition">\r\n<span class="function_definition">def onBaseAppData( <i>key, value</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when KBEngine.baseAppData changes.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nThe key of the changed data.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>value</i></span></td><td><span class="function_parameter_description">\r\nThe value of the changed data.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onBaseAppDataDel"></a><p class="function_definition">\r\n<span class="function_definition">def onBaseAppDataDel( <i>key</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when KBEngine.baseAppData is deleted.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nDeleted data key\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onGlobalData"></a><p class="function_definition">\r\n<span class="function_definition">def onGlobalData( <i>key, value</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when KBEngine.globalData changes.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nThe key of the changed data\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>value</i></span></td><td><span class="function_parameter_description">\r\nThe value of the changed data\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onGlobalDataDel"></a><p class="function_definition">\r\n<span class="function_definition">def onGlobalDataDel( <i>key</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when KBEngine.globalData is deleted.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nDeleted data key.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onInit"></a><p class="function_definition">\r\n<span class="function_definition">def onInit( <i>isReload</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back after all scripts have been initialized after \r\nthe engine started.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>isReload</i></span></td><td><span class="function_parameter_description">\r\nbool, whether it was triggered after rewriting the loading script.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onLoseChargeCB"></a><p class="function_definition">\r\n<span class="function_definition">def onLoseChargeCB( <i>orderID, dbID, success, datas</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when <a href=../../interfaces/Modules/KBEngine.html>KBEngine</a>.<a href=../../interfaces/Modules/KBEngine.html#chargeResponse>chargeResponse</a> is called in \r\nand the order is lost or unknown.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>ordersID</i></span></td><td><span class="function_parameter_description">\r\nstring, order ID.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbID</i></span></td><td><span class="function_parameter_description">\r\nuint64, the database ID of the entity, see: <a href=../Classes/Entity.html#databaseID>Entity.databaseID</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>success</i></span></td><td><span class="function_parameter_description">\r\nbool, is it successful?\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>datas</i></span></td><td><span class="function_parameter_description">\r\nbytes, with information\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="onReadyForLogin"></a><p class="function_definition">\r\n<span class="function_definition">def onReadyForLogin( <i>isBootstrap</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nWhen the engine is started and initialized, it will always call this function \r\nto ask whether the script layer is ready. If the script layer is ready, \r\nloginapp allows the client to log in.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>isBootstrap</i></span></td><td><span class="function_parameter_description">\r\nbool, True if this is the first <a href="../index.html">Baseapp</a> started.\r\n</span></td></tr>\r\n\r\n\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>If the return value is greater than or equal to 1.0, the script \r\nlayer is ready; otherwise, return a value from 0 to less than 1.0.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onReadyForShutDown"></a><p class="function_definition">\r\n<span class="function_definition">def onReadyForShutDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this callback function is implemented in the script, it is called when \r\nthe process is ready to exit.<br><br>\r\n\r\nYou can use this callback to control when the process exits.<br>\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nbool if it returns True, it allows the process to exit. Returning other \r\nvalues will cause the process to ask again after a period of time.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onAutoLoadEntityCreate"></a><p class="function_definition">\r\n<span class="function_definition">def onAutoLoadEntityCreate( <i>entityType, dbID</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCalled when an automatically loaded entity is created. If the script layer \r\nimplements this callback, the entity is created by the script layer, \r\notherwise the engine defaults to create the entity using \r\ncreateEntityAnywhereFromDBID.<br><br>\r\n\r\nThis callback is envoked because <a href=../Classes/Entity.html#writeToDB>Entity.writeToDB</a> \r\nwas set to automatically load the entity.\r\n<br>Note: this callback takes precedence over onBaseAppReady execution \r\nand can be checked for onBaseAppReady when the entity is loaded.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityType</i></span></td><td><span class="function_parameter_description">\r\nstring, specifies the type of entity to query. Valid entity types are listed in <res><a href=../../keywords.html#entities.xml>/scripts/entities.xml</a>.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbID</i></span></td><td><span class="function_parameter_description">\r\nspecifies the database ID of the <a href="../Classes/Entity.html">Entity</a> \r\nto be queried. The database ID of this entity is stored in the entity\'s <a href=../Classes/Entity.html#databaseID>databaseID</a> attribute.\r\n</span></td></tr>\r\n\r\n\r\n\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<hr>\r\n<h2>Attributes documentation</h2>\r\n\r\n<a name="LOG_ON_ACCEPT"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_ON_ACCEPT</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis constant is returned by <a href="../Classes/Proxy.html">Proxy</a>.<a href=../Classes/Proxy.html#onLogOnAttempt>onLogOnAttempt</a>, \r\nand means that the new client is allowed to bind to a <a href="../Classes/Proxy.html">Proxy entity</a>.<br>\r\nIf the <a href="../Classes/Proxy.html">Proxy entity</a> already has a \r\nclient binding, the previous client will be kicked out.\r\n</div>\r\n\r\n<a name="LOG_ON_REJECT"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_ON_REJECT</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis constant is returned by <a href="../Classes/Proxy.html">Proxy</a>.<a href=../Classes/Proxy.html#onLogOnAttempt>onLogOnAttempt</a>, \r\nwhich means that the current client is bound to the <a href="../Classes/Proxy.html">Proxy entity.</a>\r\n</div>\r\n\r\n<a name="LOG_ON_WAIT_FOR_DESTROY"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_ON_WAIT_FOR_DESTROY</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis constant is returned by <a href="../Classes/Proxy.html">Proxy</a>.<a href=../Classes/Proxy.html#onLogOnAttempt>onLogOnAttempt</a>. \r\nThe current requesting client will wait until the <a href="../Classes/Proxy.html">Proxy entity</a> \r\nis completely destroyed and the underlying layer will complete the \r\nsubsequent binding process. Before this returns, <a href="../Classes/Proxy.html">Proxy</a>.<a href=../Classes/Entity.html#destroy>destroy</a> or <a href="../Classes/Proxy.html">Proxy</a>.<a href=../Classes/Entity.html#destroyCellEntity>destroyCellEntity</a>\r\nshould be invoked.\r\n</div>\r\n\r\n<a name="LOG_TYPE_DBG"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_DBG</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is debug.<br>\r\nSet by <a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="LOG_TYPE_ERR"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_ERR</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is error.<br>\r\nSet by<a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="LOG_TYPE_INFO"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_INFO</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is general information.<br>\r\nSet by <a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="LOG_TYPE_NORMAL"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_NORMAL</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is normal.<br>\r\nSet by <a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="LOG_TYPE_WAR"></a><p class="attribute_definition">\r\n<span class="attribute_definition">LOG_TYPE_WAR</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe log output type is warning.<br>\r\nSet by <a href=#scriptLogType>scriptLogType</a>.\r\n</div>\r\n\r\n<a name="NEXT_ONLY"></a><p class="attribute_definition">\r\n<span class="attribute_definition">NEXT_ONLY</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis constant is used for the <a href="../Classes/Entity.html#shouldAutoBackup">Entity.shouldAutoBackup</a> and <a href="../Classes/Entity.html#shouldAutoArchive">Entity.shouldAutoArchive</a> \r\nattributes and means that the entity is backed up automatically next time \r\nit is deemed acceptable, and then the attribute is automatically set to false (0).\r\n</div>\r\n\r\n<a name="component"></a><p class="attribute_definition">\r\n<span class="attribute_definition">component</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis is the component that is running in the current Python environment. \r\n(So far) Possible values are \'cell\', \'base\', \'client\', \'database\', \'bot\', and \'editor\'.\r\n</div>\r\n\r\n<a name="entities"></a><p class="attribute_definition">\r\n<span class="attribute_definition">entities</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nentities is a dictionary object that contains all the entities in the \r\ncurrent process.\r\n<br>\r\nDebugging leaked entities (instances that call destroy without releasing \r\nmemory, usually due to being referenced):<br>\r\n<pre>\r\n>>> KBEngine.entities.garbages.items()\r\n[(1025, Avatar object at 0x7f92431ceae8.)]\r\n<br>\r\n>>> e = _[0][1]\r\n>>> import gc\r\n>>> gc.get_referents(e)\r\n[{\'spacesIsOk\': True, \'bootstrapIdx\': 1}, <class \'Avatar.Avatar\'>]\r\n</pre>\r\n<br>\r\nDebugging a leaked KBEngine-encapsulated Python object:<br>\r\n<a href=#debugTracing>KBEngine.debugTracing</a>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href="Entities.html">Entities</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="baseAppData"></a><p class="attribute_definition">\r\n<span class="attribute_definition">baseAppData</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis attribute contains a dictionary-like object that is automatically \r\nsynchronized across all BaseApps. When a value in the dictionary is \r\nmodified, the change is broadcast to all BaseApps.\r\n\r\n<br><br>\r\nExample:\r\n\r\n<pre><a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#baseAppData>baseAppData</a>[ "hello" ] = "there"\r\n</pre>\r\n<br><br>\r\nThe rest of the BaseApps can access the following:\r\n\r\n<pre>print <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#baseAppData>baseAppData</a>[ "hello" ]\r\n</pre>\r\n<br><br>\r\nKeys and values can be of any type, but these types must be encapsulated \r\nand unpacked on all target components.\r\n<br><br>\r\nWhen a value is changed or deleted, a callback function is called on all \r\ncomponents. \r\nSee: <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onBaseAppData>onBaseAppData</a> and <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onDelBaseAppData>onDelBaseAppData</a>.\r\n<br><br>\r\nNote: Only top-level value changes will be broadcast. If you have a value \r\n(such as a list) that changes an internal value (such as just changing a \r\nnumber), this information will not be broadcast.\r\n<br><br>\r\nDo not do the following:\r\n\r\n<pre><a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#baseAppData>baseAppData</a>[ "list" ] = [1, 2, 3]\r\n<a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#baseAppData>baseAppData</a>[ "list" ][1] = 7\r\n</pre>\r\nThe local access is [1, 7, 3] and the remote access is [1, 2, 3].\r\n</div>\r\n\r\n<a name="globalData"></a><p class="attribute_definition">\r\n<span class="attribute_definition">globalData</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis attribute contains a dictionary-like object that is automatically \r\nsynchronized across all BaseApps and CellApps. When a value in the dictionary is \r\nmodified, the change is broadcast to all BaseApps and CellApps.\r\n<br><br>\r\nexample:\r\n\r\n<pre><a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#globalData>globalData</a>[ "hello" ] = "there"\r\n</pre>\r\n<br><br>\r\nThe other <a href="../index.html">Baseapps</a> and <a href="../../cellapp/index.html">Cellapps</a> can access the following:\r\n\r\n<pre>print <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#globalData>globalData</a>[ "hello" ]\r\n</pre>\r\n<br><br>\r\nKeys and values can be of any type, but these types must be encapsulated \r\nand unpacked on all target components.\r\n<br><br>\r\nWhen a value is changed or deleted, a callback function is called on all \r\ncomponents. \r\nSee: <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onGlobalData>onGlobalData</a> and <a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#onGlobalDataDel>onGlobalDataDel</a>.\r\n<br><br>\r\nNote: Only top-level value changes will be broadcast. If you have a value \r\n(such as a list) that changes an internal value (such as just changing a \r\nnumber), this information will not be broadcast.\r\n<br><br>\r\nDo not do the following:\r\n\r\n<pre><a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#globalData>globalData</a>[ "list" ] = [1, 2, 3]\r\n<a href="KBEngine.html">KBEngine</a>.<a href=KBEngine.html#globalData>globalData</a>[ "list" ][1] = 7\r\n</pre>\r\nThe local access is [1, 7, 3] and the remote access is [1, 2, 3].\r\n</div>\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>Entity - KBEngine base</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Entity class</h1>\r\n\r\n<p style="text-align: center;"><span class="module_h1">[<a href="../Modules/KBEngine.html" class="module_h1">KBEngine module</a>]</span></p>\r\n<p>Entity is part of the <a href="../Modules/KBEngine.html">KBEngine</a> module. <a href="#detailed_description">More...</a></p><p></p><pre>import KBEngine</pre>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addTimer" class="function_list" >addTimer</a>( self, initialOffset, repeatOffset=0, userArg=0 ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createCellEntity" class="function_list" >createCellEntity</a>( self, cellEntityMB ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createCellEntityInNewSpace" class="function_list" >createCellEntityInNewSpace</a>( self, cellappIndex ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#delTimer" class="function_list" >delTimer</a>( self, id ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#destroy" class="function_list" >destroy</a>( self, deleteFromDB, writeToDB ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#destroyCellEntity" class="function_list" >destroyCellEntity</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#teleport" class="function_list" >teleport</a>( self, baseEntityMB ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#writeToDB" class="function_list" >writeToDB</a>( self, callback, shouldAutoLoad, dbInterfaceName ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callback functions</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onCreateCellFailure" class="function_list" >onCreateCellFailure</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onDestroy" class="function_list" >onDestroy</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onGetCell" class="function_list" >onGetCell</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLoseCell" class="function_list" >onLoseCell</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onPreArchive" class="function_list" >onPreArchive</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onRestore" class="function_list" >onRestore</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onTimer" class="function_list" >onTimer</a>( self, timerHandle, userData ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onWriteToDB" class="function_list" >onWriteToDB</a>( self, cellData ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><a href="#cell" class="attribute_list" >cell</a></td><td> Read-only <a href=../../keywords.html#EntityCall>CellEntityCall</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#cellData" class="attribute_list" >cellData</a></td><td> <a href="CELLDATADICT.html">CELLDATADICT</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#className" class="attribute_list" >className</a></td><td> Read-only <a href="STRING.html">string</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#client" class="attribute_list" >client</a></td><td> Read-only <a href=../../keywords.html#EntityCall>ClientEntityCall</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#databaseID" class="attribute_list" >databaseID</a></td><td> Read-only <a href="int64.html">int64</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#databaseInterfaceName" class="attribute_list" >databaseInterfaceName</a></td><td> Read-only <a href="STRING.html">string</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#id" class="attribute_list" >id</a></td><td> Read-only <a href="int32.html">int32</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#isDestroyed" class="attribute_list" >isDestroyed</a></td><td> <a href="bool.html">bool</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#shouldAutoArchive" class="attribute_list" >shouldAutoArchive</a></td><td> True, False or <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=KBEngine.html#NEXT_ONLY>NEXT_ONLY</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#shouldAutoBackup" class="attribute_list" >shouldAutoBackup</a></td><td> True, False or <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=KBEngine.html#NEXT_ONLY>NEXT_ONLY</a>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<hr>\r\n<a name="detailed_description"></a><h2>A detailed description</h2>\r\nThis <a href="Entity.html">Entity</a> class represents an <a href="Entity.html">Entity</a> \r\nthat resides on the <a href="../index.html">Baseapp</a>.\r\n<a href="Entity.html">Entities</a> can be created using the <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=../Modules/KBEngine.html#createEntity>createEntity</a> \r\nfunction (as well as functions prefixed by createEntity). \r\nAn <a href="Entity.html">Entity</a> can also be remotely created using the <a href="../../cellapp/index.html">Cellapp</a> \r\nfunction <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=../../cellapp/Modules/KBEngine.html#createEntityOnBaseApp>createEntityOnBaseApp</a>.\r\n<br><br>\r\nA base <a href="Entity.html">Entity</a> can be linked to an active <a href=../../keywords.html#cell>cell</a> \r\nentity and can be used to create an associated <a href=../../keywords.html#cell>cell</a> entity. \r\nThis class allows you to create and destroy <a href=../../keywords.html#cell>cell</a> \r\nentities, register a timer on the base entity, or access the contact \r\ninformation for this object.<br>\r\nYou can also access a <a href="../../keywords.html#EntityCall">CellEntityCall</a> \r\nthrough which this base entity can communicate with its <a href=../../keywords.html#cell>cell</a> \r\nentity (the associated <a href=../../keywords.html#cell>cell</a> entity \r\ncan be moved to a different <a href=../../keywords.html#cell>cell</a> \r\nwhen KBEngine performs load balancing as a result of the movement of the <a href=../../keywords.html#cell>cell</a> \r\nentity).\r\n\r\n<hr>\r\n<h2>Member function documentation</h2>\r\n\r\n<a name="addTimer"></a><p class="function_definition">\r\n<span class="function_definition">def addTimer( <i>self, initialOffset, repeatOffset=0, userArg=0</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegister a timer. The timer is triggered by the callback function \r\n<i><a href="#onTimer">onTimer</a></i>, which will be executed the first \r\ntime after "initialOffset" seconds, and then executed once every "repeatOffset" \r\nseconds. A "userArg" parameter can be set (integer only).\r\n<br><br>\r\nThe <i><a href="#onTimer">onTimer</a></i> function must be defined in the \r\nbase part of the entity with two parameters. The first is an integer, \r\nthe timer id (which can be used to remove the timer\'s "<a href="#delTimer">delTimer</a>" \r\nfunction), and the second is the user parameter "userArg".\r\n<br><br>\r\nExample:\r\n\r\n<pre><pre># Here is an example of using addTimer\r\nimport <a href="../Modules/KBEngine.html">KBEngine</a>\r\n \r\nclass MyBaseEntity( <a href="../Modules/KBEngine.html">KBEngine</a>.<a href="Entity.html">Entity</a> ):\r\n \r\n def __init__( self ):\r\n <a href="../Modules/KBEngine.html">KBEngine</a>.<a href="Entity.html">Entity</a>.__init__( self )\r\n \r\n # Add a timer, trigger for the first time after 5 seconds, and execute once per second afterwards. The user parameter is 9.\r\n self.addTimer( 5, 1, 9 )\r\n \r\n # Add a timer and execute it once after 1 second. The default user parameter is 0.\r\n self.addTimer( 1 )\r\n \r\n # <a href="Entity.html">Entity</a> timer callback "onTimer" is called\r\n def onTimer( self, id, userArg ):\r\n print "MyBaseEntity.onTimer called: id %i, userArg: %i" % ( id, userArg )\r\n # If this is a repeated timer, when the timer is no longer needed, call the following function to remove it:\r\n # self.delTimer( id )</pre>\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>initialOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval in seconds for the timer to trigger \r\nthe first callback.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>repeatOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval (in seconds) after each execution of \r\nthe first callback execution. You must remove the timer with the function <a href="#delTimer">delTimer</a>, \r\notherwise it will continue to repeat. Values less than or equal to 0 will \r\nbe ignored.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userArg</i></span></td><td><span class="function_parameter_description">\r\ninteger, specifies the value of the userArg parameter when invoking the "<a href="#onTimer">onTimer</a>" callback.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:Z</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>integer, the internal id of the timer. This id can be used to \r\nremove the timer using <a href="#delTimer">delTimer</a>.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="createCellEntity"></a><p class="function_definition">\r\n<span class="function_definition">def createCellEntity( <i>self, cellEntityMB</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRequests to create an associated entity in a <a href=../../keywords.html#cell>cell</a>. \r\n<br><br>\r\nThe information used to create the <a href=../../keywords.html#cell>cell</a> \r\nentity is stored in the entity\'s cellData attribute. The cellData attribute is a \r\ndictionary that corresponds to the default value in the entity\'s .def file, \r\nas well as the "position", "direction", and "spaceID" used to represent \r\nthe entity\'s position and orientation (roll, pitch, yaw).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>cellEntityMB</i></span></td><td><span class="function_parameter_description">\r\n<a href=../../keywords.html#EntityCall>CellEntityCall</a> parameter \r\nthat specifies which space to create this cell entity in.\r\n<br><br>\r\nOnly a direct <a href=../../keywords.html#EntityCall>CellEntityCall</a> \r\nmay be used. If you have an entity\'s <a href=../../keywords.html#EntityCall>BaseEntityCall</a>, \r\nyou cannot pass its <i>baseEntityCall.cell</i> to this function. Instead, you must create \r\na new function on the current entity\'s base that accepts a direct <a href=../../keywords.html#EntityCall>CellEntityCall</a> \r\nas a parameter and then calls this function using it.\r\n<br><br>\r\nE.g.\r\n<pre>baseEntityCallOfNearbyEntity.createCellNearSelf( self )</pre>\r\nOn the nearby entity\'s base:\r\n<pre>def createCellNearSelf( self, baseEntityCall ):\r\n baseEntityCall.createCellNearHere( self.cell )</pre>\r\nOn the current entity\'s base: \r\n<pre>def createCellNearHere( self, cellEntityCall ):\r\n self.createCellEntity( cellEntityCall )</pre>\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="createCellEntityInNewSpace"></a><p class="function_definition">\r\n<span class="function_definition">def createCellEntityInNewSpace( <i>self, cellappIndex</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCreate a space on the cellapp and create the <a href=../../keywords.html#cell>cell</a> \r\nof this entity into the new space. It requests to complete through cellappmgr.\r\n<br><br>\r\nThe information used to create the cell entity is stored in the entity\'s cellData attribute. This property is a dictionary. The default values in the corresponding entity\'s .def file also include \r\n"position", "direction", and "spaceID" for representing the entity\'s position and orientation (roll, pitch, yaw).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>cellappIndex</i></span></td><td><span class="function_parameter_description">\r\ninteger, if it is either None or 0, a cellapp is dynamically selected by \r\nthe engine load balancer. If it is greater than 0, a space is created in \r\nthe specified cellapp<br>\r\nExample: If you expect to open four cellapps, then the cellappIndex needs \r\nto specify the index can be <br>\r\n1, 2, 3, 4,<br>\r\nif the actual running cellapp is less than 4, for example, only 3, then \r\nthe cellappIndex input 4 due to the number of overflow 4 1, 5 2.<br><br>\r\n\r\nTip: This feature can be used in conjunction with KBEngine.setAppFlags \r\n(KBEngine.APP_FLAGS_NOT_PARTCIPATING_LOAD_BALANCING), for example: \r\nplacing large map spaces in several fixed cellapps and setting these \r\ncellapps to not participate in load balancing, and other cellapps to \r\nplace copy space. When the copyspace is created and the cellappIndex is \r\nset to 0 or None, the consumption of the copy map will not affect the \r\nlarge map process, thus ensuring the smoothness of the main scene.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="delTimer"></a><p class="function_definition">\r\n<span class="function_definition">def delTimer( <i>self, id</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe function delTimer is used to remove a registered timer. The removed \r\ntimer is no longer executed. Single-shot timers are \r\nautomatically removed after the callback is executed, and it is not \r\nnecessary to use the delTimer to remove it. If the delTimer function \r\nuses an invalid id (for example, has been removed), it will generate an \r\nerror. \r\n<br><br>\r\nA usage example is with the <a href="Entity.html">Entity</a>.<a href=Entity.html#addTimer>addTimer</a> \r\nfunction.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description">\r\ninteger, which specifies the timer id to remove.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="destroy"></a><p class="function_definition">\r\n<span class="function_definition">def destroy( <i>self, deleteFromDB, writeToDB</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function destroys the base parts of the entity. If the entity has a \r\ncell part, then the user must first destroy the cell part, otherwise it \r\nwill generate an error. To destroy the cell part of the entity, call a <a href="Entity.html">Entity</a>.<a href=Entity.html#destroyCellEntity>destroyCellEntity</a>.\r\n<br><br>\r\nIt may be more appropriate to call self.destroy in the onLoseCell callback. \r\nThis ensures that the base part of the entity is destroyed.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>deleteFromDB</i></span></td><td><span class="function_parameter_description">\r\nIf True, the entry associated with this entity in the database will be \r\ndeleted. This parameter defaults to False.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>writeToDB</i></span></td><td><span class="function_parameter_description">\r\nIf True, the archived attributes associated with this entity will be \r\nwritten to the database. Only if this entity is read for the database or \r\nuses <a href="Entity.html">Entity</a>.<a href=Entity.html#writeToDB>writeToDB</a> \r\nwill it be written to the database. This parameter is True by default, \r\nbut will be ignore when deleteFromDB is True.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="destroyCellEntity"></a><p class="function_definition">\r\n<span class="function_definition">def destroyCellEntity( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\n<i>destroyCellEntity</i> requests destruction of the associated cell \r\nentity. This method will generate an error if there is no associated \r\ncell entity.\r\n</div>\r\n\r\n<a name="teleport"></a><p class="function_definition">\r\n<span class="function_definition">def teleport( <i>self, baseEntityMB</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\n<i>teleport</i> will teleport the cell part of this entity to the space \r\nwhere the entity specified by the parameter is located.\r\n<br><br>\r\nAfter arriving at the new space, Entity.onTeleportSuccess is called. This \r\ncan be used to move the entity to a suitable location in the new space. \r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>baseEntityMB</i></span></td><td><span class="function_parameter_description">\r\nThe <a href=../../keywords.html#EntityCall>EntityCall</a> of the entity \r\nthat is in the space this entity will be teleported. When successful, the \r\ncell entity associated with this parameter is passed to the Entity.onTeleportSuccess \r\nfunction.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="writeToDB"></a><p class="function_definition">\r\n<span class="function_definition">def writeToDB( <i>self, callback, shouldAutoLoad, dbInterfaceName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function saves the entity\'s archive attributes to the database so \r\nthat it can be loaded again when needed.\r\n<br><br>\r\nEntities can also be marked as automatically loaded so that the entity \r\nwill be re-created when the service is started.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callback</i></span></td><td><span class="function_parameter_description">\r\nThis optional parameter is a callback function when the database operation \r\nis complete. It has two parameters. The first is a success or failure \r\nboolean flag, and the second is the base entity.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>shouldAutoLoad</i></span></td><td><span class="function_parameter_description">\r\nThis optional parameter specifies whether this entity needs to be loaded \r\nfrom the database when the service is started. <br>\r\nNote: The entity is automatically loaded when the server starts. The \r\ndefault is to call createEntityAnywhereFromDBID to create an entity to a \r\nminimally loaded baseapp. The entire process will be completed before the \r\nfirst started baseapp calls onBaseAppReady.\r\n<br><br>\r\n\r\nThe script layer can reimplement the entity creation method in the \r\npersonalization script (kbengine_defaults.xml->baseapp->entryScriptFile definition), \r\nfor example: <br>\r\ndef onAutoLoadEntityCreate(entityType, dbid): \r\n KBEngine.createEntityFromDBID(entityType, dbid)\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>dbInterfaceName</i></span></td><td><span class="function_parameter_description">\r\nstring, optional parameter, specified by a database interface, default is to \r\nuse the "default" interface. Database interfaces are defined in \r\nkbengine_defaults.xml->dbmgr->databaseInterfaces.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n<a name="onCreateCellFailure"></a><p class="function_definition">\r\n<span class="function_definition">def onCreateCellFailure( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this function is implemented in the script, this function is called when the cell entity fails to create. This function has no parameters.\r\n</div>\r\n\r\n<a name="onDestroy"></a><p class="function_definition">\r\n<span class="function_definition">def onDestroy( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this callback function is implemented in a script, it is called after \r\n<a href="Entity.html">Entity</a>.<a href=Entity.html#destroy>destroy</a>() \r\nactually destroys the entity. This function has no parameters.\r\n</div>\r\n\r\n<a name="onGetCell"></a><p class="function_definition">\r\n<span class="function_definition">def onGetCell( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this function is implemented in the script, this function is called when it gets a cell entity. This function has no parameters.\r\n</div>\r\n\r\n<a name="onLoseCell"></a><p class="function_definition">\r\n<span class="function_definition">def onLoseCell( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this function is implemented in the script, this function is called after its associated cell entity is destroyed. This function has no parameters.\r\n</div>\r\n\r\n<a name="onPreArchive"></a><p class="function_definition">\r\n<span class="function_definition">def onPreArchive( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this function is implemented in a script, it is called before the \r\nentity is automatically written to the database. This callback is called \r\nbefore the <a href="Entity.html">Entity</a>.<a href=Entity.html#onWriteToDB>onWriteToDB</a> \r\ncallback. If the callback returns False, the archive operation is aborted. \r\nThis callback should return True to continue the operation. If this \r\ncallback does not exist, the archiving operation continues.\r\n</div>\r\n\r\n<a name="onRestore"></a><p class="function_definition">\r\n<span class="function_definition">def onRestore( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this function is implemented in a script, it is called when this <a href="Entity.html">Entity</a>\'s \r\napplication crashes and the <a href="Entity.html">Entity</a> is recreated on \r\nother applications. This function has no parameters.\r\n</div>\r\n\r\n<a name="onTimer"></a><p class="function_definition">\r\n<span class="function_definition">def onTimer( <i>self, timerHandle, userData</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called when a timer associated with this entity is \r\ntriggered. A timer can be added using the <a href="Entity.html">Entity</a>.<a href=Entity.html#addTimer>addTimer</a> \r\nfunction.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>timerHandle</i></span></td><td><span class="function_parameter_description">\r\nThe id of the timer.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description">\r\ninteger, User data passed in on <a href="Entity.html">Entity</a>.<a href=Entity.html#addTimer>addTimer</a>.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onWriteToDB"></a><p class="function_definition">\r\n<span class="function_definition">def onWriteToDB( <i>self, cellData</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this function is implemented in the script, this function is called when the entity data is to be written into the database.\r\n<br><br>\r\nNote that calling writeToDB in this callback will result in an infinite loop.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>cellData</i></span></td><td><span class="function_parameter_description">\r\nContains the cell properties that will be stored in the database. \r\n<a href="Entity.html#cellData">cellData</a> is a dictionary.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<hr>\r\n<h2>Attributes documentation</h2>\r\n\r\n<a name="cell"></a><p class="attribute_definition">\r\n<span class="attribute_definition">cell</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\ncell is the <a href=../../keywords.html#EntityCall>ENTITYCALL</a> used to \r\ncontact the cell entity. This property is read-only, and the property is \r\nset to None if this base entity has no associated cell.\r\n<br><br>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only <a href=../../keywords.html#EntityCall>ENTITYCALL</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="cellData"></a><p class="attribute_definition">\r\n<span class="attribute_definition">cellData</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\ncellData is a dictionary property. Whenever the base entity does not \r\ncreate its cell entity, the attributes of the cell entity are stored here. \r\n<br><br>\r\nIf the cell entity is created, these used values and <a href=#cellData>cellData</a> \r\nattributes will be deleted. In addition to the attributes that the cell \r\nentity specifies in the entity definition file, it also contains position, \r\ndirection, and spaceID.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href="CELLDATADICT.html">CELLDATADICT</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="className"></a><p class="attribute_definition">\r\n<span class="attribute_definition">className</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe class name of the entity.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only string\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="client"></a><p class="attribute_definition">\r\n<span class="attribute_definition">client</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nclient is the EntityCall used to contact the client. This attribute is \r\nread-only and is set to None if this base entity has no associated client.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only <a href=../../keywords.html#EntityCall>ENTITYCALL</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="databaseID"></a><p class="attribute_definition">\r\n<span class="attribute_definition">databaseID</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\ndatabaseID is the entity\'s permanent ID (database id). This id is of type \r\nuint64 and is greater than 0. If it is 0 then the entity is not permanent.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only int64\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="databaseInterfaceName"></a><p class="attribute_definition">\r\n<span class="attribute_definition">databaseInterfaceName</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\ndatabaseInterfaceName is the database interface name where the entity \r\npersists. The interface name is configured in kbengine_defaults->dbmgr. \r\nThe entity must be persistent (databaseID>0) for this attribute to be \r\navailable, otherwise an empty string is returned.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only string\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="id"></a><p class="attribute_definition">\r\n<span class="attribute_definition">id</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nid is the object id of the entity. This id is an integer that is the same between base, cell, and client associated entities. This attribute is read-only.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only int32\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="isDestroyed"></a><p class="attribute_definition">\r\n<span class="attribute_definition">isDestroyed</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis attribute is True if the <a href="Entity.html">Entity</a> has been \r\ndestroyed.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>bool\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="shouldAutoArchive"></a><p class="attribute_definition">\r\n<span class="attribute_definition">shouldAutoArchive</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis attribute determines the automatic archiving strategy. If set to True, \r\nAutoArchive will be available, if set to False AutoArchive will not be available. \r\nIf set to <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=KBEngine.html#NEXT_ONLY>NEXT_ONLY</a>, \r\nautomatic archiving will be available at the next scheduled time. This \r\nattribute will be set to false after the next archiving.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>True, False or <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=KBEngine.html#NEXT_ONLY>NEXT_ONLY</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="shouldAutoBackup"></a><p class="attribute_definition">\r\n<span class="attribute_definition">shouldAutoBackup</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis attribute determines the automatic bacup strategy. If set to True, \r\nautomatic backup will be available, if set to False, automatic backup \r\nwill not be available. If set to <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=KBEngine.html#NEXT_ONLY>NEXT_ONLY</a>, \r\nautomatic backup will be done at the next available predetermined time. \r\nAfter the next backup, this attribute will be set to False.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Type:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>True, False or <a href="../Modules/KBEngine.html">KBEngine</a>.<a href=KBEngine.html#NEXT_ONLY>NEXT_ONLY</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>Proxy - KBEngine base</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Proxy class</h1>\r\n<p style="text-align: center;"><span class="module_h1">[<a href="../Modules/KBEngine.html" class="module_h1">KBEngine module</a>]</span></p>\r\n<p>Proxy is part of the <a href="../Modules/KBEngine.html">KBEngine</a> module. <a href="#detailed_description">More...</a></p><p></p><pre>import KBEngine</pre>\r\n<h2>Parent</h2>\r\n<a href="Entity.html">Entity</a>\r\n<br>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member function</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#disconnect" class="function_list" >disconnect</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getClientType" class="function_list" >getClientType</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getClientDatas" class="function_list" >getClientDatas</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#giveClientTo" class="function_list" >giveClientTo</a>( self, proxy ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#streamFileToClient" class="function_list" >streamFileToClient</a>( self, resourceName, desc="", id=-1 ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#streamStringToClient" class="function_list" >streamStringToClient</a>( self, data, desc="", id=-1 ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callbacks</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onClientDeath" class="function_list" >onClientDeath</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onClientGetCell" class="function_list" >onClientGetCell</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onClientEnabled" class="function_list" >onClientEnabled</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onGiveClientToFailure" class="function_list" >onGiveClientToFailure</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLogOnAttempt" class="function_list" >onLogOnAttempt</a>( self, ip, port, password ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onStreamComplete" class="function_list" >onStreamComplete</a>( self, id, success ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><a href="#__ACCOUNT_NAME__" class="attribute_list" >__ACCOUNT_NAME__</a></td><td> Read-only <a href="STRING.html">string</a></td></tr>\r\n\r\n<tr valign=top><td><a href="#__ACCOUNT_PASSWORD__" class="attribute_list" >__ACCOUNT_PASSWORD__</a></td><td> Read-only <a href="STRING.html">string</a></td></tr>\r\n\r\n<tr valign=top><td><a href="#clientAddr" class="attribute_list" >clientAddr</a></td><td> Read-only </td></tr>\r\n\r\n<tr valign=top><td><a href="#clientEnabled" class="attribute_list" >clientEnabled</a></td><td> Read-only <a href="BOOL.html">bool</a></td></tr>\r\n\r\n<tr valign=top><td><a href="#hasClient" class="attribute_list" >hasClient</a></td><td> Read-only <a href="BOOL.html">bool</a></td></tr>\r\n\r\n<tr valign=top><td><a href="#roundTripTime" class="attribute_list" >roundTripTime</a></td><td> Read-only</td></tr>\r\n\r\n<tr valign=top><td><a href="#timeSinceHeardFromClient" class="attribute_list" >timeSinceHeardFromClient</a></td><td> Read-only</td></tr>\r\n\r\n</table>\r\n\r\n<hr>\r\n<a name="detailed_description"></a><h2>A detailed description</h2>\r\nA <a href="Proxy.html">Proxy</a> is a special type of <a href="Entity.html">Entity</a>. \r\nIt inherits from <a href="Entity.html">Entity</a> and has an associated client. By itself, it is a \r\nproxy client entity that handles all server-to-client updates. Cannot \r\ncreate <a href="Proxy.html">Proxy</a> class objects directly script.\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="disconnect"></a><p class="function_definition">\r\n<span class="function_definition">def disconnect( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\nDisconnect the client.\r\n</div>\r\n\r\n\r\n\r\n<a name="getClientType"></a><p class="function_definition">\r\n<span class="function_definition">def getClientType( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function returns the client type.\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nUNKNOWN_CLIENT_COMPONENT_TYPE\t= 0,<br/>\r\nCLIENT_TYPE_MOBILE\t\t\t\t= 1,\t// Mobile phone<br/>\r\nCLIENT_TYPE_WIN\t\t\t\t\t= 2,\t// PC, typically EXE clients<br/>\r\nCLIENT_TYPE_LINUX\t\t\t\t= 3\t\t// Linux Application program<br/>\r\nCLIENT_TYPE_MAC\t\t\t\t\t= 4\t\t// Mac Application program<br/>\r\nCLIENT_TYPE_BROWSER\t\t\t\t= 5,\t// Web applications, HTML5, Flash<br/>\r\nCLIENT_TYPE_BOTS\t\t\t\t= 6,\t// bots<br/>\r\nCLIENT_TYPE_MINI\t\t\t\t= 7,\t// Mini-Client<br/>\r\nCLIENT_TYPE_END\t\t\t\t\t= 8\t\t// end<br/>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getClientDatas"></a><p class="function_definition">\r\n<span class="function_definition">def getClientDatas( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function returns the data attached to the client when logging in and \r\nregistering.<br>\r\nThis data can be used to expand the operating system. If a third-party \r\naccount service is connected, this data is sent to the third-party service \r\nsystem through the interfaces process.\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\ntuple, a tuple of 2 elements (login data bytes, registration data bytes), \r\nthe first element is the datas parameter passed in when the client invokes \r\nthe login, and the second element is passed in when the client registers. \r\nSince they can store arbitrary binary data, they all exist as bytes.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="giveClientTo"></a><p class="function_definition">\r\n<span class="function_definition">def giveClientTo( <i>self, proxy</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe client\'s controller is transferred to another Proxy, the current Proxy \r\nmust have a client and the target Proxy must have no associated client, \r\notherwise it will cause an error.\r\n</div>\r\n\r\n<p>\r\n<span class="function_links"><b>See also:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href="Proxy.html">Proxy</a>.<a href="Proxy.html#onGiveClientToFailure">onGiveClientToFailure</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>proxy</i></span></td><td><span class="function_parameter_description">\r\nControl will be transferred to this entity.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="streamFileToClient"></a><p class="function_definition">\r\n<span class="function_definition">def streamFileToClient( <i>self, resourceName, desc="", id=-1</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is similar to <a href="Proxy.html#streamStringToClient">streamStringToClient()</a> \r\nand sends a resource file to the client. The sending process operates \r\non different threads so it does not compromise the main thread.\r\n</div>\r\n\r\n<p>\r\n<span class="function_links"><b>See also:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href="Proxy.html">Proxy</a>.<a href="Proxy.html#onStreamComplete">onStreamComplete</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>resourceName</i></span></td><td><span class="function_parameter_description">\r\nThe name of the resource to send, including the path.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>desc</i></span></td><td><span class="function_parameter_description">\r\nAn optional string that describes the resource sent to the client.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description">\r\nA 16-bit id whose value depends entirely on the caller. If the incoming \r\n-1 system will select an unused id in the queue. The client can make \r\nresource judgments based on this id.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe id associated with this download.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="streamStringToClient"></a><p class="function_definition">\r\n<span class="function_definition">def streamStringToClient( <i>self, data, desc="", id=-1</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nSends some data to the client bound to the current entity. If the client \r\nport data is cleared, this function can only be called when the client \r\nbinds to the entity again. The 16-bit id is entirely up to the caller. <br>\r\nIf the caller does not specify this ID then the system will allocate an unused id. The client can make resource judgments based on this id. \r\n<br><br>\r\n\r\nYou can define a callback function (onStreamComplete) in a Proxy-derived class. This callback function is called when all data is successfully sent to the client or when the download fails. \r\n<br><br>\r\nSee also:\r\n<a href="Proxy.html">Proxy</a>.<a href=Proxy.html#onStreamComplete>onStreamComplete</a>, client <a href=../../client/classes/Entity.html>Entity</a>.<a href=../../client/classes/Entity.html#onStreamDataStarted>onStreamDataStarted</a>, \r\n<a href=../../client/classes/Entity.html>Entity</a>.<a href=../../client/classes/Entity.html#onStreamDataRecv>onStreamDataRecv</a>, and <a href=../../client/classes/Entity.html>Entity</a>.<a href=../../client/classes/Entity.html#onStreamDataCompleted>onStreamDataCompleted</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>data</i></span></td><td><span class="function_parameter_description">\r\nThe string to send\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>desc</i></span></td><td><span class="function_parameter_description">\r\nAn optional description string sent. \r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description">\r\nA 16-bit id whose value depends entirely on the caller. If the incoming -1 system will select an unused id in the queue.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe id associated with this download.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n\r\n<a name="onClientDeath"></a><p class="function_definition">\r\n<span class="function_definition">def onClientDeath( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback is implemented in a script, this method will be called when the client disconnects. This method has no parameters.\r\n</div>\r\n\r\n<a name="onClientGetCell"></a><p class="function_definition">\r\n<span class="function_definition">def onClientGetCell( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback is implemented in a script, \r\nthe callback is called when the client can call the entity\'s \r\n<a href=../../keywords.html#cell>cell</a> attribute\r\n</div>\r\n\r\n<a name="onClientEnabled"></a><p class="function_definition">\r\n<span class="function_definition">def onClientEnabled( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback is implemented in the \r\nscript, it is invoked when the entity is available (various initializations \r\nand communication with the client). This method has no parameters. <br>\r\nNote: giveClientTo also assigns control to the entity and causes the callback to be called.\r\n</div>\r\n\r\n<a name="onGiveClientToFailure"></a><p class="function_definition">\r\n<span class="function_definition">def onGiveClientToFailure( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\nIf this callback is implemented in a script, it is called when the entity \r\nfails to call <a href=#onStreamComplete>giveClientTo</a>. \r\nThis method has no parameters.\r\n</div>\r\n\r\n\r\n<a name="onLogOnAttempt"></a><p class="function_definition">\r\n<span class="function_definition">def onLogOnAttempt( <i>self, ip, port, password</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If this callback is implemented in a \r\nscript, it is invoked when a client attempts to log in using the current \r\naccount entity. <br>\r\nThis situation usually happens when the entity that exists in memory is in a valid \r\nstate, the most obvious example is user A logs in with this account, \r\nand user B tries to use the same account to log in, triggering this callback. \r\n<br><br>\r\nThis callback function can return the following constant values:<br> \r\n<a href="../Modules/KBEngine.html">KBEngine</a>.<a href=KBEngine.html#LOG_ON_ACCEPT>LOG_ON_ACCEPT</a>: \r\nAllows the new client to bind to the entity. If the entity has bound a \r\nclient, the previous client will be kicked out.<br>\r\n<a href="../Modules/KBEngine.html">KBEngine</a>.<a href=KBEngine.html#LOG_ON_REJECT>LOG_ON_REJECT</a>: \r\nReject new client entity binding.<br>\r\n<br><a href="../Modules/KBEngine.html">KBEngine</a>.<a href=KBEngine.html#LOG_ON_WAIT_FOR_DESTROY>LOG_ON_WAIT_FOR_DESTROY</a>: \r\nWait for the entity to be destroyed before the client binds.\r\n<br><br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>ip</i></span></td><td><span class="function_parameter_description"> \r\nThe IP address of the client trying to log in.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>port</i></span></td><td><span class="function_parameter_description"> \r\nThe port to which the client attempted to log in.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>password</i></span></td><td><span class="function_parameter_description"> \r\nThe MD5 password used when the user logs in.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<a name="onStreamComplete"></a><p class="function_definition">\r\n<span class="function_definition">def onStreamComplete( <i>self, id, success</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description"> If you implement this callback in a \r\nscript, when a user uses <a href="Proxy.html">Proxy</a>.<a href=Proxy.html#streamStringToClient>streamStringToClient</a>() \r\nor <a href="Proxy.html">Proxy</a>.<a href=Proxy.html#streamFileToClient>streamFileToClient</a>() \r\nand is completed, this callback is invoked.\r\n\r\n\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description"> \r\nThe id associated with the download.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>success</i></span></td><td><span class="function_parameter_description"> \r\nSuccess or failure\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<hr>\r\n<h2>Attributes documentation</h2>\r\n\r\n<a name="__ACCOUNT_NAME__"></a><p class="attribute_definition">\r\n<span class="attribute_definition">__ACCOUNT_NAME__</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Note:</b><br><br>\r\nIf the proxy is an account, you can access __ACCOUNT_NAME__ to get the account name.\r\n</div>\r\n\r\n<a name="__ACCOUNT_PASSWORD__"></a><p class="attribute_definition">\r\n<span class="attribute_definition">__ACCOUNT_PASSWORD__</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Note:</b><br><br>\r\nIf the proxy is an account, you can access __ACCOUNT_PASSWORD__ to get the MD5 password.\r\n</div>\r\n\r\n<a name="clientAddr"></a><p class="attribute_definition">\r\n<span class="attribute_definition">clientAddr</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\nThis is a tuple object that contains the client\'s ip and port.\r\n</div>\r\n\r\n<a name="clientEnabled"></a><p class="attribute_definition">\r\n<span class="attribute_definition">clientEnabled</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\nWhether the entity is already available. The script cannot communicate with the client until the entity is available.\r\n</div>\r\n\r\n<a name="hasClient"></a><p class="attribute_definition">\r\n<span class="attribute_definition">hasClient</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\nProxy is bound to a client connection.\r\n</div>\r\n\r\n<a name="roundTripTime"></a><p class="attribute_definition">\r\n<span class="attribute_definition">roundTripTime</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\nThe average round-trip time for client communication between the server and this Proxy over a period of time. This property only takes effect under Linux.\r\n</div>\r\n\r\n<a name="timeSinceHeardFromClient"></a><p class="attribute_definition">\r\n<span class="attribute_definition">timeSinceHeardFromClient</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\nThe time (in seconds) that has passed since the client packet was last received.\r\n</div>\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine loginapp \u6587\u6863</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Loginapp process</h1>\r\nThe Loginapp process is primarily responsible for handling entity \r\nregistration and login requests. <br>\r\nNote: This process script is implemented in the scripts/login directory.\r\n\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine loginapp</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>KBEngine module</h1>\r\nThis <a href="KBEngine.html">KBEngine</a> module provides Python scripts \r\ncontrol over the loginapp process to handle entity login registration.\r\n\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addTimer" class="function_list" >addTimer</a>( initialOffset, repeatOffset=0, callbackObj=None ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#delTimer" class="function_list" >delTimer</a>( id ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callback functions</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLoginAppReady" class="function_list" >onLoginAppReady</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLoginAppShutDown" class="function_list" >onLoginAppShutDown</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onRequestLogin" class="function_list" >onRequestLogin</a>( loginName, password, clientType, datas ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLoginCallbackFromDB" class="function_list" >onLoginCallbackFromDB</a>( loginName, accountName, errorno, datas ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onRequestCreateAccount" class="function_list" >onRequestCreateAccount</a>( accountName, password, datas ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onCreateAccountCallbackFromDB" class="function_list" >onCreateAccountCallbackFromDB</a>( accountName, errorno, datas ):</span>\r\n</td></tr>\r\n</table>\r\n\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="addTimer"></a><p class="function_definition">\r\n<span class="function_definition">def addTimer( <i>initialOffset, repeatOffset=0, callbackObj=None</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegister a timer. The timer is triggered by the callback function \r\ncallbackObj. The callback function will be executed the first time \r\nafter "initialOffset" seconds, and then will be executed once every \r\n"repeatOffset" seconds. \r\n<br><br>\r\nExample:\r\n\r\n<pre><pre># Here is an example of using addTimer\r\n import <a href="../Modules/KBEngine.html">KBEngine</a>\r\n \r\n # Add a timer, perform the first time after 5 seconds, and execute once every 1 second. The user parameter is 9\r\n KBEngine.addTimer( 5, 1, onTimer_Callbackfun )\r\n \r\n # Add a timer and execute it after 1 second. The default user parameter is 0.\r\n KBEngine.addTimer( 1, onTimer_Callbackfun )\r\n \r\n def onTimer_Callbackfun( id ):\r\n print "onTimer_Callbackfun called: id %i" % ( id )\r\n # If this is a repeated timer, it is no longer needed, call the following function to remove: \r\n # KBEngine.delTimer( id )</pre>\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>initialOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval in seconds for the timer to register from the first callback.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>repeatOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval (in seconds) between each execution after \r\nthe first callback execution. You must remove the timer with the function \r\n<a href="#delTimer">delTimer</a>, otherwise it will continue to repeat. \r\nValues less than or equal to 0 will be ignored.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callbackObj</i></span></td><td><span class="function_parameter_description">\r\nfunction, the specified callback function object\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>integer, the internal id of the timer. This id can be used to \r\nremove the timer using <a href="#delTimer">delTimer</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="delTimer"></a><p class="function_definition">\r\n<span class="function_definition">def delTimer( <i>id</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe function delTimer is used to remove a registered timer. The removed \r\ntimer is no longer executed. Single-shot timers are automatically removed \r\nafter the callback is executed, and it is not necessary to use delTimer \r\nto remove it. If the delTimer function uses an invalid id (for example, \r\nhas been removed), it will generate an error\r\n<br><br>\r\nA use case for the KBEngine.addTimer reference timer.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description">\r\ninteger, timer id to remove\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n<a name="onLoginAppReady"></a><p class="function_definition">\r\n<span class="function_definition">def onLoginAppReady( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when the current process is ready.\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onLoginAppShutDown"></a><p class="function_definition">\r\n<span class="function_definition">def onLoginAppShutDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nProcess shutdown calls this function back. \r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onRequestLogin"></a><p class="function_definition">\r\n<span class="function_definition">def onRequestLogin( <i>loginName, password, clientType, datas</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCalled back when the client requests the server login account.\r\n<br><br>\r\nHere you can do some administrative control on user login. For example:<br> \r\nUse this interface to truncate the user\'s login here, record the request \r\nand queue it, and return an error code to tell the client the queue \r\nstatus.\r\n<br><br>\r\nNote: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>loginName</i></span></td><td><span class="function_parameter_description">\r\nstring, the name of the account submitted when logging in.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>password</i></span></td><td><span class="function_parameter_description">\r\nstring, MD5 password.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>clientType</i></span></td><td><span class="function_parameter_description">\r\ninteger, client type, given when the client logs in.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>datas</i></span></td><td><span class="function_parameter_description">\r\nbytes, the data attached to the client request, can forward data to a third-party platform.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nTuple, the return value is (error code, real account name, password, client type, data data submitted by the client), if there is no need to extend the modification, the return value is usually to destroy the incoming value (KBEngine.SERVER_SUCCESS , loginName, password, clientType, datas).\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onLoginAppReady"></a><p class="function_definition">\r\n<span class="function_definition">def onLoginAppReady( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when the current process is ready. \r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onLoginAppShutDown"></a><p class="function_definition">\r\n<span class="function_definition">def onLoginAppShutDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nProcess shutdown calls this function back. \r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onLoginCallbackFromDB"></a><p class="function_definition">\r\n<span class="function_definition">def onLoginCallbackFromDB( <i>loginName, accountName, errorno, datas</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe callback returned by dbmgr after the client requests the server \r\nlogin account.<br><br>\r\n\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>loginName</i></span></td><td><span class="function_parameter_description">\r\nstring, the name of the account submitted when logging in.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>accountName</i></span></td><td><span class="function_parameter_description">\r\nstring, the real account name (obtained from the the query at dbmgr)\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>errorno</i></span></td><td><span class="function_parameter_description">\r\ninteger, error code, if it is not KBEngine.SERVER_SUCCESS, login failed.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>datas</i></span></td><td><span class="function_parameter_description">\r\nbytes, which may be any data, such as data returned by a third-party platform or data returned by dbmgr and interfaces when processing the login.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onRequestCreateAccount"></a><p class="function_definition">\r\n<span class="function_definition">def onRequestCreateAccount( <i>accountName, password, data</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nCallback when the client requests the server to create an account.<br><br>\r\n\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>accountName</i></span></td><td><span class="function_parameter_description">\r\nstring, the name of the account submitted by the client.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>password</i></span></td><td><span class="function_parameter_description">\r\nstring, MD5 password.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>datas</i></span></td><td><span class="function_parameter_description">\r\nbytes, the data attached to the client request, can forward data to a third-party platform.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nTuple, the return value is (error code, real account name, password, data data submitted by the client), if there is no need to extend the modified value is usually returned to destroy the incoming value (KBEngine.SERVER_SUCCESS, loginName, password , datas).\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="onCreateAccountCallbackFromDB"></a><p class="function_definition">\r\n<span class="function_definition">def onCreateAccountCallbackFromDB( <i>accountName, errorno, datas</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe callback returned by dbmgr after the client requests the server to create an account.<br><br>\r\n\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>accountName</i></span></td><td><span class="function_parameter_description">\r\nstring, the name of the account submitted by the client.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>errorno</i></span></td><td><span class="function_parameter_description">\r\ninteger, error code, if it is not KBEngine.SERVER_SUCCESS, login failed.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>datas</i></span></td><td><span class="function_parameter_description">\r\nbytes, which may be any data, such as data returned by a third-party platform or data returned by dbmgr and interfaces when processing the login.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine dbmgr</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Dbmgr process</h1>\r\nThe Dbmgr process is mainly responsible for handling the storage of \r\nentity data and loading/querying of entity data.<br>\r\nNote: This process script is implemented in the scripts/db directory.\r\n\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine dbmgr</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>KBEngine module</h1>\r\nThis <a href="KBEngine.html">KBEngine</a> module provides Python scripts to \r\ncontrol the dbmgr process to handle entity login queries and data access.\r\n\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addTimer" class="function_list" >addTimer</a>( initialOffset, repeatOffset=0, callbackObj=None ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#delTimer" class="function_list" >delTimer</a>( id ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callbacks</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onDBMgrReady" class="function_list" >onDBMgrReady</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onDBMgrShutDown" class="function_list" >onDBMgrShutDown</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onReadyForShutDown" class="function_list" >onReadyForShutDown</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onSelectAccountDBInterface" class="function_list" >onSelectAccountDBInterface</a>( accountName ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="addTimer"></a><p class="function_definition">\r\n<span class="function_definition">def addTimer( <i>initialOffset, repeatOffset=0, callbackObj=None</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegisters a timer. The timer triggers the callback function specified \r\nby callbackObj. The callback will be executed the first time after \r\n"initialOffset" seconds, and then executed once every "repeatOffset" \r\nseconds.\r\n<br><br>\r\nExample:\r\n\r\n<pre><pre># Here is an example of using addTimer\r\n import <a href="../Modules/KBEngine.html">KBEngine</a>\r\n \r\n # Add a timer, perform the first time after 5 seconds, and execute once every 1 second. The user parameter is 9\r\n KBEngine.addTimer( 5, 1, onTimer_Callbackfun )\r\n \r\n # Add a timer and execute it after 1 second. The default user parameter is 0.\r\n KBEngine.addTimer( 1, onTimer_Callbackfun )\r\n \r\n def onTimer_Callbackfun( id ):\r\n print "onTimer_Callbackfun called: id %i" % ( id )\r\n # If this is a repeated timer, it is no longer needed, call the following function to remove: \r\n # KBEngine.delTimer( id )</pre>\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>initialOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval in seconds for the timer to register \r\nthe first callback.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>repeatOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval (in seconds) after each execution of \r\nthe first callback execution. You must remove the timer with the function \r\n<a href="#delTimer">delTimer</a>, otherwise it will continue to repeat. \r\nValues less than or equal to 0 will be ignored.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callbackObj</i></span></td><td><span class="function_parameter_description">\r\nfunction, the specified callback function object.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>integer, this function returns the internal id of the timer. \r\nThis id can be used to remove the timer using <a href="#delTimer">delTimer</a>.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="delTimer"></a><p class="function_definition">\r\n<span class="function_definition">def delTimer( <i>id</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe delTimer function is used to remove a registered timer. The removed \r\ntimer is no longer executed. Single-shot timers are automatically removed \r\nafter the callback is executed, and it is not necessary to use delTimer \r\nto remove it. If the delTimer function receives an invalid id (for \r\nexample, it was removed), it will generate an error.\r\n\r\n<br><br>\r\nA use case is in the KBEngine.<a href="#addTimer">addTimer</a> example.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description">\r\ninteger, specifies the timer id to remove.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n<a name="onDBMgrReady"></a><p class="function_definition">\r\n<span class="function_definition">def onDBMgrReady( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when the current process is ready.\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onDBMgrShutDown"></a><p class="function_definition">\r\n<span class="function_definition">def onDBMgrShutDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called when the process shuts down.\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onReadyForShutDown"></a><p class="function_definition">\r\n<span class="function_definition">def onReadyForShutDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this function is implemented in a script, the callback function is called when the process is ready to exit.<br><br>\r\n\r\nYou can use this callback to control when the process exits.<br>\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nbool, if it returns True, it allows the process to exit. Returning other \r\nvalues will cause the process to ask again after a period of time.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onSelectAccountDBInterface"></a><p class="function_definition">\r\n<span class="function_definition">def onSelectAccountDBInterface( <i>accountName</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nWhen implemented in a script, this callback returns the database interface \r\ncorresponding to an account. After the interface is selected, the dbmgr \r\noperations related to this account are completed by the corresponding \r\ndatabase interface.\r\n<br><br>\r\nDatabase interfaces are defined in <a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->dbmgr->databaseInterfaces.<br>\r\nUse this function to determine which database the account should be stored \r\nin based on accountName.<br>\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>accountName</i></span></td><td><span class="function_parameter_description">\r\nstring, the name of the account.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nstring, the database interface name (database interfaces are defined in <a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->dbmgr->databaseInterfaces).\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine bots \u6587\u6863</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Bots process</h1>\r\nBots is a kind of lightweight client program that simulates and tests the \r\nserver side. Bots has no rendering parts. It can test for hidden bugs and \r\napply load to the server through a large number of simulated client and \r\nserver interactions, so that the developer can optimize the service side \r\neffectively. \r\n<br>\r\n<br>\r\nNote: The Bots process needs to implement the relevant client code under scripts/bots, which is extended by a Python script.\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine bots</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>KBEngine module</h1>\r\nThis <a href="KBEngine.html">KBEngine</a> module provides the parts of the \r\nlogical script layer access to <a href="../Classes/Entity.html">Entity</a>, \r\nas well as the data of other clients in the current process, and so on.\r\n<h2><a href="#" onClick="obj=document.getElementById( \'classes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Classes</a></h2>\r\n<table id="classes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="class_list"><a href="../Classes/Entity.html" class="class_list" >Entity</a></span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="class_list"><a href="../Classes/PyClientApp.html" class="class_list" >PyClientApp</a></span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addBots" class="function_list" >addBots</a>( reqCreateAndLoginTotalCount, reqCreateAndLoginTickCount=0, reqCreateAndLoginTickTime=0 ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#callback" class="function_list" >callback</a>( initialOffset, callbackObj ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#cancelCallback" class="function_list" >cancelCallback</a>( id ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#genUUID64" class="function_list" >genUUID64</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getWatcher" class="function_list" >getWatcher</a>( path ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getWatcherDir" class="function_list" >getWatcherDir</a>( path ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#scriptLogType" class="function_list" >scriptLogType</a>( logType ):</span>\r\n</td></tr>\r\n\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callbacks</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\n<span class="function_list">def <a href="#onInit" class="function_list" >onInit</a>( isReload ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onFinish" class="function_list" >onFinish</a>( ):</span>\r\n</td></tr>\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><a href="#bots" class="attribute_list" >bots</a></td><td> <a href="../Classes/PyClientApp.html">bots</a>\r\n\r\n<tr valign=top><td><a href="#component" class="attribute_list" >component</a></td><td> Read-only <a href="STRING.html">string</a></td></tr>\r\n\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="addBots"></a><p class="function_definition">\r\n<span class="function_definition">def addBots( <i>reqCreateAndLoginTotalCount, reqCreateAndLoginTickCount=0, reqCreateAndLoginTickTime=0</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nAdd a bot to the server.\r\n<br><br>\r\nExample:\r\n\r\n<pre><pre># Here is an example of using addBots\r\n import <a href="../Modules/KBEngine.html">KBEngine</a>\r\n \r\n # Add 5 robots to the server at one time (instantaneously).\r\n KBEngine.addBots( 5 )\r\n \r\n # Add a total of 1000 robots to the server, 5 at a time, at an interval of 10 seconds.\r\n KBEngine.addBots( 1000, 5, 10 )\r\n</pre>\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>reqCreateAndLoginTotalCount</i></span></td><td><span class="function_parameter_description">\r\ninteger, integer, the total number of bots to add to the server.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>reqCreateAndLoginTickCount</i></span></td><td><span class="function_parameter_description">\r\ninteger, the number of bots added to the server each interval\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>reqCreateAndLoginTickTime</i></span></td><td><span class="function_parameter_description">\r\ninteger, the interval of time (in seconds) between adding bots.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<a name="callback"></a><p class="function_definition">\r\n<span class="function_definition">def callback( <i>initialOffset, callbackObj</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegisters a callback, on the callbackObj function, which will be executed \r\nonce after "initialOffset" seconds.\r\n<br><br>\r\nExample:\r\n\r\n<pre><pre># Here is an example of using callback\r\n import <a href="../Modules/KBEngine.html">KBEngine</a>\r\n \r\n # Add a timer and execute it after 1 second\r\n KBEngine.callback( 1, onCallbackfun )\r\n \r\n def onCallbackfun( ):\r\n print "onCallbackfun called"\r\n\t</pre>\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>initialOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, time, in seconds, to wait before triggering the callback.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callbackObj</i></span></td><td><span class="function_parameter_description">\r\nfunction, the specified callback function object.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>integer, this function returns the internal id of the callback. \r\nThis id can be used with <a href="#cancelCallback">cancelCallback</a> to \r\nremove the callback.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="cancelCallback"></a><p class="function_definition">\r\n<span class="function_definition">def cancelCallback( <i>id</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is used to remove a registered but not yet triggered callback. \r\nThe removed callback will not be executed. If this function is passed an \r\ninvalid id (for example, timer was removed), an error will be generated.\r\n<br><br>\r\nA use case is in the KBEngine.<a href="#callback">callback</a> example.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description">\r\ninteger, specifies the callback id to remove.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="genUUID64"></a><p class="function_definition">\r\n<span class="function_definition">def genUUID64( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function generates a 64-bit unique ID.<br>\r\nNote: This function is dependent on the startup argument \'gus\' of the \r\nCellapps service process. Please set the startup arguments to be unique. <br>\r\nIn addition, if gus exceeds 65535, the function can only remain unique on \r\nthe current process.\r\n<br>\r\n<br>\r\nUsage:<br>\r\nUnique item IDs are generated on multiple service processes and do not \r\nconflict when combined.<br>\r\nA room ID is generated on multiple service process and no uniqueness \r\nverification is required.<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nA 64-bit integer.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getWatcher"></a><p class="function_definition">\r\n<span class="function_definition">def getWatcher( <i>path</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGets the value of a watch variable from the KBEngine debug system.\r\n<br>\r\n<br>\r\nExample: In the Python console of baseapp1 enter:<br>\r\n>>>KBEngine.getWatcher("/root/stats/runningTime")\r\n<br>\r\n12673648533\r\n<br>\r\n<br>\r\n>>>KBEngine.getWatcher("/root/scripts/players")\r\n<br>\r\n32133\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nstring, the absolute path of the variable including the variable name \r\n(can be viewed on the GUIConsole watcher page).\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nThe value of the variable.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="getWatcherDir"></a><p class="function_definition">\r\n<span class="function_definition">def getWatcherDir( <i>path</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet a list of elements (directories, variable names) under the watch \r\ndirectory from the KBEngine debugging system.\r\n<br>\r\n<br>\r\nExample: In the Python console of baseapp1 enter::<br>\r\n>>>KBEngine.getWatcher("/root")\r\n<br>\r\n(\'stats\', \'objectPools\', \'network\', \'syspaths\', \'ThreadPool\', \'cprofiles\', \'scripts\', \'numProxices\', \'componentID\', \'componentType\', \'uid\', \'numClients\', \'globalOrder\', \'username\', \'load\', \'gametime\', \'entitiesSize\', \'groupOrder\')\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>path</i></span></td><td><span class="function_parameter_description">\r\nstring, the absolute path of the variable including the variable name \r\n(can be viewed on the GUIConsole watcher page).\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nA list of elements in the directory (directories, variable names).\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="scriptLogType"></a><p class="function_definition">\r\n<span class="function_definition">def scriptLogType( <i>logType</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nSets the type of information output by the current Python.print \r\n(Reference: KBEngine.LOG_TYPE_*)\r\n</div>\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n</table>\r\n</p>\r\n\r\n<a name="onInit"></a><p class="function_definition">\r\n<span class="function_definition">def onInit( <i>isReload</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called after all scripts have been initialized since \r\nthe engine started.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>isReload</i></span></td><td><span class="function_parameter_description">\r\nbool, whether it was triggered after rewriting the loading script.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onFinish"></a><p class="function_definition">\r\n<span class="function_definition">def onFinish( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when the process shuts down.\r\n<br>Note: This callback function must be implemented in the portal module (<a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->entryScriptFile).\r\n</div>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n<hr>\r\n<h2>Attributes documentation</h2>\r\n\r\n<a name="bots"></a><p class="attribute_definition">\r\n<span class="attribute_definition">bots</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nbots is a dictionary object that contains all client objects on the current \r\nprocess.<br>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href="../Classes/PyClientApp.html">PyBots</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="component"></a><p class="attribute_definition">\r\n<span class="attribute_definition">component</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThis is the component that is running in the current scripting environment. \r\n(So far) Possible values are \'cell\', \'base\', \'client\', \'database\', \'bot\', \r\nand \'editor\'.\r\n</div>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">\u7248\u6743\u5f52KBEngine\u6240\u6709\u3002</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>PyClientApp - KBEngine bots</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>PyClientApp class</h1>\r\n\r\n<p style="text-align: center;"><span class="module_h1">[<a href="../Modules/KBEngine.html" class="module_h1">KBEngine module</a>]</span></p>\r\n<p>PyClientApp is a part of the <a href="../Modules/KBEngine.html">KBEngine</a> \r\nModule. It is is client object created when a client is simulated from \r\nthe bottom of C++. It cannot be created in the script layer directly.</p>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#getSpaceData" class="function_list" >getSpaceData</a>( key ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callbacks</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onDestroy" class="function_list" >onDestroy</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onEnterWorld" class="function_list" >onEnterWorld</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLeaveWorld" class="function_list" >onLeaveWorld</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onEnterSpace" class="function_list" >onEnterSpace</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLeaveSpace" class="function_list" >onLeaveSpace</a>( self ):</span>\r\n</td></tr>\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n\r\n<tr valign=top><td><a href="#id" class="attribute_list" >id</a></td><td> Read-only Integer\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#entities" class="attribute_list" >entities</a></td><td> <a href="Entities.html">Entities</a>\r\n\r\n</table>\r\n\r\n<hr>\r\n<a name="detailed_description"></a><h2>A detailed description</h2>\r\nInstances of class <a href=../../keywords.html#entity>Entity</a> represent \r\ngame objects on the client.\r\n<br><br>\r\n\r\n<br><br>\r\nAn <a href=../../keywords.html#entity>Entity</a> can access its equivalent \r\nentities in the base and cell applications via <a href=../../keywords.html#EntityCall>ENTITYCALL</a>. \r\nThis requires a set of remotely-invoked functions (specified in the entity\'s .def file).\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="getSpaceData"></a><p class="function_definition">\r\n<span class="function_definition">def getSpaceData( <i>key </i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nGet the space data of the specified key.\r\n<br>\r\nThe space data is set by the user on the server through <a href=../../cellapp/Modules/KBEngine.html#setSpaceData>setSpaceData</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>key</i></span></td><td><span class="function_parameter_description">\r\nstring, a string keyword.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nstring, string data for the key\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n\r\n<a name="onDestroy"></a><p class="function_definition">\r\n<span class="function_definition">def onDestroy( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">Called when the entity is destroyed.\r\n</div>\r\n\r\n\r\n<a name="onEnterWorld"></a><p class="function_definition">\r\n<span class="function_definition">def onEnterWorld( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If the entity is not a client-controlled \r\nentity, it indicates that the entity has entered the View scope of the \r\nentity controlled by the client on the server side. At this time, the client \r\ncan see the entity.<br>\r\nIf this entity is a client-controlled entity, it indicates that the entity \r\nhas created a cell on the server and entered space.\r\n</div>\r\n\r\n\r\n\r\n<a name="onLeaveWorld"></a><p class="function_definition">\r\n<span class="function_definition">def onLeaveWorld( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If the entity is not a client-controlled \r\nentity, it indicates that the entity has entered the View scope of the \r\nentity controlled by the client on the server side. At this time, the \r\nclient can see this entity. <br>\r\nIf the entity is a client-controlled entity, it indicates that the \r\nentity has created a cell on the server and entered space.\r\n</div>\r\n\r\n\r\n\r\n<a name="onEnterSpace"></a><p class="function_definition">\r\n<span class="function_definition">def onEnterSpace( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">The client-controlled entity enters a \r\nnew space.\r\n</div>\r\n\r\n\r\n\r\n<a name="onLeaveSpace"></a><p class="function_definition">\r\n<span class="function_definition">def onLeaveSpace( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">The client-controlled entity leaves the \r\ncurrent space.\r\n</div>\r\n\r\n\r\n\r\n<hr>\r\n<h2>Attributes documentation</h2>\r\n\r\n<a name="entities"></a><p class="attribute_definition">\r\n<span class="attribute_definition">entities</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nentities is a dictionary object that contains all the entities in the \r\ncurrent process.<br>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href="Entities.html">Entities</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>Entity - KBEngine bots</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Entity class</h1>\r\n\r\n<p style="text-align: center;"><span class="module_h1">[<a href="../Modules/KBEngine.html" class="module_h1">KBEngine module</a>]</span></p>\r\n<p>Entity is part of the <a href="../Modules/KBEngine.html">KBEngine</a> module. \r\n<a href="#detailed_description">More...</a></p><p></p><pre>import KBEngine</pre>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#moveToPoint" class="function_list" >moveToPoint</a>( self, destination, velocity, distance, userData, faceMovement, moveVertically ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#cancelController" class="function_list" >cancelController</a>( self, controllerID ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callbacks</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onEnterWorld" class="function_list" >onEnterWorld</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLeaveWorld" class="function_list" >onLeaveWorld</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onEnterSpace" class="function_list" >onEnterSpace</a>( self ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLeaveSpace" class="function_list" >onLeaveSpace</a>( self ):</span>\r\n</td></tr>\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'attributes\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Attributes</a></h2>\r\n<table id="attributes" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><a href="#base" class="attribute_list" >base</a></td><td> Read-only <a href=../../keywords.html#EntityCall>ENTITYCALL</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#client" class="attribute_list" >cell</a></td><td> Read-only <a href=../../keywords.html#EntityCall>ENTITYCALL</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#className" class="attribute_list" >className</a></td><td> Read-only <a href="STRING.html">string</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#clientapp" class="attribute_list" >clientapp</a></td><td> Read-only <a href="../Classes/PyClientApp.html">PyClientApp</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#direction" class="attribute_list" >direction</a></td><td> Tuple of 3 floats as (roll, pitch, yaw)\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#id" class="attribute_list" >id</a></td><td> Read-only Integer\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#position" class="attribute_list" >position</a></td><td> <a href=../../keywords.html#vector3>Vector3</a>\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#spaceID" class="attribute_list" >spaceID</a></td><td> Read-only uint32\r\n</td></tr>\r\n\r\n<tr valign=top><td><a href="#isOnGround" class="attribute_list" >isOnGround</a></td><td> Read-only bool\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<hr>\r\n<a name="detailed_description"></a><h2>A detailed description</h2>\r\nInstances of the class <a href=../../keywords.html#entity>Entity</a> \r\nrepresent game objects on the client.\r\n<br><br>\r\n\r\n<br><br>\r\nAn <a href=../../keywords.html#entity>Entity</a> can access its equivalent \r\nentities in the base and cell applications via <a href=../../keywords.html#EntityCall>ENTITYCALL</a>. \r\nThis requires a set of remotely-invoked functions (specified in the entity\'s \r\n.def file).\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="moveToPoint"></a><p class="function_definition">\r\n<span class="function_definition">def moveToPoint( <i>self, destination, velocity, distance, userData, faceMovement, moveVertically</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nMoves the <a href=../../keywords.html#entity>Entity</a> to the given \r\ncoordinate point in a straight line. The callback will be called on \r\nsuccess or failure.<br>\r\nAny <a href="Entity.html">Entity</a> can only have one motion controller \r\nat any time. Repeatedly calling any move function will terminate the \r\nprevious move controller.<br>\r\nReturns a controller ID that can be used to cancel this move.\r\n\r\n<br><br>Example:\r\n<br>You can use <a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a>( movementID ) or \r\n<a href=../../keywords.html#entity>Entity</a>.<a href=Entity.html#cancelController>cancelController</a>( "Movement" ) \r\nto cancel the move. The callback will not be called if the move is cancelled.\r\n<br><br>\r\nThe callback functions are defined as follows:\r\n\r\n<pre>\tdef onMove( self, controllerID, userData ):\r\n\tdef onMoveOver( self, controllerID, userData ):\r\n\tdef onMoveFailure( self, controllerID, userData ):\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_links"><b>See also:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#cancelController">cancelController</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>destination</i></span></td><td><span class="function_parameter_description">\r\nVector3, the target point to which the <a href=../../keywords.html#entity>Entity</a> \r\nis to be moved.</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>velocity</i></span></td><td><span class="function_parameter_description">\r\nfloat, the speed to move the <a href=../../keywords.html#entity>Entity</a> (in m/s).</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>distance</i></span></td><td><span class="function_parameter_description">\r\nfloat, the distance target which if it is within, movement is stopped. \r\nIf the value is 0, it moves to the target position.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>userData</i></span></td><td><span class="function_parameter_description">\r\nobject, user data passed to the callback function.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>faceMovement</i></span></td><td><span class="function_parameter_description">\r\nbool, True if the entity faces the direction of the move. If it is other mechanism, it is False.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>moveVertically</i></span></td><td><span class="function_parameter_description">\r\nbool, set to True means to move in a straight line directly to the point, \r\nand False means to move in a straight line paralell to the ground.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nint, newly created controller ID.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="cancelController"></a><p class="function_definition">\r\n<span class="function_definition">def cancelController( <i>self, controllerID</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe cancelController function stops the effect of a controller on the <a href=../../keywords.html#entity>Entity</a>.\r\nIt can only be called on a <a href=../../keywords.html#real>real</a> entity.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>controllerID</i></span></td><td><span class="function_parameter_description">\r\ninteger, the index of the controller to cancel. A special controller type \r\nstring can also be used. For example, only one movement/navigation controller \r\ncan be activated at a time. This can be cancelled with entity.cancelController("Movement").\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n\r\n\r\n\r\n\r\n<a name="onEnterWorld"></a><p class="function_definition">\r\n<span class="function_definition">def onEnterWorld( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If the entity is not a client-controlled \r\nentity, it indicates that the entity has entered the View scope of the \r\nentity controlled by the client on the server side. At this time, the \r\nclient can see this entity. <br>\r\nIf the entity is a client-controlled entity, it indicates that the entity \r\nhas created a cell on the server and entered space.\r\n</div>\r\n\r\n\r\n\r\n<a name="onLeaveWorld"></a><p class="function_definition">\r\n<span class="function_definition">def onLeaveWorld( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">If the entity is not a client-side \r\ncontrol entity, it indicates that the entity has left the view scope of \r\nthe client-controlled entity on the server side, and the client cannot \r\nsee this entity at this time. <br>\r\nIf the entity is a client-controlled entity, it indicates that the entity \r\nhas destroyed the cell on the server and left space.\r\n</div>\r\n\r\n\r\n\r\n<a name="onEnterSpace"></a><p class="function_definition">\r\n<span class="function_definition">def onEnterSpace( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">The client-controlled entity enters a \r\nnew space.\r\n</div>\r\n\r\n\r\n\r\n<a name="onLeaveSpace"></a><p class="function_definition">\r\n<span class="function_definition">def onLeaveSpace( <i>self</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">The client-controlled entity leaves the \r\ncurrent space.\r\n</div>\r\n\r\n\r\n\r\n<hr>\r\n<h2>Attributes documentation</h2>\r\n\r\n<a name="base"></a><p class="attribute_definition">\r\n<span class="attribute_definition">base</span>\r\n</p>\r\n\r\n<div class="attribute_description">base is the entityCall used to contact \r\nthe base <a href=../../baseapp/classes/Entity.html>Entity</a>. This attribute \r\nis read-only, and is None if this entity does not have an associated base <a href=../../baseapp/classes/Entity.html>Entity</a>.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_links"><b>Other references:</b></span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#clientEntity">clientEntity</a><br><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#allClients">allClients</a><br><a href=../../keywords.html#entity>Entity</a>.<a href="Entity.html#otherClients">otherClients</a><br></td></tr>\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, <a href=../../keywords.html#EntityCall>ENTITYCALL</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="cell"></a><p class="attribute_definition">\r\n<span class="attribute_definition">cell</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\ncell is the <a href=../../keywords.html#EntityCall>ENTITYCALL</a> used to \r\ncontact the cell entity. This attribute is Read-only, and is None if the \r\nbase entity has no associated cell.\r\n<br><br>\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only <a href=../../keywords.html#EntityCall>ENTITYCALL</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="cellData"></a><p class="attribute_definition">\r\n<span class="attribute_definition">cellData</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\ncellData is a dictionary property. Whenever the base entity has not created \r\nits cell entity, the attributes of the cell entity are stored here.\r\n<br><br>\r\nIf the cell entity is created, the values and <a href=#cellData>cellData</a> \r\nattributes will be deleted. In addition to the attributes that the cell \r\nentity specifies in the entity definition file, it also contains position, \r\ndirection, and spaceID.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href="CELLDATADICT.html">CELLDATADICT</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="className"></a><p class="attribute_definition">\r\n<span class="attribute_definition">className</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe class name of the entity.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, string\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="clientapp"></a><p class="attribute_definition">\r\n<span class="attribute_definition">clientapp</span>\r\n</p>\r\n\r\n<div class="attribute_description">\r\n<b>Description:</b><br><br>\r\nThe client (object) to which the current entity belongs.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-only, <a href="../Classes/PyClientApp.html">PyClientApp</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n<a name="position"></a><p class="attribute_definition">\r\n<span class="attribute_definition">position</span>\r\n</p>\r\n\r\n<div class="attribute_description">The coordinates (x, y, z) of this \r\nentity in world space. The data is synchronized from the server to the \r\nclient.\r\n\r\n<br><br>\r\n\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td><a href=../../keywords.html#vector3>Vector3</a>\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="direction"></a><p class="attribute_definition">\r\n<span class="attribute_definition">direction</span>\r\n</p>\r\n\r\n<div class="attribute_description">This attribute describes the orientation \r\nof the <a href=../../keywords.html#entity>Entity</a> in world space. Data \r\nis synchronized from the server to the client.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Vector3, which contains (roll, pitch, yaw) in radians.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n<a name="isOnGround"></a><p class="attribute_definition">\r\n<span class="attribute_definition">isOnGround</span>\r\n</p>\r\n\r\n<div class="attribute_description">If the value of this attribute is True, \r\nthe <a href=../../keywords.html#entity>Entity</a> is on the ground, otherwise \r\nit is False.<br>\r\nIf it is a client-controlled entity, this attribute will be synchronizd \r\nto the server at the time of change, and other entities will be synchronized \r\nto the client by the server. The client can determine this value to reduce \r\nthe cost of accuracy.\r\n</div>\r\n\r\n<p>\r\n<span class="attribute_type">Types:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>Read-write, bool\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine interfaces</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Interfaces process</h1>\r\nThe Interfaces process handles access to third-party platforms for the KBEngine server.<br>\r\n\r\nNote: This processes scripts are is implemented in the scripts/interface directory.\r\n\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine interfaces</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>KBEngine module</h1>\r\nThis <a href="KBEngine.html">KBEngine</a> module mainly \r\nhandles access of third-party platforms for the KBEngine server.\r\n\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addTimer" class="function_list" >addTimer</a>( initialOffset, repeatOffset=0, callbackObj=None ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#accountLoginResponse" class="function_list" >accountLoginResponse</a>( commitName, realAccountName, extraDatas, errorCode ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#createAccountResponse" class="function_list" >createAccountResponse</a>( commitName, realAccountName, extraDatas, errorCode ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#chargeResponse" class="function_list" >chargeResponse</a>( orderID, extraDatas, errorCode ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#delTimer" class="function_list" >delTimer</a>( id ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callbacks</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onInterfaceAppReady" class="function_list" >onInterfaceAppReady</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onInterfaceAppShutDown" class="function_list" >onInterfaceAppShutDown</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onRequestCreateAccount" class="function_list" >onRequestCreateAccount</a>( registerName, password, datas ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onRequestAccountLogin" class="function_list" >onRequestAccountLogin</a>( loginName, password, datas ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onRequestCharge" class="function_list" >onRequestCharge</a>( ordersID, entityDBID, datas ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="addTimer"></a><p class="function_definition">\r\n<span class="function_definition">def addTimer( <i>initialOffset, repeatOffset=0, callbackObj=None</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegisters a timer. The timer triggers the callback function callbackObj. \r\nThe callback function will be executed the first time after "initialOffset" \r\nseconds, and then will be executed once every "repeatOffset" seconds.\r\n<br><br>\r\nExample:\r\n\r\n<pre><pre># Here is an example of using addTimer\r\n import <a href="../Modules/KBEngine.html">KBEngine</a>\r\n \r\n # Add a timer, perform the first time after 5 seconds, and execute once every 1 second. The user parameter is 9\r\n KBEngine.addTimer( 5, 1, onTimer_Callbackfun )\r\n \r\n # Add a timer and execute it after 1 second. The default user parameter is 0.\r\n KBEngine.addTimer( 1, onTimer_Callbackfun )\r\n \r\n def onTimer_Callbackfun( id ):\r\n print "onTimer_Callbackfun called: id %i" % ( id )\r\n # If this is a repeated timer, it is no longer needed, call the following function to remove: \r\n # KBEngine.delTimer( id )</pre>\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>initialOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval in seconds for the timer to register from the first callback.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>repeatOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval (in seconds) between each execution after \r\nthe first callback execution. You must remove the timer with the function \r\n<a href="#delTimer">delTimer</a>, otherwise it will continue to repeat. \r\nValues less than or equal to 0 will be ignored.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callbackObj</i></span></td><td><span class="function_parameter_description">\r\nfunction, the specified callback function object\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>integer, the internal id of the timer. This id can be used to \r\nremove the timer from <a href="#delTimer">delTimer</a>.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="accountLoginResponse"></a><p class="function_definition">\r\n<span class="function_definition">def accountLoginResponse( <i>commitName, realAccountName, extraDatas, errorCode</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nAfter onRequestAccountLogin is called back, the script needs to call this \r\nfunction to give the result of the login processing.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>commitName</i></span></td><td><span class="function_parameter_description">\r\nstring, the name submitted by the client when requested.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>realAccountName</i></span></td><td><span class="function_parameter_description">\r\nstring, returns the real account name (if there are no special requirements \r\nit is ually commitName, this is available when logging in with various \r\nalias accounts).\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>extraDatas</i></span></td><td><span class="function_parameter_description">\r\nbytes, the data attached to the client\'s request. Can forward the data to \r\na third-party platform and provide an opportunity to modify it. This \r\nparameter can be read in the script via the getClientDatas interface of \r\nthe base entity.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>errorCode</i></span></td><td><span class="function_parameter_description">\r\ninteger, error code. If you need to interrupt the user\'s behavior, you \r\ncan set the error code here. The error code can be referenced (KBEngine.SERVER_ERROR_*, \r\ndescribed in kbengine/kbe/res/server/server_errors.xml), otherwise submitting \r\nKBEngine.SERVER_SUCCESS represents permitting the login.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="createAccountResponse"></a><p class="function_definition">\r\n<span class="function_definition">def createAccountResponse( <i>commitName, realAccountName, extraDatas, errorCode</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nAfter onRequestCreateAccount is called back, the script needs to call \r\nthis function to give an account creation processing result.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>commitName</i></span></td><td><span class="function_parameter_description">\r\nstring, the name submitted by the client when requested.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>realAccountName</i></span></td><td><span class="function_parameter_description">\r\nstring, returns the real account name (if there are no special requirements \r\nit is ually commitName, this is available when logging in with various \r\nalias accounts).\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>extraDatas</i></span></td><td><span class="function_parameter_description">\r\nbytes, the data attached to the client\'s request. Can forward the data to \r\na third-party platform and provide an opportunity to modify it. This \r\nparameter can be read in the script via the getClientDatas interface of \r\nthe base entity.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>errorCode</i></span></td><td><span class="function_parameter_description">\r\ninteger, error code. If you need to interrupt the user\'s behavior, you \r\ncan set the error code here. The error code can be referenced (KBEngine.SERVER_ERROR_*, \r\ndescribed in kbengine/kbe/res/server/server_errors.xml), otherwise submitting \r\nKBEngine.SERVER_SUCCESS represents permitting the login.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="chargeResponse"></a><p class="function_definition">\r\n<span class="function_definition">def chargeResponse( <i>orderID, extraDatas, errorCode</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nAfter onRequestCharge is called back, the script needs to call this \r\nfunction to give the billing result.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>ordersID</i></span></td><td><span class="function_parameter_description">\r\nuint64, the ID of the order\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>extraDatas</i></span></td><td><span class="function_parameter_description">\r\nbytes, the data attached to the client\'s request. Can forward the data to \r\na third-party platform and provide an opportunity to modify it. This \r\nparameter can be read in the script via the getClientDatas interface of \r\nthe base entity.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>errorCode</i></span></td><td><span class="function_parameter_description">\r\ninteger, error code. If you need to interrupt the user\'s behavior, you \r\ncan set the error code here. The error code can be referenced (KBEngine.SERVER_ERROR_*, \r\ndescribed in kbengine/kbe/res/server/server_errors.xml), otherwise submitting \r\nKBEngine.SERVER_SUCCESS represents permitting the login.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="delTimer"></a><p class="function_definition">\r\n<span class="function_definition">def delTimer( <i>id</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe delTimer function is used to remove a registered timer. The removed timer is \r\nno longer executed. Single-shot timers are automatically removed after \r\nthe callback is executed, and it is not necessary to use the delTimer \r\nfunction to remove it. If the delTimer function is passed an invalid id \r\n(for example, timer was removed), it will generate an error.\r\n<br><br>\r\nA use case is shown in the <a href="KBEngine.html">KBEngine</a>.<a href="#addTimer">addTimer</a> example.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description">\r\ninteger, which specifies the timer id to remove.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n<a name="onInterfaceAppReady"></a><p class="function_definition">\r\n<span class="function_definition">def onInterfaceAppReady( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when the current process is ready.\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onInterfaceAppShutDown"></a><p class="function_definition">\r\n<span class="function_definition">def onInterfaceAppShutDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when the process shuts down.\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onRequestCreateAccount"></a><p class="function_definition">\r\n<span class="function_definition">def onRequestCreateAccount( <i>registerName, password, datas</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis callback is called when the client requests the server to create \r\nan account.<br><br>\r\n\r\nThe data can be checked and modified within this function, and the final \r\nresult is submitted to the engine through KBEngine.createAccountResponse.\r\n<br>\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>registerName</i></span></td><td><span class="function_parameter_description">\r\nstring, the name submitted by the client when requested.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>password</i></span></td><td><span class="function_parameter_description">\r\nstring, password\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>datas</i></span></td><td><span class="function_parameter_description">\r\nbytes, the data attached to the client\'s request, can forward data to a \r\nthird-party platform.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onRequestAccountLogin"></a><p class="function_definition">\r\n<span class="function_definition">def onRequestAccountLogin( <i>loginName, password, datas</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis callback is called when the client requests the server to login an \r\naccount.<br><br>\r\nThe data can be checked and modified within this function, and the final \r\nresult is submitted to the engine through KBEngine.accountLoginResponse.\r\n<br>\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>loginName</i></span></td><td><span class="function_parameter_description">\r\nstring, the name submitted by the client when requested.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>password</i></span></td><td><span class="function_parameter_description">\r\nstring, password.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>datas</i></span></td><td><span class="function_parameter_description">\r\nbytes, the data attached to the client request, can forward data to a third-party platform.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onRequestCharge"></a><p class="function_definition">\r\n<span class="function_definition">def onRequestCharge( <i>ordersID, entityDBID, datas</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis callback is invoked when billing is requested (usually KBEngine.charge \r\nis called on baseapp).\r\n<br><br>\r\n\r\nData can be checked and modified within this function, and the final result \r\nis submitted to the engine via KBEngine.chargeResponse.\r\n<br>\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>ordersID</i></span></td><td><span class="function_parameter_description">\r\nuint64, the ID of the order.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>entityDBID</i></span></td><td><span class="function_parameter_description">\r\nuint64, the entity DBID of the submitted order.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>datas</i></span></td><td><span class="function_parameter_description">\r\nbytes, the data attached to the client request, can forward data to a \r\nthird-party platform.\r\n</span></td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine logger \u6587\u6863</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>Logger process</h1>\r\nThe Logger process is responsible for collecting logs output by the \r\nKBEngine server.<br>\r\n\r\nNote: This process script is implemented in the scripts/logger directory.\r\n\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n','<html>\r\n<head>\r\n<title>KBEngine - KBEngine logger</title>\r\n<style>A.toc_heading {color:#883333;font-family:Arial;font-size:10pt;font-weight:bold;text-decoration:none;}\r\nA.toc_heading:hover {text-decoration:underline;}\r\nA.toc_entry {color:#3333FF;font-family:Arial;font-size:10pt;font-weight:normal;margin-left:10px;}\r\n\r\nBODY,DIV, TABLE, TR, TD { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\n.function_list {color:#000000;}\r\na.function_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\na.function_list:hover {background-color:#DDDDFF;}\r\n\r\n.function_definition, .attribute_definition {color:#000000;font-weight:bold; background-color:#bbbbbb; width:100%}\r\n\r\n.function_parameter, .function_return, .function_parameter_name, .attribute_type {color:#000000;font-weight:bold;}\r\n\r\n.function_description, .attribute_description {color:#000000;}\r\n\r\n.enumeration_list {color:#000000;}\r\nA.enumeration_list {color:#3333FF;font-weight:bold;text-decoration:none;}\r\nA.enumeration_list:hover { background-color:#DDDDFF;}\r\n\r\n.attribute_list, .class_list { color:#000000; }\r\nA.attribute_list, A.class_list { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA.attribute_list:hover, A.class_list:hover { background-color:#DDDDFF;}\r\n\r\n.module_h1 { color:#000000; font-size:13.0pt; font-weight:bold;}\r\nA.module_h1 { color:#3333FF; font-size:13pt; font-weight:bold; text-decoration:none;}\r\nA.module_h1:hover { background-color:#DDDDFF;}\r\n\r\n.argument { color:#883333; }\r\n\r\nH1 {margin-left:00.0pt;margin-top:05.0pt;margin-bottom:12.0pt;font-size:13.0pt;font-family:Arial;padding-left:2pt;padding-top:4pt;padding-bottom:4pt;color:white;background:#708090;}\r\n\r\nA.H2 { color:white; font-family:Arial; font-size:11pt;}\r\nA.H2:hover { text-background:#DDDDFF;}\r\n\r\nH2 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:12.0pt;font-size:11.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:#aaaaaa;}\r\nH3 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:darkgray;}\r\nH4 {margin-left:00.0pt;margin-top:12.0pt;margin-bottom:03.0pt;font-size:09.0pt;font-family:Arial;padding-left:2pt;padding-top:2pt;padding-bottom:2pt;color:white;background:silver;font-style:oblique}\r\n\r\nP { background:white; font-family:Arial; font-size:9.0pt; }\r\n\r\nA { color:#3333FF; font-weight:bold; text-decoration:none;}\r\nA:hover { background-color:#DDDDFF;}\r\n\r\n/* Copyright Info */\r\np.copyrightFooter { text-align:right; background:#708090; color:white; }\r\nDIV.releaseDate { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:30pt; margin-bottom:0pt; }\r\nDIV.softwareInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.bigworldInfo { font-size:9.0pt; font-weight:bold; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.periodInfo { font-size:9.0pt; font-weight:normal; color:#006699; margin-top:10pt; margin-bottom:0pt; }\r\nDIV.legal { font-size:8.0pt; font-weight:normal; color:#006699; margin-top:05pt; }\r\n</style\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellpadding="0" cellspacing="0">\r\n<tr><td align=left style="background:#708090"> <font size=15 color=#ffffff> KBEngine </font></td></tr>\r\n</table> <hr>\r\n<h1>KBEngine module</h1>\r\nThis <a href="KBEngine.html">KBEngine</a> module provides \r\nPython scripts the ability to control, analyze, and dump certain types \r\nof logs.\r\n\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'functions\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Member functions</a></h2>\r\n<table id="functions" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#addTimer" class="function_list" >addTimer</a>( initialOffset, repeatOffset=0, callbackObj=None ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#delTimer" class="function_list" >delTimer</a>( id ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n<h2><a href="#" onClick="obj=document.getElementById( \'callbacks\' );vis = (obj.style.display == \'none\') ? \'block\' : \'none\'; obj.style.display = vis; return false;" class="h2">Callbacks</a></h2>\r\n<table id="callbacks" cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLoggerAppReady" class="function_list" >onLoggerAppReady</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLoggerAppShutDown" class="function_list" >onLoggerAppShutDown</a>( ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onLogWrote" class="function_list" >onLogWrote</a>( datas ):</span>\r\n</td></tr>\r\n\r\n<tr><td>\r\n<span class="function_list">def <a href="#onReadyForShutDown" class="function_list" >onReadyForShutDown</a>( ):</span>\r\n</td></tr>\r\n\r\n</table>\r\n\r\n\r\n<hr>\r\n<h2>Member functions documentation</h2>\r\n\r\n<a name="addTimer"></a><p class="function_definition">\r\n<span class="function_definition">def addTimer( <i>initialOffset, repeatOffset=0, callbackObj=None</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nRegisters a timer. The timer triggers the callback function callbackObj. \r\nThe callback function will be executed the first time after "initialOffset" \r\nseconds, and then will be executed once every "repeatOffset" seconds.\r\n<br><br>\r\nExample:\r\n\r\n<pre><pre># Here is an example of using addTimer\r\n import <a href="../Modules/KBEngine.html">KBEngine</a>\r\n \r\n # Add a timer, perform the first time after 5 seconds, and execute once every 1 second. The user parameter is 9\r\n KBEngine.addTimer( 5, 1, onTimer_Callbackfun )\r\n \r\n # Add a timer and execute it after 1 second. The default user parameter is 0.\r\n KBEngine.addTimer( 1, onTimer_Callbackfun )\r\n \r\n def onTimer_Callbackfun( id ):\r\n print "onTimer_Callbackfun called: id %i" % ( id )\r\n # If this is a repeated timer, it is no longer needed, call the following function to remove: \r\n # KBEngine.delTimer( id )</pre>\r\n</pre>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>initialOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval in seconds for the timer to register from the first callback.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>repeatOffset</i></span></td><td><span class="function_parameter_description">\r\nfloat, specifies the time interval (in seconds) between each execution after \r\nthe first callback execution. You must remove the timer with the function \r\n<a href="#delTimer">delTimer</a>, otherwise it will continue to repeat. \r\nValues less than or equal to 0 will be ignored.\r\n</span></td></tr>\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>callbackObj</i></span></td><td><span class="function_parameter_description">\r\nfunction, the specified callback function object\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>integer, the internal id of the timer. This id can be used to \r\nremove the timer from <a href="#delTimer">delTimer</a>.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="delTimer"></a><p class="function_definition">\r\n<span class="function_definition">def delTimer( <i>id</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThe delTimer function is used to remove a registered timer. The removed timer is \r\nno longer executed. Single-shot timers are automatically removed after \r\nthe callback is executed, and it is not necessary to use the delTimer \r\nfunction to remove it. If the delTimer function is passed an invalid id \r\n(for example, timer was removed), it will generate an error.\r\n<br><br>\r\nA use case is shown in the KBEngine.<a href="#addTimer">addTimer</a> example.\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>id</i></span></td><td><span class="function_parameter_description">\r\ninteger, which specifies the timer id to remove.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<h2>Callback functions documentation</h2>\r\n\r\n<a name="onLoggerAppReady"></a><p class="function_definition">\r\n<span class="function_definition">def onLoggerAppReady( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when the current process is ready.\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onLoggerAppShutDown"></a><p class="function_definition">\r\n<span class="function_definition">def onLoggerAppShutDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nThis function is called back when the process shuts down.\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n\r\n\r\n<a name="onLogWrote"></a><p class="function_definition">\r\n<span class="function_definition">def onLogWrote( <i>datas</i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this function is implemented in the script, it is invoked when the \r\nlogger process obtains a new log.<br><br>\r\nThe database interface is defined in <a href=../../keywords.html#kbengine_defaults.xml>kbengine_defaults.xml</a>->dbmgr->databaseInterfaces.<br>\r\n\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).<br>\r\n</div>\r\n\r\n<p>\r\n<span class="function_parameter">parameters:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n\r\n<tr valign=top><td><span class="function_parameter_name"><i>datas</i></span></td><td><span class="function_parameter_description">\r\nbytes, log data.\r\n</span></td></tr>\r\n\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n<a name="onReadyForShutDown"></a><p class="function_definition">\r\n<span class="function_definition">def onReadyForShutDown( <i></i> ):</span>\r\n</p>\r\n\r\n<div class="function_description">\r\n<b>Function description:</b><br><br>\r\nIf this function is implemented in the script, it is called when the \r\nprocess is ready to exit.<br><br>\r\n\r\nYou can use this callback to control when the process exits.<br>\r\n<br>Note: This callback interface must be implemented in the portal module ( kbengine_defaults.xml ->entryScriptFile).\r\n</div>\r\n\r\n<p>\r\n<span class="function_return">returns:</span>\r\n<table border=0 cellpadding=0 cellspacing=3 style="margin-left: 20px;">\r\n<tr><td>\r\nbool, if it returns True, it allows the process to exit. Returning other \r\nvalues will cause the process to ask again after a period of time.\r\n</td></tr>\r\n</table>\r\n</p>\r\n\r\n\r\n\r\n\r\n<hr>\r\n<p class="copyrightFooter">Copyright KBEngine</p>\r\n</body>\r\n</html>\r\n'];
var toc_divs = [];
function setup_divs() {
toc_divs = toc_html.map(function(h,i){
var div = document.createElement("div");
div.innerHTML = h;
div.style.display = "none";
contents_window.appendChild(div);
return replaceAllLinks(div, toc_paths[i].split("/"));
});
}
var list_src = [['Getting Started','index.html'],['Keywords','keywords.html'],['Base Types','basetypes.html'],['client_plugins','client/index.html',['Introduction','client/index.html'],['modules','',['KBEngine','client/Modules/KBEngine.html']],['classes','',['Entity','client/Classes/Entity.html']]],['cellapp','cellapp/index.html',['Introduction','cellapp/index.html'],['modules','',['KBEngine','cellapp/Modules/KBEngine.html']],['classes','',['Entity','cellapp/Classes/Entity.html']]],['baseapp','baseapp/index.html',['Introduction','baseapp/index.html'],['modules','',['KBEngine','baseapp/Modules/KBEngine.html']],['classes','',['Entity','baseapp/Classes/Entity.html'],['Proxy','baseapp/Classes/Proxy.html']]],['loginapp','loginapp/index.html',['Introduction','loginapp/index.html'],['modules','',['KBEngine','loginapp/Modules/KBEngine.html']]],['dbmgr','dbmgr/index.html',['Introduction','dbmgr/index.html'],['modules','',['KBEngine','dbmgr/Modules/KBEngine.html']]],['bots','bots/index.html',['Introduction','bots/index.html'],['modules','',['KBEngine','bots/Modules/KBEngine.html']],['classes','',['PyClientApp','bots/Classes/PyClientApp.html'],['Entity','bots/Classes/Entity.html']]],['interfaces','interfaces/index.html',['Introduction','interfaces/index.html'],['modules','',['KBEngine','interfaces/Modules/KBEngine.html']]],['logger','logger/index.html',['Introduction','logger/index.html'],['modules','',['KBEngine','logger/Modules/KBEngine.html']]]];
function makeLowerCase(str) {
if(str && str.length > 0)
return str.toLowerCase();
return str;
}
function hide_text_with_css(elem) {
elem.setAttribute("data-text", elem.textContent)
elem.textContent = ""
elem.classList.add("hide_text_with_css")
}
function mk_hidden_span(text, bgcolor) {
var span = document.createElement("span")
span.innerText = text
if(bgcolor)
span.style.backgroundColor = bgcolor
hide_text_with_css(span)
return span
}
// Recursively iterate list src and generate
var tmplid = 0;
const dom_parser = new DOMParser();
var first_page = null;
var contents_window = document.getElementById("contents_window");
var allContentSpans = [];
var gendList;
function generateList(src)
{
var ul = document.createElement("ul");
for(var i=0; i<src.length; i++)
{
var isFolder = src[i].length > 2;
var li = document.createElement("li");
ul.appendChild(li);
var chk = document.createElement("input");
chk.type = "checkbox"
chk.id = "gen_list_item-"+(tmplid++);
if(!isFolder)
chk.className += " not_folder";
chk.isFolder = isFolder;
li.appendChild(chk);
if(first_page == null)
first_page = chk;
var label = document.createElement("label");
label.htmlFor = chk.id;
chk.myLabel = label;
li.appendChild(label);
var span = mk_hidden_span(src[i][0]);
label.appendChild(span);
chk.mySpan = span;
allContentSpans.push(span);
chk.myPath = src[i][1];
chk.highlight_select = function() {
allContentSpans.forEach(function(s){s.style.backgroundColor="";s.style.color=""; s.style.border="";s.isHighlighted = false;});
this.mySpan.isHighlighted = true;
this.mySpan.style.backgroundColor = "#5790ff";
this.mySpan.style.color = "white";
this.mySpan.style.border = "1px dotted black";
}
chk.onclick = function(evt) {
if(this.myPath.length > 0 && !this.mySpan.isHighlighted) {
justManuallyChangedHash = true;
console.log("setting page "+this.myPath);
set_page(this.myPath);
}
this.highlight_select();
if(isFolder) {
return true;
}
event.preventDefault();
}
// use li to check the checkbox incase you hit the space inbetween 2 check labels
li.myChk = chk;
li.onclick = function(evt) {
if(this.myUL && this.myUL.contains(evt.target))
return true; //let child li handle
else if(this.myChk.contains(evt.target)){
return true; // let checkbox handle
} else {
this.myChk.click();
return false; // handled, stop
}
}
if(isFolder) {
var my_ul = generateList( src[i].slice(2) );
li.appendChild(my_ul);
li.myUL = my_ul;
}
}
return ul;
}
function cmpArr(a1, a2) {
if(!Array.isArray(a1) || !Array.isArray(a2) || a1.length != a2.length)
return;
for(var i=0; i<a1.length; i++) {
if(a1[i] != a2[i])
return false;
}
return true;
}
function expandAndSelectFile(hash_path, _checkbox_list, _element) {
if(!Array.isArray(_checkbox_list))
_checkbox_list = [];
if(!_element)
_element = gendList;
// traverse dom tree for checkboxes
var last_checkbox = null;
var children = Array.prototype.slice.call(_element.childNodes);
for(var i=0; i<children.length; i++) {
var child = children[i];
if(child.tagName == "LI" || child.tagName == "UL") {
if(last_checkbox != null && expandAndSelectFile(hash_path, _checkbox_list.concat([last_checkbox]), child)) {
return true;
} else if(expandAndSelectFile(hash_path, _checkbox_list, child)) {
return true;
}
}
else if(child.tagName == "INPUT" && child.type == "checkbox") {
last_checkbox = child;
if( !child.isFolder && child.myPath.toLowerCase() == hash_path.toLowerCase() ) {
// expand each folder and click the file
_checkbox_list.forEach(function(c){c.checked = true;})
child.highlight_select();
return true;
}
}
}
return false;
}
function scrollElemToAnchor(inside_elem, anchor_name) {
anchor_lower = anchor_name.toLowerCase();
var all = Array.from(inside_elem.getElementsByTagName("*"));
var allMatches = []
var caseMatches = []
all.forEach(function(e){
if(!e.getAttribute("name"))
return
else if(e.getAttribute("name") == anchor_name)
caseMatches.push(e)
else if(e.getAttribute("name").toLowerCase() == anchor_lower)
allMatches.push(e)
})
allMatches = caseMatches.concat(allMatches);
if(allMatches.length > 0)
allMatches[0].scrollIntoView();
}
function isWWWLink(value) {
return /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(value);
}
function getCenter(quotedSpacedStr) {
str = quotedSpacedStr.trim();
if((str.charAt(0) == '"' || str.charAt(0) == "'") && str.length >= 2) {
return str.slice(1,str.length-1);
}
return str;
}
var scrollIds = {};
var curScrollId = 0;
var curDiv = null;
window.addEventListener('scroll', function(evt) {
if(curDiv)
scrollIds[curScrollId] = curDiv.scrollTop;
}, true);
function replaceAllLinks(div, path) {
//move style & script tags to base for search cache
remove_html_body_style_script(div);
div.tabIndex = -1;
div.style.outline = "none";
var links = Array.from(div.getElementsByTagName("a"));
var path_text = path.join("/");
for(var i=0; i<links.length; i++) {
var l = links[i];
//console.log(l.href);
var href = l.getAttribute("href");
if(!href || href.length <= 1) {
this.href = this.initHref = "";
continue;
}
else if(isWWWLink(href)) {
continue;
}
else if(href.charAt(0) == "#") { //link to cur page
l.href = l.initHref = "#"+path_text + href;
} else {
//count ../'s and prefix with proper dir
var count = (href.match(/\.\.\//g) || []).length;
var prefix = path.slice(0, Math.max(0, path.length - 1 - count)).join("/");
l.href = l.initHref = "#"+prefix + (prefix.length>0?"/":"") + href.replace(/\.\.\//g, "");
}
l.onmouseup = l.onkeyup = function(evt) {
this.href = this.initHref + "?id=" + (curScrollId+1);
var tmp = scrollIds[curScrollId+1];
delete scrollIds[curScrollId+1];
saveScrollInfo();
var linkOpenedInNewTab = evt && (evt.button == 2 || evt.ctrlKey);
if(linkOpenedInNewTab)
scrollIds[curScrollId+1] = tmp;
}
}
return div;
}
function remove_html_body_style_script(div) {
var style_script = Array.from(div.getElementsByTagName("style")).concat(Array.from(div.getElementsByTagName("script")));
var to_remove = Array.from(div.getElementsByTagName("title"));
to_remove.forEach(function(e){e.remove();});
var dummy_script = document.createElement("script");
// marker for search functions
dummy_script.innerHTML = "/*htmlCHM END OF STYLE AND SCRIPTS htmlCHM*/ ";
if(div.firstChild)
div.insertBefore(dummy_script, div.firstChild);
else
div.appendChild(dummy_script);
// move styles to beginning
for(var i=0; i<style_script.length; i++) {
style_script[i].remove();
div.insertBefore(style_script[i], dummy_script);
}
var body_elems = Array.from(div.getElementsByTagName("body"));
div.innerHTML = body_elems.length == 0?div.innerHTML:body_elems[0].innerHTML;
}
function tryGetFilePathFromFolder(folder_path) {
var match_paths = toc_paths.filter(function(path){return path.startsWith(folder_path)});
match_paths = match_paths.filter(function(path){
return path.endsWith("index.html") || path.endsWith("index.htm")
|| path.endsWith("default.html") || path.endsWith("default.htm")
|| path.endsWith("home.html") || path.endsWith("home.htm")
});
if(match_paths.length >= 1)
return match_paths[0];
if(match_paths.length == 0)
return folder_path;
}
function openFileAtPos(hash, noJump) {
hash = hash.slice(hash.charAt(0) == "#"? 1:0);
var hashInfo = getHashInfo(hash);
// open given doc, inside given folder
var file_path = hashInfo.page.toLowerCase(); // all to lowercase since case doesn't matter in windows and normal CHM files
if(toc_paths.indexOf(file_path) == -1)
file_path = tryGetFilePathFromFolder(file_path);
var path_index = toc_paths.indexOf(file_path);
if(path_index > -1) {
console.log("opening "+file_path);
toc_divs.forEach((d)=>d.style.display = "none");
curDiv = toc_divs[path_index];
curDiv.style.display = "";
if(!noJump)
scrollElemToAnchor(curDiv, hashInfo.jumpto);
curDiv.focus();
} else {
console.log(file_path+" does not exist");
}
}
function makeHashFromInfo(hashInfo) {
var page = (hashInfo.page?"#":"")+(hashInfo.page||"")
var jumpto = (hashInfo.jumpto?"#":"")+(hashInfo.jumpto||"")
var GET = ""
var keys = Object.keys(hashInfo.GET)
for(var i=0; i<keys.length; i++){
var key = keys[i]
var val = hashInfo.GET[key]
GET += (key + (val!==""?"=":"") + val)
}
if(GET.length > 0)
GET = "?" + GET
console.log(GET)
return page+jumpto+GET
}
function getHashInfo(hash) {
var full = hash;
var page = hash;
var jumpto = "";
var GET = {};
if(hash.charAt(0) == "#")
page = hash.substring(1);
if(page.indexOf("?") > -1) {
GET = page.substring(page.indexOf("?")+1);
var GETkv = {}
GET.split("&").forEach(function(v){
v = v.split("=")
GETkv[v[0]] = v.length > 1? v[1]:""
})
GET = GETkv
page = page.substring(0, page.indexOf("?"));
}
if(page.indexOf("#") > -1) {
jumpto = page.substring(page.indexOf("#")+1);
page = page.substring(0, page.indexOf("#"));
}
return {full:full, page:page, jumpto:jumpto, GET:GET};
}
var lastClickTime = 0;
document.addEventListener("click", function(evnt){
lastClickTime = Date.now();
});
var justManuallyChangedHash = false;
window.onhashchange = function() {
var hashInfo = getHashInfo(location.hash);
curScrollId = parseInt(hashInfo.GET.id)||0;
if(!justManuallyChangedHash)
expandAndSelectFile(hashInfo.page);
justManuallyChangedHash = false;
if(location.hash.charAt(0) == "#") {
openFileAtPos(location.hash.slice(1), scrollIds[curScrollId]);
if(!curDiv || curScrollId <= 0)
return;
// new GET scroll id exists, scroll to saved position
if(curScrollId in scrollIds) {
console.log("scroll id "+ curScrollId +" exists. scrolling to "+scrollIds[curScrollId]);
curDiv.scrollTop = scrollIds[curScrollId];
}
else {
scrollIds[curScrollId] = curDiv.scrollTop;
if(!hashInfo.jumpto)
curDiv.scrollTop = 0;
}
}
if(queue_select.length > 0) {
console.log(queue_select)
setSelectionRange(queue_select[0], queue_select[1], queue_select[2]);
queue_select = [];
}
}
function openTab(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
document.getElementById("defaultopen").click();
var index_tab = document.getElementById("tab_index");
var index_table = document.getElementById("index_table");
var index_filter_text = document.getElementById("index_filter_text");
var all_table_indexes = [];
function populateIndex() {
for(var i=0; i<index_names.length; i++) {
var tr = document.createElement("tr");
var td = document.createElement("td");
td.style.padding = "5px";
td.innerHTML = index_names[i];
all_table_indexes.push(td);
td.style.border = "1px solid transparent";
td.docLink = index_links[i];
td.onclick = function() {
all_table_indexes.forEach(function(s){s.style.backgroundColor="";s.style.color=""; s.style.border="1px solid transparent"});
this.style.backgroundColor = "#5790ff";
this.style.color = "white";
this.style.border = "1px dotted black";
set_page(this.docLink)
}
tr.appendChild(td);
index_table.appendChild(tr);
}
}
index_filter_text.oninput = function() {
var trs = Array.from(index_table.getElementsByTagName("tr"));
var val = this.value.toLowerCase();
for(var i=0; i<trs.length; i++) {
if(trs[i].innerHTML.toLowerCase().indexOf(val) > -1)
trs[i].style.display = "";
else
trs[i].style.display = "none";
}
}
function getTextNodesIn(node) {
var textNodes = [];
if (node.nodeType == 3) {
textNodes.push(node);
} else {
var children = node.childNodes;
for (var i = 0, len = children.length; i < len; ++i) {
textNodes.push.apply(textNodes, getTextNodesIn(children[i]));
}
}
//console.log(textNodes)
return textNodes;
}
function set_page(path) {
location.hash = "#" + path + "?id=" + (curScrollId+1);
delete scrollIds[curScrollId+1];
}
function getLastElementBeforePos(pos, parent) {
var text_nodes = getTextNodesIn(parent);
var text_len = 0;
for(var i=0; i<text_nodes.length; i++) {
var node = text_nodes[i];
if(node.data.length + text_len < pos) {
text_len += node.data.length
}
else {
return node.parentNode;
}
}
}
var queue_select = [];
function setSelectionRange(el, start, end) {
if (document.createRange && window.getSelection) {
var range = document.createRange();
range.selectNodeContents(el);
var textNodes = getTextNodesIn(el);
var foundStart = false;
var charCount = 0, endCharCount;
for (var i = 0, textNode; textNode = textNodes[i++]; ) {
endCharCount = charCount + textNode.length;
if (!foundStart && start >= charCount
&& (start < endCharCount ||
(start == endCharCount && i <= textNodes.length))) {
range.setStart(textNode, start - charCount);
foundStart = true;
}
if (foundStart && end <= endCharCount) {
range.setEnd(textNode, end - charCount);
break;
}
charCount = endCharCount;
}
var sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
} else if (document.selection && document.body.createTextRange) {
var textRange = document.body.createTextRange();
textRange.moveToElementText(el);
textRange.collapse(true);
textRange.moveEnd("character", end);
textRange.moveStart("character", start);
textRange.select();
}
// also scroll text into view
var elementAbove = getLastElementBeforePos(start, el)
if(elementAbove) {
curDiv.scrollTop = elementAbove.offsetTop;
}
}
var search_text = document.getElementById("search_text");
var search_table = document.getElementById("search_table");
var all_search_tds = [];
function add_search_result(path, div, text_start, text_end, pre, mid, post) {
//setSelectionRange(div, text_start, text_end);
var tr = document.createElement("tr");
var td = document.createElement("td");
td.style.padding = "5px";
td.style.border = "1px solid transparent";
td.style.backgroundColor = "transparent";
var text_div = document.createElement("div");
var path_div = document.createElement("div");
text_div.style.textAlign = "center";
text_div.style.marginLeft = "-100%";
text_div.style.marginRight = "-100%";
//text_div.style.width = "100%"
text_div.style.overflow = "hidden";
text_div.style.backgroundColor = "transparent";
path_div.style.overflow = "hidden";
path_div.style.color = "#bbb";
path_div.style.backgroundColor = "transparent";
text_div.innerHTML = mk_hidden_span(pre).outerHTML+mk_hidden_span(mid, "#b0befc").outerHTML+mk_hidden_span(post).outerHTML;
//text_div.className += "fade_sides_div";
path_div.innerHTML = mk_hidden_span(path).outerHTML;
tr.appendChild(td);
td.appendChild(text_div);
td.appendChild(path_div);
td.path = path;
td.div = div;
td.text_start = text_start;
td.text_end = text_end;
td.onclick = function() {
all_search_tds.forEach(function(s){s.style.backgroundColor="";s.style.color=""; s.style.border="1px solid transparent"});
this.style.backgroundColor = "#5790ff";
this.style.color = "white";
this.style.border = "1px dotted black";
queue_select = [this.div, this.text_start, this.text_end];
set_page(this.path);
}
all_search_tds.push(td);
search_table.appendChild(tr);
}
search_text.oninput = function() {
search_table.innerHTML = "";
if(this.value.trim()) {
var search_text_value = this.value.toLowerCase();
all_search_tds = [];
for(var i=0; i<toc_paths.length; i++) {
var path = toc_paths[i];
var div = toc_divs[i];
var text_start = -1;
var text_end = -1;
var pre = "";
var post = "";
if(div.textContent) {
text_start = div.textContent.toLowerCase().indexOf(search_text_value, div.textContent.indexOf("/*htmlCHM END OF STYLE AND SCRIPTS htmlCHM*/")+"/*htmlCHM END OF STYLE AND SCRIPTS htmlCHM*/".length);
text_end = text_start+search_text_value.length;
}
if(text_start > -1) {
pre = div.textContent.substring(text_start-15, text_start);
var mid = div.textContent.substring(text_start, text_end);
post = div.textContent.substring(text_end, text_end+20);
add_search_result(path, div, text_start, text_end, pre, mid, post);
}
}
}
}
function bake_cookie(name, value) {
var cookie = [name, '=', JSON.stringify(value), '; domain=.', window.location.host.toString(), '; path=/;'].join('');
document.cookie = cookie;
}
window.getCookie = function(name) {
match = document.cookie.match(new RegExp(name + '=([^;]+)'));
if (match) return match[1];
}
//save scrolls between refresh
window.onbeforeunload = function(){saveScrollInfo()}
function saveScrollInfo() {
localStorage.setItem("scroll_info", JSON.stringify({
curScrollId:curScrollId,
scrollIds:scrollIds
}));
}
function linkedSearch() {
var GETLoc = window.location.href.indexOf("?")
var hashLoc = window.location.href.indexOf("#")
if(GETLoc > hashLoc) {
var GET = window.location.href.substring(GETLoc+1)
if(GET.startsWith("search=")) {
var searchText = GET.split("&")[0].split("=")[1]
document.getElementById("searchtabbutton").click();
search_text.value = decodeURI(searchText)
search_text.oninput()
}
}
}
window.onload = function() {
var scroll_info = localStorage.getItem("scroll_info");
if(scroll_info) {
scroll_info = JSON.parse(scroll_info);
curScrollId = scroll_info.curScrollId;
scrollIds = scroll_info.scrollIds;
}
document.getElementById("tstlist").appendChild( gendList = generateList(list_src) );
setup_divs();
populateIndex();
linkedSearch()
var originalHash = location.hash
var newHash = originalHash
var hashInfo = getHashInfo(location.hash)
hashInfo.page = hashInfo.page || "index.html"
hashInfo.jumpto = hashInfo.jumpto || ""
if(!hashInfo.GET.id) {
hashInfo.GET.id = 1
delete scrollIds[1];
}
var newHash = makeHashFromInfo(hashInfo)
if(originalHash == newHash)
window.onhashchange()
else
location.hash = newHash
}
</script>
</body>
</html>