Comments (5)
- 生成连连看的图片,如果保证不会陷入死局
2.场景设计
3.倒计时
4.记录
from cocos2d.
- 各个种类的图片个数必须为偶数个,根据种类的不同,决定游戏的难度
- 随机生成图片的位置,且记录图片是否已被消掉
from cocos2d.
- 每次消掉图片之后,需要重新检测是否陷入死局,是,重置图片的位置
- 倒计时
- 第一次点击图片,记录下来,并为选中状态,点击第二张图片时,如果能连成少于等于两个拐点的线,则标记为选中状态,接着消掉;否则,第一个图片恢复为未选中状态
from cocos2d.
连连看两个图片连接,检测是否大于两个拐点
- 没有拐点 两个点的x坐标或者y坐标相等
2.一个拐点,拐点的坐标确定,为(x1,y2)或(x2,y1)
3.两个拐点,可能性较多
from cocos2d.
假设有两个点,a,b.在两个拐点的情况下,a相对于b有四个可能位置存在。
a在b的左上方,a.x < b.x a.y > b.y
a在b的右上方,a.x > b.x a.y > b.y
a在b的左下方,a.x < b.x a.y < b.y
a在b的右下方,a.x > b.x a.y < b.y
from cocos2d.
Related Issues (2)
- 军人手机小游戏 HOT 1
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 cocos2d.