wijat / lbxgame Goto Github PK
View Code? Open in Web Editor NEW六边形消除游戏(cocos creator制作)
Home Page: http://wubuzi.github.io/LBXGame/
六边形消除游戏(cocos creator制作)
Home Page: http://wubuzi.github.io/LBXGame/
你的demo是个六角形的消除游戏,
我的项目是正方形的消除游戏8*8格,初始化的时候位置怎么调整呢
` //要加的单位向量
var addVec = cc.pMult(cc.pForAngle(240 * (2 * Math.PI / 360)), this["liubianxingH"] * 2)
//偏移至源点0,0的向量
var pianyiTo0p0Vec = cc.pMult(cc.pForAngle(120 * (2 * Math.PI / 360)), this["liubianxingH"] * 2 * 4)
var frameList = []
var fPosList = []
//一列列来生成
for (var i = 0; i < posList.length; i++) {
var count = posList[i].count //数量
var oneSrcPos = cc.pAdd(posList[i].srcPos, pianyiTo0p0Vec) //起始位置
var aimPos = cc.pAdd(srcPos, oneSrcPos) //一条的起始位置
for (var j = 0; j < count; j++) {
var fPos = cc.pAdd(aimPos, cc.pMult(addVec, j))
fPosList.push(fPos)
}
}`
您好,我想请问一下六边形消除用cocos2d-x该怎么实现呢?
像这种休闲小游戏,流量稍微多点的话接点广告也是不错的
现在我用cocos-creator打开你的项目 打开完全看不到内容就是报错,因为我今天第一天接触这个cocos-creator 完全没懂这些什么是什么 好尴尬,但是我想看看 卡死在这了
这教学出来 相信对你star数也会有很大提升. 对将来也是好处多多的 辛苦辛苦
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.