xiangang / androiddevelopmentpractices Goto Github PK
View Code? Open in Web Editor NEWAndroid开发实践专栏代码仓库
Home Page: https://www.yuque.com/nongxiangang/androidsample
License: GNU General Public License v3.0
Android开发实践专栏代码仓库
Home Page: https://www.yuque.com/nongxiangang/androidsample
License: GNU General Public License v3.0
box中倒是有一个 (gameState == GameState.Over) 的判断,设成透明了,但是这样在非over的state下点击退出按钮所在的位置(此时按钮alpha为0,看不见,但是点击事件能相应),就可以直接退出了,当时无意间点了一下,直接退出了,还以为是崩溃,有点懵逼..
不过以上不是重点,我觉得只是作者疏忽了,我真正想请教的是,当我把退出按钮的 onClick 改为 onClick = { if (gameState == GameState.Over) gameAction.exit },居然点击没有反应,emm.. 不能说没有反应,准确说,应该是 gameAction.exit 函数执行没有效果,然后我试了一下,与前面的 if 判断没有关系,只要是 onClick 的内容用大括号括起来,它的执行就没有效果,让我有点费解。对 Flow 的了解不深,希望您能解答一下,感谢。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.