@@ -909,7 +909,7 @@ KBEngine.mappingDataType = function(writer, argType)
909909 KBEngine . datatype2id [ "DATATYPE" ] = 2 ;
910910 KBEngine . datatype2id [ "CHAR" ] = 2 ;
911911 KBEngine . datatype2id [ "DETAIL_TYPE" ] = 2 ;
912- KBEngine . datatype2id [ "MAIL_TYPE " ] = 2 ;
912+ KBEngine . datatype2id [ "ENTITYCALL_TYPE " ] = 2 ;
913913
914914 KBEngine . datatype2id [ "UINT16" ] = 3 ;
915915 KBEngine . datatype2id [ "UNSIGNED SHORT" ] = 3 ;
@@ -950,7 +950,7 @@ KBEngine.mappingDataType = function(writer, argType)
950950 KBEngine . datatype2id [ "PY_DICT" ] = 10 ;
951951 KBEngine . datatype2id [ "PY_TUPLE" ] = 10 ;
952952 KBEngine . datatype2id [ "PY_LIST" ] = 10 ;
953- KBEngine . datatype2id [ "MAILBOX " ] = 10 ;
953+ KBEngine . datatype2id [ "ENTITYCALL " ] = 10 ;
954954
955955 KBEngine . datatype2id [ "BLOB" ] = 11 ;
956956
@@ -1353,7 +1353,7 @@ KBEngine.Entity = KBEngine.Class.extend(
13531353 return ;
13541354 }
13551355
1356- this . base . newMail ( ) ;
1356+ this . base . newCall ( ) ;
13571357 this . base . bundle . writeUint16 ( methodID ) ;
13581358
13591359 try
@@ -1378,7 +1378,7 @@ KBEngine.Entity = KBEngine.Class.extend(
13781378 return ;
13791379 }
13801380
1381- this . base . postMail ( ) ;
1381+ this . base . sendCall ( ) ;
13821382 } ,
13831383
13841384 cellCall : function ( )
@@ -1412,7 +1412,7 @@ KBEngine.Entity = KBEngine.Class.extend(
14121412 return ;
14131413 }
14141414
1415- this . cell . newMail ( ) ;
1415+ this . cell . newCall ( ) ;
14161416 this . cell . bundle . writeUint16 ( methodID ) ;
14171417
14181418 try
@@ -1437,7 +1437,7 @@ KBEngine.Entity = KBEngine.Class.extend(
14371437 return ;
14381438 }
14391439
1440- this . cell . postMail ( ) ;
1440+ this . cell . sendCall ( ) ;
14411441 } ,
14421442
14431443 enterWorld : function ( )
@@ -1517,36 +1517,36 @@ KBEngine.Entity = KBEngine.Class.extend(
15171517} ) ;
15181518
15191519/*-----------------------------------------------------------------------------------------
1520- mailbox
1520+ EntityCall
15211521-----------------------------------------------------------------------------------------*/
1522- KBEngine . MAILBOX_TYPE_CELL = 0 ;
1523- KBEngine . MAILBOX_TYPE_BASE = 1 ;
1522+ KBEngine . ENTITYCALL_TYPE_CELL = 0 ;
1523+ KBEngine . ENTITYCALL_TYPE_BASE = 1 ;
15241524
1525- KBEngine . Mailbox = function ( )
1525+ KBEngine . EntityCall = function ( )
15261526{
15271527 this . id = 0 ;
15281528 this . className = "" ;
1529- this . type = KBEngine . MAILBOX_TYPE_CELL ;
1529+ this . type = KBEngine . ENTITYCALL_TYPE_CELL ;
15301530 this . networkInterface = KBEngine . app ;
15311531
15321532 this . bundle = null ;
15331533
15341534 this . isBase = function ( )
15351535 {
1536- return this . type == KBEngine . MAILBOX_TYPE_BASE ;
1536+ return this . type == KBEngine . ENTITYCALL_TYPE_BASE ;
15371537 }
15381538
15391539 this . isCell = function ( )
15401540 {
1541- return this . type == KBEngine . MAILBOX_TYPE_CELL ;
1541+ return this . type == KBEngine . ENTITYCALL_TYPE_CELL ;
15421542 }
15431543
1544- this . newMail = function ( )
1544+ this . newCall = function ( )
15451545 {
15461546 if ( this . bundle == null )
15471547 this . bundle = new KBEngine . Bundle ( ) ;
15481548
1549- if ( this . type == KBEngine . MAILBOX_TYPE_CELL )
1549+ if ( this . type == KBEngine . ENTITYCALL_TYPE_CELL )
15501550 this . bundle . newMessage ( KBEngine . messages . Baseapp_onRemoteCallCellMethodFromClient ) ;
15511551 else
15521552 this . bundle . newMessage ( KBEngine . messages . Base_onRemoteMethodCall ) ;
@@ -1556,7 +1556,7 @@ KBEngine.Mailbox = function()
15561556 return this . bundle ;
15571557 }
15581558
1559- this . postMail = function ( bundle )
1559+ this . sendCall = function ( bundle )
15601560 {
15611561 if ( bundle == undefined )
15621562 bundle = this . bundle ;
@@ -2148,7 +2148,7 @@ KBEngine.DATATYPE_UNICODE = function()
21482148 }
21492149}
21502150
2151- KBEngine . DATATYPE_MAILBOX = function ( )
2151+ KBEngine . DATATYPE_ENTITYCALL = function ( )
21522152{
21532153 this . bind = function ( )
21542154 {
@@ -2328,7 +2328,7 @@ KBEngine.datatypes["VECTOR3"] = new KBEngine.DATATYPE_VECTOR3;
23282328KBEngine . datatypes [ "VECTOR4" ] = new KBEngine . DATATYPE_VECTOR4 ;
23292329KBEngine . datatypes [ "PYTHON" ] = new KBEngine . DATATYPE_PYTHON ( ) ;
23302330KBEngine . datatypes [ "UNICODE" ] = new KBEngine . DATATYPE_UNICODE ( ) ;
2331- KBEngine . datatypes [ "MAILBOX " ] = new KBEngine . DATATYPE_MAILBOX ( ) ;
2331+ KBEngine . datatypes [ "ENTITYCALL " ] = new KBEngine . DATATYPE_ENTITYCALL ( ) ;
23322332KBEngine . datatypes [ "BLOB" ] = new KBEngine . DATATYPE_BLOB ( ) ;
23332333
23342334/*-----------------------------------------------------------------------------------------
@@ -3421,10 +3421,10 @@ KBEngine.KBEngineApp = function(kbengineArgs)
34213421 entity . id = eid ;
34223422 entity . className = entityType ;
34233423
3424- entity . base = new KBEngine . Mailbox ( ) ;
3424+ entity . base = new KBEngine . EntityCall ( ) ;
34253425 entity . base . id = eid ;
34263426 entity . base . className = entityType ;
3427- entity . base . type = KBEngine . MAILBOX_TYPE_BASE ;
3427+ entity . base . type = KBEngine . ENTITYCALL_TYPE_BASE ;
34283428
34293429 KBEngine . app . entities [ eid ] = entity ;
34303430
@@ -3627,10 +3627,10 @@ KBEngine.KBEngineApp = function(kbengineArgs)
36273627 entity . id = eid ;
36283628 entity . className = entityType ;
36293629
3630- entity . cell = new KBEngine . Mailbox ( ) ;
3630+ entity . cell = new KBEngine . EntityCall ( ) ;
36313631 entity . cell . id = eid ;
36323632 entity . cell . className = entityType ;
3633- entity . cell . type = KBEngine . MAILBOX_TYPE_CELL ;
3633+ entity . cell . type = KBEngine . ENTITYCALL_TYPE_CELL ;
36343634
36353635 KBEngine . app . entities [ eid ] = entity ;
36363636
@@ -3653,10 +3653,10 @@ KBEngine.KBEngineApp = function(kbengineArgs)
36533653 {
36543654 if ( ! entity . inWorld )
36553655 {
3656- entity . cell = new KBEngine . Mailbox ( ) ;
3656+ entity . cell = new KBEngine . EntityCall ( ) ;
36573657 entity . cell . id = eid ;
36583658 entity . cell . className = entityType ;
3659- entity . cell . type = KBEngine . MAILBOX_TYPE_CELL ;
3659+ entity . cell . type = KBEngine . ENTITYCALL_TYPE_CELL ;
36603660
36613661 // 安全起见, 这里清空一下
36623662 // 如果服务端上使用giveClientTo切换控制权
0 commit comments