Comments (6)
我好像知道什么问题了,为防止经常调用 onTimer ,我在 onTimer 加了个 开关 isHotFix , 去掉就好了
想确认一下热更流程
1)是每次新玩家刚进来加载是旧代码,然后通过onTimer 更新实体对象?
2)还是可以直接进来加载就是热更后代码?
谢谢!
def onTimer(self, timerHandle, userData):
# 热更开关,防止定时器多次调用
if self.isHotFix and userData == Hotfix.TUArg_Hotfix:
.....
from kbengine_hotfix.
新new的对象是原始版本,通过onTimer对比版本号更新。
from kbengine_hotfix.
新new的对象是原始版本,通过onTimer对比版本号更新。
嗯嗯,如果需要热更的代码在 init 或者 只执行一遍的 initData 地方( onTimer 之前),似乎就不能热更了
( 因为一进来,执行旧代码,onTimer 之后也不会重新执行一遍 )
请问下,这块大佬有什么思路可以解决吗?
from kbengine_hotfix.
你可以改改Hotfix.py 在热更成功后回调个钩子
from kbengine_hotfix.
你可以改改Hotfix.py 在热更成功后回调个钩子
这一块不是很懂,大佬可以在具体列下步骤吗,我去试试
from kbengine_hotfix.
from kbengine_hotfix.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kbengine_hotfix.