We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
拜读了代码,没学过as的提个小建议,配置文件可以使用properties格式,在程序开始时加载好所有配置,如果读不到就赋默认值,这样就不用担心配置文件与程序版本不兼容,不用每次增加配置都要改cfg的下标,没有编程经验的人看起来比较清晰,类似这种 #背景颜色 stage.backgroundColor=0x003C61 #文本颜色 stage.textColor=0xffffff
#背景颜色
stage.backgroundColor=0x003C61
#文本颜色
stage.textColor=0xffffff
The text was updated successfully, but these errors were encountered:
这个格式很好呀,不过不知道怎么在as里实现emmm
Sorry, something went wrong.
加载程序时以=为分隔符形成一个全局map,然后需要用的的地方就去读这个map,比如上述例子 map.get("stage.backgroundColor") map.get("stage.textColor") 这样读起来比较清晰,不用根据index去对照配置
No branches or pull requests
拜读了代码,没学过as的提个小建议,配置文件可以使用properties格式,在程序开始时加载好所有配置,如果读不到就赋默认值,这样就不用担心配置文件与程序版本不兼容,不用每次增加配置都要改cfg的下标,没有编程经验的人看起来比较清晰,类似这种
#背景颜色
stage.backgroundColor=0x003C61
#文本颜色
stage.textColor=0xffffff
The text was updated successfully, but these errors were encountered: