kbengine_unity3d_plugins
========================
Usage
---------------------
1: Create clientapp.cs
using KBEngine;
public class clientapp : KBEMain
{
}
2: Implment the KBE defined entity (including the client part)
See: kbengine\kbengine_demos_assets\scripts\entities.xml��hasClient="true" need to implment
<Account hasClient="true"></Account>
<Monster hasClient="true"></Monster>
<Gate hasClient="true"></Gate>
<Space/>
public class Account : KBEngine.GameObject
{
// entity initialization
public override void __init__()
{
}
}
Call entity server method
entity.baseCall("base_func", 1, "arg2", "argN")
entity.cellCall("cell_func", 1, "arg2", "argN")
3: Monitor KBE-plugins event
public class UI : MonoBehaviour
{
void Start ()
{
KBEngine.Event.registerOut("onConnectStatus", this, "onConnectStatus");
}
public void onConnectStatus(bool success)
{
// KBE-plugins event fired
}
}
4: Fire events to the KBE-plugins
KBEngine.Event.fireIn("login", "stringAccount", "stringPasswd", System.Text.Encoding.UTF8.GetBytes("kbengine_unity3d_demo"));
KBE-Plugin fire-out events(KBE => Unity):
---------------------
Entity events:
onEnterWorld
Description:
Entity enter the client-world.
Event-datas:
Enity
onLeaveWorld
Description:
Entity leave the client-world.
Event-datas:
Enity
onEnterSpace
Description:
Player enter the new space.
Event-datas:
Enity
onLeaveSpace
Description:
Player enter the space.
Event-datas:
Enity
onCreateAccountResult
Description:
Create account feedback results.
Event-datas:
uint16: retcode
http://kbengine.org/docs/configuration/server_errors.html
bytes: datas
If you use third-party account system, the system may fill some of the third-party additional datas.
set_position
Description:
Sets the current position of the entity.
Event-datas:
Enity
set_direction
Description:
Sets the current direction of the entity.
Event-datas:
Enity
updatePosition
Description:
The entity position is updated, you can smooth the moving entity to new location.
Event-datas:
Enity
Protocol events:
onVersionNotMatch
Description:
Engine version mismatch.
Event-datas:
string: clientVersion
string: serverVersion
onScriptVersionNotMatch
Description:
script version mismatch.
Event-datas:
string: clientScriptVersion
string: serverScriptVersion
Loginapp_importClientMessages
Description:
Importing the message protocol for loginapp and client.
Event-datas:
No datas.
Baseapp_importClientMessages
Description:
Importing the message protocol for baseapp and client.
Event-datas:
No datas.
Baseapp_importClientEntityDef
Description:
Protocol description for importing entities.
Event-datas:
No datas.
Login and Logout status:
onLoginBaseapp
Description:
Login to baseapp.
Event-datas:
No datas.
onReLoginBaseapp
Description:
Relogin to baseapp.
Event-datas:
No datas.
onKicked
Description:
Kicked of the current server.
Event-datas:
uint16: retcode
http://kbengine.org/docs/configuration/server_errors.html
onLoginFailed
Description:
Login failed.
Event-datas:
uint16: retcode
http://kbengine.org/docs/configuration/server_errors.html
onLoginBaseappFailed
Description:
Login baseapp failed.
Event-datas:
uint16: retcode
http://kbengine.org/docs/configuration/server_errors.html
onReLoginBaseappFailed
Description:
Relogin baseapp failed.
Event-datas:
uint16: retcode
http://kbengine.org/docs/configuration/server_errors.html
onReLoginBaseappSuccessfully
Description:
Relogin baseapp success.
Event-datas:
No datas.
Space events:
addSpaceGeometryMapping
Description:
The current space is specified by the geometry mapping.
Popular said is to load the specified Map Resources.
Event-datas:
string: resPath
onSetSpaceData
Description:
Server spaceData set data.
Event-datas:
int32: spaceID
string: key
string value
onDelSpaceData
Description:
Server spaceData delete data.
Event-datas:
int32: spaceID
string: key
Network events:
onConnectStatus
Description:
Status of connection server.
Event-datas:
bool: success or fail
onDisableConnect
Description:
Status of connection server.
Event-datas:
No datas.
KBE-Plugin fire-in events(Unity => KBE):
---------------------
createAccount
Description:
Create new account.
Event-datas:
string: accountName
string: password
bytes: datas
Datas by user defined.
Data will be recorded into the KBE account database, you can access the datas through the script layer.
If you use third-party account system, datas will be submitted to the third-party system.
login
Description:
Login to server.
Event-datas:
string: accountName
string: password
bytes: datas
Datas by user defined.
Data will be recorded into the KBE account database, you can access the datas through the script layer.
If you use third-party account system, datas will be submitted to the third-party system.
reLoginBaseapp
Description:
Relogin to baseapp.
Event-datas:
No datas.
resetPassword
Description:
Reset password.
Event-datas:
string: accountName
newPassword
Description:
Request to set up a new password for the account.
Note: account must be online
Event-datas:
string: old_password
string: new_password
bindAccountEmail
Description:
Request server binding account Email.
Note: account must be online
Event-datas:
string: emailAddress
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
unity邵阳MJ游戏源码-2dmajiang.zip Unity精品小游戏源码 , Unity完整项目源码 是Unitypackage包 , 新建空项目直接导入到项目里面就可以运行了,无需其他操作。 适合二次开发和学习使用,都是经典游戏,需要其他游戏源码包可以看我主页。 直接可以运行 , 如果运行不了 请切换编译器版本 2021 3.14版本编译器测试没问题 其他版本请自行尝试。 有别的资源或代码需求可以通过我的主页联系 谢谢! Unity游戏代码 ,Unity经典游戏源码 , Unity休闲游戏源码, Unity容易上手的游戏源码,Unity小游戏源码,Unity新手练习源码,Unity个人开发源码,Unity优秀项目,Unity商店优秀作品。 如果运行或测试时遇到问题,可随时联系我
资源推荐
资源详情
资源评论
收起资源包目录
unity邵阳MJ游戏源码-2dmajiang.zip (2000个子文件)
00000000000000001000000000000000 4KB
00000000000000002000000000000000 4KB
00000000000000003000000000000000 4KB
00000000000000004000000000000000 4KB
00000000000000004100000000000000 4KB
00000000000000005000000000000000 4KB
00000000000000005100000000000000 4KB
00000000000000006000000000000000 4KB
00000000000000006100000000000000 4KB
00000000000000007000000000000000 4KB
00000000000000007100000000000000 4KB
00000000000000008000000000000000 4KB
00000000000000008100000000000000 4KB
00000000000000009000000000000000 4KB
0000000000000000a000000000000000 4KB
0000000000000000a100000000000000 4KB
0000000000000000b000000000000000 4KB
0000000000000000c000000000000000 4KB
000c1ebcdc67a2c469c30d5900b590f4 16KB
001c15374797e9e4591a5bf9c1cf2cf7 1.01MB
001f2da1137827e41878943939f3e7c5 5KB
002750f37e6b94e4cba8cf6c567a21db 19KB
002e21d0268290440a010a777b0acba6 104KB
004713d2b2dc6b54fb59cd24b8f98251 38KB
004c96f2e1cc34c4cb492dd41b074efe 38KB
00573d06217d11544a3caeb5a1887034 1.34MB
0075c7db09bab50498431b27619b9272 4KB
007d5d5ea5b2cad4da27af5e109dcffa 20KB
0098e6338f4c7f844bdfac2759e61065 13KB
00c4bb4341744a445b20aaad2fbf1b87 20KB
00c95ffcf9a979245802657905d670b4 634KB
00d5f09ced0d10f4ba9ceec2c33c5db0 4KB
00e047b5151b02f4ca31958c9a71c269 38KB
00ebace4bb242ea48b388f0ab7316f09 67KB
00ecc2850ba8f2344b09eaea06b2003f 20KB
00f0ce2b7c8c4204c8d875e355850549 37KB
00f5f53a6775d0546a4e7289078172c7 4KB
0102c00ba8ba49b4db0c8d056a919d64 4KB
010a81e0047d1e24db36bd653e96a069 503KB
010b80453b75cbf48a7f4de490dc0fe4 38KB
0110251998d75694f8943350e8c39211 80KB
01111867df3427b4bbcd5a3ba0702f6d 180KB
01172d93d2815d6498b96cdb51437a3a 22KB
0134603d019f639489aa04ee23dffcf9 45KB
0139e02f55bd19e4c82092aa488e050b 8KB
013e93270bd733c49820108a22d61782 22KB
014b266198b8c994188f76a817aba3af 260KB
0153adb55685cee4d97c4ee2d52124e5 6KB
01595a51b55d6b540877259533d93b7b 634KB
015fa701d862b2f4bab32228aaade619 28KB
01724efe5f9349f4dba2d7ae777140d5 180KB
017b73f0b0dfa6041970ddf091f63e0d 38KB
017c9cd0e084a91458783c87ee69f65b 19KB
017e37e44f90a324292aab2130045c9a 4KB
0189ece6d321b47c1a315290f463d8d6 5KB
0191fa55736985e45b2163eb1bd468a6 38KB
01a32b2897a07694eaf3853db66bfd12 8KB
01a48350ee779414c932de582152751c 22KB
01c8bb3e75d35c84b83150b088e23fcd 22KB
01d6b3457248c8c4899e7ba500e1b741 350KB
01e7faff6df6d4e6088314d00d65d747 22KB
01fdedee65d4bc343bce1508b6854ecd 180KB
0206f4e743df5994db595e49601185f1 29KB
020d0c1db3283a342ab86731270ea060 9KB
0224e2c7ee75a9743958ecf4bb41821a 4KB
022ebb3e59317db4bbc88fe2b78ea849 38KB
02404967f98b2c9458f3370efc65e2f2 692KB
0248f0abf70634945bab2e393e0cd0a5 47KB
0249dc991b57a1f4fa6f192e9f4a3883 5KB
0267d8247ee52d045b860f4c546e0db1 9KB
027b6dc9d8bbe9541816c6ee8ed28e52 1.34MB
0282f98e02c720e4f8718ee57292fb71 12KB
028d7152a5de92544a8ca47a383d4a1b 36KB
0297be3d5b6aa2041b5e82842e7eb892 30KB
029f8e31534dd124d93e3656703aabf8 19KB
02a176c89a124c5499cf0f305a90e83e 22KB
02a48e7019388ae4fb3ec5a9f2eaa9a6 5KB
02a671a4e24a2694686af951ee68bf22 108KB
02a7422fe6a2fd84e95ae2da5e1f28ad 38KB
02c3eb5e0ae15fd448e9e72390925430 16KB
02c7168f29724dc49a6c672c7c43466d 36KB
02cb7dc6e72dc154aa1d2608dfb22686 4KB
02e07f4ae113ea948a96739ab88d3dc4 38KB
02fc815b859234d4685292bbac3c006e 4KB
02ff97c0f618c0742bdc502c37c63679 4KB
0307a9762fbdb844ea5fd561e2d0ca0d 40KB
030f5329026b2934b909f0277bb44080 22KB
03131b62682ed9844810e5712b901f7f 376KB
03229d41b66bcdb4bba0fbd38447a321 50KB
0326976ca3f63e14395eb253b6737813 180KB
0330fb4f5b738af4eb900c5b9f348f66 22KB
03341792ecb17914caa5c73111b8ba26 38KB
035288a8b1cfc514b9f3b813ab01cbc3 4KB
035a21176bb51da48938ae330a58889c 1.34MB
03611fa25ce1f1946a924087bdfa58a8 1.5MB
0393ac2eef1919348b044f09d53ba93a 38KB
039cebcf83e82384e92e368d17e0a072 4KB
03a821012261e394db84334feecf9d78 47KB
03b61dc4c39464444af87fde8854c2f7 4KB
03c190a46d1697c47935bae261f52370 4KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
若风华浊世间
- 粉丝: 60
- 资源: 164
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功