File tree Expand file tree Collapse file tree
Assets/LuaFramework/ToLua Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,13 +61,21 @@ public class LuaByteBuffer
6161 {
6262 public LuaByteBuffer ( IntPtr source , int len )
6363 {
64- buffer = new byte [ len ] ;
64+ buffer = new byte [ len ] ;
65+ Length = len ;
6566 Marshal . Copy ( source , buffer , 0 , len ) ;
6667 }
6768
6869 public LuaByteBuffer ( byte [ ] buf )
6970 {
70- this . buffer = buf ;
71+ buffer = buf ;
72+ Length = buf . Length ;
73+ }
74+
75+ public LuaByteBuffer ( byte [ ] buf , int len )
76+ {
77+ buffer = buf ;
78+ Length = len ;
7179 }
7280
7381 public override bool Equals ( object o )
@@ -121,7 +129,13 @@ public override int GetHashCode()
121129 return buffer == null ? 0 : buffer . GetHashCode ( ) ;
122130 }
123131
124- public byte [ ] buffer = null ;
132+ public byte [ ] buffer = null ;
133+
134+ public int Length
135+ {
136+ get ;
137+ private set ;
138+ }
125139 }
126140
127141 public class LuaOut < T > { }
Original file line number Diff line number Diff line change @@ -1184,14 +1184,19 @@ public void PushLayerMask(LayerMask mask)
11841184
11851185 public void Push ( LuaByteBuffer bb )
11861186 {
1187- LuaDLL . lua_pushlstring ( L , bb . buffer , bb . buffer . Length ) ;
1187+ LuaDLL . lua_pushlstring ( L , bb . buffer , bb . Length ) ;
11881188 }
11891189
11901190 public void PushByteBuffer ( byte [ ] buffer )
11911191 {
11921192 LuaDLL . lua_pushlstring ( L , buffer , buffer . Length ) ;
11931193 }
11941194
1195+ public void PushByteBuffer ( byte [ ] buffer , int len )
1196+ {
1197+ LuaDLL . lua_pushlstring ( L , buffer , len ) ;
1198+ }
1199+
11951200 public void Push ( LuaBaseRef lbr )
11961201 {
11971202 if ( lbr == null )
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ function Time:SetDeltaTime(deltaTime, unscaledDeltaTime)
8686 counter = 1000000
8787 else
8888 _Time .time = _Time .time + deltaTime
89- _Time .realtimeSinceStartup = _Time .realtimeSinceStartup + deltaTime
89+ _Time .realtimeSinceStartup = _Time .realtimeSinceStartup + unscaledDeltaTime
9090 _Time .timeSinceLevelLoad = _Time .timeSinceLevelLoad + deltaTime
9191 _Time .unscaledTime = _Time .unscaledTime + unscaledDeltaTime
9292 end
Original file line number Diff line number Diff line change 77
88支持平台:PC/MAC/Android(armv7-a + Intel x86)/iOS(armv7 + arm64)
99
10+
11+ 寻找热更新人才与项目组到“七之猫”网站 http://www.sevencat.cn/
12+
13+
1014**资料地址**<br>
1115框架文档地址 http://doc.ulua.org/
1216网盘下载地址 http://pan.baidu.com/s/1nu59wzJ
@@ -18,7 +22,7 @@ UnityHello: https://github.com/woshihuo12/UnityHello
1822Excel配置:https://github.com/sy-yanghuan/proton
1923
2024//-------------2017-03-01-------------
21- (1)更新tolua#到1.0.6.289版
25+ (1)更新tolua#到1.0.6.291版
2226
2327//-------------2017-01-07-------------
2428(1)更新tolua#到1.0.6.284版
You can’t perform that action at this time.
0 commit comments