??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品久久久天天影视,久久无码专区国产精品发布,伊人久久国产免费观看视频http://www.shnenglu.com/wc250en007/category/19588.html前进的\?/description>zh-cnWed, 24 Oct 2012 03:55:01 GMTWed, 24 Oct 2012 03:55:01 GMT60在linuxpȝ下用eclipse集成环境开发cocos2d-x android目Q集成java和c++环境(?http://www.shnenglu.com/wc250en007/archive/2012/10/24/193757.htmlLet me see seeLet me see seeWed, 24 Oct 2012 01:29:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/10/24/193757.htmlhttp://www.shnenglu.com/wc250en007/comments/193757.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/10/24/193757.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/193757.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/193757.html阅读全文

Let me see see 2012-10-24 09:29 发表评论
]]>
cocos2d-x android游戏使用自己的字?/title><link>http://www.shnenglu.com/wc250en007/archive/2012/10/15/193320.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Mon, 15 Oct 2012 08:58:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/10/15/193320.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/193320.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/10/15/193320.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/193320.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/193320.html</trackback:ping><description><![CDATA[在用cocos2d-x发布Androidq_游戏Ӟ游戏中可能需要显CZ文字体, 或者想昄漂亮的自定义字体,q怎么办呢Q?br />cocos2d-x中字体标{提供了CCLabelAtlas, CCLabelBMFont CCLabelTTF<br /><br />1.CCLabelAtlas速度快,支持单有限的几个字符或数字集?br /><br />2.CCLabelBMFont <br />我们可以用CCLabelBMFont来加载字体编辑器生成?plist文gQ但是当昄的文字很多时Q这U做法就有点Ҏ费力?br />如:我们xC游戏中剧情介绍<br /><br />3.CCLabelTTF<br />支持选择一U字体来昄文字Q但是只支持pȝ中默认字?br /><div style="padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; width: 1307.3519287109375px; word-break: break-all; ">CCLabelTTF* pLabel = CCLabelTTF::create("Hello World", "Arial", 24);</div><div></div><br /><strong>问题Q我们在Android游戏中想昄游戏剧情Q想用自己指定的一U字体gril.ttf(非系l默认字?,怎么?/strong><br /><br />其实cocos2d-x已经提供了帮我们实现?br />构造CCLabelTTF中指定的字体名传l了<span style="font-size: 13.333333969116211px; background-color: #eeeeee; ">CCTexture2D </span><br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">void</span> CCLabelTTF::updateTexture()<br />{<br />    CCTexture2D *tex;<br />    <span style="color: #0000FF; ">if</span> (m_tDimensions.width == 0 || m_tDimensions.height == 0)<br />    {<br />        tex = <span style="color: #0000FF; ">new</span> CCTexture2D();<br />        tex->initWithString(m_string.c_str(), <strong>m_pFontName</strong>->c_str(), m_fFontSize * CC_CONTENT_SCALE_FACTOR()) ;<br />    }<br />    <span style="color: #0000FF; ">else</span><br />    {<br />        tex = <span style="color: #0000FF; ">new</span> CCTexture2D();<br />        tex->initWithString(m_string.c_str(),<br />                            CC_SIZE_POINTS_TO_PIXELS(m_tDimensions), <br />                            m_hAlignment,<br />                            m_vAlignment,<br />                            m_pFontName->c_str(),<br />                            m_fFontSize * CC_CONTENT_SCALE_FACTOR());<br />    }<br /><br />   <img src="http://www.shnenglu.com/Images/dot.gif" alt="" />.<br />}</div>CCTexture2D又将字体名传l了CCImage<br />(PS:q里调用的是androidq_下的CCImagec?./platform/android/CCImage.h)<br />而不是win32q_下的CCImagec?./platform/win32/CCImage.h) )<br /><br />androidq_下的CCImage<br /><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all; "><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">bool</span> CCImage::initWithString(<br />                               <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span> *    pText, <br />                               <span style="color: #0000FF; ">int</span>             nWidth<span style="color: #008000; ">/*</span><span style="color: #008000; "> = 0</span><span style="color: #008000; ">*/</span>, <br />                               <span style="color: #0000FF; ">int</span>             nHeight<span style="color: #008000; ">/*</span><span style="color: #008000; "> = 0</span><span style="color: #008000; ">*/</span>,<br />                               ETextAlign      eAlignMask<span style="color: #008000; ">/*</span><span style="color: #008000; "> = kAlignCenter</span><span style="color: #008000; ">*/</span>,<br />                               <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span> *    pFontName<span style="color: #008000; ">/*</span><span style="color: #008000; "> = nil</span><span style="color: #008000; ">*/</span>,<br />                               <span style="color: #0000FF; ">int</span>             nSize<span style="color: #008000; ">/*</span><span style="color: #008000; "> = 0</span><span style="color: #008000; ">*/</span>)<br />{<br />    <span style="color: #0000FF; ">bool</span> bRet = <span style="color: #0000FF; ">false</span>;<br /><br />    <span style="color: #0000FF; ">do</span> <br />    {<br />        CC_BREAK_IF(! pText);<br />        <br />        <strong>BitmapDC </strong>&dc = sharedBitmapDC();<br /><br />        CC_BREAK_IF(! dc.getBitmapFromJava(pText, nWidth, nHeight, eAlignMask, <strong>pFontName</strong>, nSize));<br /><br />        <span style="color: #008000; ">//</span><span style="color: #008000; "> assign the dc.m_pData to m_pData in order to save time</span><span style="color: #008000; "><br /></span>        m_pData = dc.m_pData;<br />        CC_BREAK_IF(! m_pData);<br /><br />        m_nWidth    = (<span style="color: #0000FF; ">short</span>)dc.m_nWidth;<br />        m_nHeight   = (<span style="color: #0000FF; ">short</span>)dc.m_nHeight;<br />        m_bHasAlpha = <span style="color: #0000FF; ">true</span>;<br />        m_bPreMulti = <span style="color: #0000FF; ">true</span>;<br />        m_nBitsPerComponent = 8;<br /><br />        bRet = <span style="color: #0000FF; ">true</span>;<br />    } <span style="color: #0000FF; ">while</span> (0);<br /><br />    <span style="color: #0000FF; ">return</span> bRet;<br />}</div><br />然后调用了androidq_下的BitmapDC<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->    <span style="color: #0000FF; ">bool</span> getBitmapFromJava(<span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span> *text, <span style="color: #0000FF; ">int</span> nWidth, <span style="color: #0000FF; ">int</span> nHeight, CCImage::ETextAlign eAlignMask, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span> * pFontName, <span style="color: #0000FF; ">float</span> fontSize)<br />    {<br />        JniMethodInfo methodInfo;<br />        <span style="color: #0000FF; ">if</span> (! JniHelper::getStaticMethodInfo(methodInfo, "<strong>org/cocos2dx/lib/Cocos2dxBitmap</strong>", "<strong>createTextBitmap</strong>", <br />            "(Ljava/lang/String;Ljava/lang/String;IIII)V"))<br />        {<br />            CCLOG("%s %d: error to get methodInfo", __FILE__, __LINE__);<br />            <span style="color: #0000FF; ">return</span> <span style="color: #0000FF; ">false</span>;<br />        }<br /><br />        <img src="http://www.shnenglu.com/Images/dot.gif" alt="" /><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /><br />}</div><br />q里昄了调用JAVA代码<strong style="font-size: 13.333333969116211px; ">Cocos2dxBitmap.java</strong>下的<strong style="font-size: 13.333333969116211px; ">createTextBitmap</strong>函数<br /><br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->    <span style="color: #008000; ">/*</span><span style="color: #008000; "><br />     * @width: the width to draw, it can be 0<br />     * @height: the height to draw, it can be 0<br />     </span><span style="color: #008000; ">*/</span><br />    <span style="color: #0000FF; ">public</span> <span style="color: #0000FF; ">static</span> <span style="color: #0000FF; ">void</span> createTextBitmap(String content, String fontName, <br />            <span style="color: #0000FF; ">int</span> fontSize, <span style="color: #0000FF; ">int</span> alignment, <span style="color: #0000FF; ">int</span> width, <span style="color: #0000FF; ">int</span> height){<br />        <br />        content = refactorString(content);       <br />        Paint paint = <strong>newPaint</strong>(<strong>fontName</strong>, fontSize, alignment);<br />        <br />        TextProperty textProperty = computeTextProperty(content, paint, width, height);          <br /><br />        <span style="color: #0000FF; ">int</span> bitmapTotalHeight = (height == 0 ? textProperty.totalHeight:height);<br /><br />        <span style="color: #008000; ">//</span><span style="color: #008000; "> Draw text to bitmap</span><span style="color: #008000; "><br /></span>        Bitmap bitmap = Bitmap.createBitmap(textProperty.maxWidth, <br />                bitmapTotalHeight, Bitmap.Config.ARGB_8888);<br />        Canvas canvas = <span style="color: #0000FF; ">new</span> Canvas(bitmap);<br />        <br />        <span style="color: #008000; ">//</span><span style="color: #008000; "> Draw string</span><span style="color: #008000; "><br /></span>        FontMetricsInt fm = paint.getFontMetricsInt();<br />        <span style="color: #0000FF; ">int</span> x = 0;<br />        <span style="color: #0000FF; ">int</span> y = computeY(fm, height, textProperty.totalHeight, alignment);<br />        String[] lines = textProperty.lines;<br />        <span style="color: #0000FF; ">for</span> (String line : lines){<br />            x = computeX(paint, line, textProperty.maxWidth, alignment);<br />            canvas.drawText(line, x, y, paint);<br />            y += textProperty.heightPerLine;<br />        }<br />        <br />        initNativeObject(bitmap);<br />    }</div><br />?strong style="font-size: 13.333333969116211px; ">newPaint</strong>函数中调用了字体加蝲<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">private</span> <span style="color: #0000FF; ">static</span> Paint newPaint(String fontName, <span style="color: #0000FF; ">int</span> fontSize, <span style="color: #0000FF; ">int</span> alignment){<br />        Paint paint = <span style="color: #0000FF; ">new</span> Paint();<br />        paint.setColor(Color.WHITE);<br />        paint.setTextSize(fontSize);      <br />        paint.setAntiAlias(<span style="color: #0000FF; ">true</span>);    <br />        <br />        <span style="color: #008000; ">/*</span><span style="color: #008000; "><br />         * Set type face for paint, now it support .ttf file.<br />         </span><span style="color: #008000; ">*/</span><br />        <span style="color: #0000FF; ">if</span> (fontName.endsWith(<span style="color: red; ">".ttf"</span>)){     <span style="color: red; "> //</span><span style="font-size: 14.44444465637207px; color: red; ">字体需?ttfl束</span><br />             <span style="color: #0000FF; ">try</span> {<br />                <span style="color: #008000; ">//</span><span style="color: #008000; ">Typeface typeFace = Typeface.createFromAsset(context.getAssets(), fontName);</span><span style="color: #008000; "><br /></span>                 <strong>Typeface typeFace = Cocos2dxTypefaces.<span style="color: #0000FF; ">get</span>(context, fontName);</strong><br />                  <strong>paint.setTypeface(typeFace);</strong><br />             } <span style="color: #0000FF; ">catch</span> (Exception e){<br />                 Log.e("Cocos2dxBitmap", <br />                     "error to create ttf type face: " + fontName);<br />                 <br />                 <span style="color: #008000; ">/*</span><span style="color: #008000; "><br />                  * The file may not find, use system font<br />                  </span><span style="color: #008000; ">*/</span><br />                 paint.setTypeface(Typeface.create(fontName, Typeface.NORMAL));<br />             }<br />        }<br />        <span style="color: #0000FF; ">else</span> {<br />            paint.setTypeface(Typeface.create(fontName, Typeface.NORMAL));<br />        }<br />        <br />        .......<br />        <br />        <span style="color: #0000FF; ">return</span> paint;<br />    }</div><div>QPS:Typefacecd义字体和字体内在的类型。这个类被用在画WPaint讄的时候,比如用textSize,textSkewX和textScale讄来指定text在画的时候如何来昄和测量?/div>android中用Typeface来指定字体)<br /><br />另一炚w要注意的是:字体需?ttfl束<br /><br /><strong>使用Ҏ</strong>Q?br />1.在proj.android\assets文g夹中d<span style="color: red; ">girl.ttf</span><br />2.E序中调用对应的字体可以了<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->    CCSize size = CCDirector::sharedDirector()->getWinSize();<br />    CCLabelTTF* label = CCLabelTTF::create("女HelloWorld", "<span style="color: red; ">girl.ttf</span>", 24);<br />    label->setPosition(ccp(size.width/2, size.height/2));<br />    addChild(label);</div>3.如果你需要显C汉字,则需要将包含有字W串的文??cpp)转换为UTF-8格式~码Q否则会昄q<br /><br />IOS和win32q_没有试Q相信的差不?br /><br />附上试囄Q?br /><img src="http://www.shnenglu.com/images/cppblog_com/wc250en007/cocos2d-x/Screenshot_2012-10-15-16-55-33.png" alt="" /><br /><br /><br /><br />哈哈 可以在游戏中打包自己惌的字体啦<br /><br /><br /><br /><br /><br /><br /><img src ="http://www.shnenglu.com/wc250en007/aggbug/193320.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-10-15 16:58 <a href="http://www.shnenglu.com/wc250en007/archive/2012/10/15/193320.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>cocos2d-x UI之技能冷却按?/title><link>http://www.shnenglu.com/wc250en007/archive/2012/08/28/188511.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Tue, 28 Aug 2012 03:33:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/08/28/188511.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/188511.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/08/28/188511.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/188511.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/188511.html</trackback:ping><description><![CDATA[<div><div>技能冷却的效果跟魔兽世界中的技能冷却类|功能如下:</div><div></div><div>技能图标点L会有按下效果Q抬起后开始冷却计Ӟ冷却计时技术后该图标才可以再次q行点击?/div><br />对应的图片资源:</div><div><span style="color: red; ">    <strong>注意</strong>:dchild时要注意上下?/span></div><div><span style="color: red; ">    最下方是CCMenuItemImage 按钮囄</span></div><div><span style="color: red; ">    其次是模版图?半透明模版囄</span></div><div><span style="color: red; ">    最上方是CCProgressTimer 囄是最下图中较大的那个盄囄</span></div><div>q是使用的图片资?/div><div>  <img src="http://www.shnenglu.com/images/cppblog_com/wc250en007/cocos2d-x/normal.png" border="0" alt="" width="64" height="64" /> <img src="http://www.shnenglu.com/images/cppblog_com/wc250en007/cocos2d-x/click.png" border="0" alt="" width="64" height="64" /> <img src="http://www.shnenglu.com/images/cppblog_com/wc250en007/cocos2d-x/stencil.png" border="0" alt="" width="64" height="64" /></div><div></div><div><strong>动画原理</strong>Q?/div><div>非冷却状态时只显CCCMenuItemImageQ当冷却开始计时时Q将按钮设ؓ不可点击状态,同将半透明模板和进度条_讄为可见状态,q且q度条精灵开始进行旋转动作,旋{l束后在回调函数中将半透明模板和进度条_设ؓ不可见,按钮重新讄为可点击状态?br /><br /><strong>使用Ҏ</strong>Q?br /><div>创徏一个SkillButton指针Q修改冷却时_动画表现(如蒙板从旋{改ؓ竖直方向)QƈSkillButtond到layer上即可?br /><br />传个效果?br /><img src="http://www.shnenglu.com/images/cppblog_com/wc250en007/cocos2d-x/SkillButton.png" border="0" alt="" width="636" height="238" /><br /><br /><br /><div>SkillButton.h</div><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008000; ">/*</span><span style="color: #008000; ">* <br />    实现技能冷却效?nbsp;<br /><br />    Notice:dchild时要注意上下层关p?br />    最下方是按?nbsp;其次是半透明的模版图?nbsp;最上方是CCProgressTimerq度条精?br /></span><span style="color: #008000; ">*/</span><br />#ifndef _SKILLBUTTON_H_<br /><span style="color: #0000FF; ">#define</span> _SKILLBUTTON_H_<br />#include <cocos2d.h><br /><br /><span style="color: #0000FF; ">class</span> SkillButton : <span style="color: #0000FF; ">public</span> cocos2d::CCNode<br />{<br /><span style="color: #0000FF; ">public</span>:<br />    SkillButton();<br />    <span style="color: #0000FF; ">virtual</span> ~SkillButton();<br /><br />    <span style="color: #008000; ">/*</span><span style="color: #008000; ">* 创徏一个SkillButton对象<br />        </span><span style="color: #008000; ">*/</span><br />    <span style="color: #0000FF; ">static</span> SkillButton* createSkillButton(<span style="color: #0000FF; ">float</span> cdTime,<br />                                        <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* stencil_file_name, <br />                                        <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* button_normal_name, <br />                                        <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* button_click_name);<br /><br />    <span style="color: #008000; ">/*</span><span style="color: #008000; ">* CD旉讄<br />        </span><span style="color: #008000; ">*/</span><br />    <span style="color: #0000FF; ">void</span>    setCDTime(<span style="color: #0000FF; ">float</span> time) { mCDTime = time; }<br />    <span style="color: #0000FF; ">float</span>   getCDTime() <span style="color: #0000FF; ">const</span> { <span style="color: #0000FF; ">return</span> mCDTime; }<br /><br />    <span style="color: #008000; ">/*</span><span style="color: #008000; ">* 技能按钮点d?nbsp;</span><span style="color: #008000; ">*/</span><br />    <span style="color: #0000FF; ">void</span>    skillClickCallBack(cocos2d::CCObject* obj);<br /><br />    <span style="color: #008000; ">/*</span><span style="color: #008000; ">* 技能冷却完毕回?/span><span style="color: #008000; ">*/</span><br />    <span style="color: #0000FF; ">void</span>    skillCoolDownCallBack(cocos2d::CCNode* node);<br /><br /><span style="color: #0000FF; ">private</span>:<br /><br />    <span style="color: #008000; ">/*</span><span style="color: #008000; ">* 初始?nbsp;</span><span style="color: #008000; ">*/</span><br />    <span style="color: #0000FF; ">bool</span>    init(<span style="color: #0000FF; ">float</span> cdTime, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* stencil_file_name, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* button_normal_name, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* button_click_name);<br /><br /><span style="color: #0000FF; ">private</span>:<br />    cocos2d::CCMenuItemImage*   mItemSkill;     <span style="color: #008000; ">//</span><span style="color: #008000; "> 技能按?/span><span style="color: #008000; "><br /></span>    cocos2d::CCMenu*            mMenuSkill;     <span style="color: #008000; ">//</span><span style="color: #008000; "> 技能按钮所在menu</span><span style="color: #008000; "><br /></span>    cocos2d::CCSprite*          mStencil;       <span style="color: #008000; ">//</span><span style="color: #008000; "> 蒙板_,黑色半透明(q个是ؓ了显CZ个冷却计时效?</span><span style="color: #008000; "><br /></span>    cocos2d::CCProgressTimer*   mProgressTimer; <span style="color: #008000; ">//</span><span style="color: #008000; "> 旉q度条精?360度旋?</span><span style="color: #008000; "><br /></span>    <span style="color: #0000FF; ">float</span>                       mCDTime;          <span style="color: #008000; ">//</span><span style="color: #008000; "> CD旉</span><span style="color: #008000; "><br /></span>};<br /><br /><br /><span style="color: #0000FF; ">#endif</span></div><br /><br />SkillButton.cpp<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->#include "SkillButton.h"<br /><br /><br />USING_NS_CC;<br /><br />SkillButton::SkillButton():<br />    mItemSkill(NULL),<br />    mMenuSkill(NULL),<br />    mStencil(NULL),<br />    mProgressTimer(NULL),<br />    mCDTime(1.f)<br />{<br /><br />}<br /><br />SkillButton::~SkillButton()<br />{<br /><br />}<br /><br />SkillButton* SkillButton::createSkillButton(<span style="color: #0000FF; ">float</span> cdTime, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* stencil_file_name, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* button_normal_name, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* button_click_name)<br />{<br />    SkillButton* skillButton = <span style="color: #0000FF; ">new</span> SkillButton();<br />    <span style="color: #0000FF; ">if</span> (skillButton && skillButton->init(cdTime, stencil_file_name, button_normal_name, button_click_name))<br />    {<br />        skillButton->autorelease();<br />        <span style="color: #0000FF; ">return</span> skillButton;<br />    }<br />    <span style="color: #0000FF; ">else</span><br />    {<br />        delete skillButton;<br />        skillButton = NULL;<br />    }<br /><br />    <span style="color: #0000FF; ">return</span> NULL;<br />}<br /><br /><span style="color: #0000FF; ">bool</span> SkillButton::init(<span style="color: #0000FF; ">float</span> cdTime, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* stencil_file_name, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* button_normal_name, <span style="color: #0000FF; ">const</span> <span style="color: #0000FF; ">char</span>* button_click_name)<br />{<br />    CCAssert(stencil_file_name, "SkillButton::init stencil_file_name != NULL");<br />    CCAssert(button_normal_name, "SkillButton::init button_normal_name != NULL");<br />    CCAssert(button_click_name, "SkillButton::init button_click_name != NULL");<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> Notice:dchild时要注意上下?br />    </span><span style="color: #008000; ">//</span><span style="color: #008000; "> 最下方是CCMenuItemImage 其次是模版图?nbsp;最上方是CCProgressTimer<br /><br />    </span><span style="color: #008000; ">//</span><span style="color: #008000; "> d技能按?/span><span style="color: #008000; "><br /></span>    mItemSkill = CCMenuItemImage::create(button_normal_name, button_click_name, <span style="color: #0000FF; ">this</span>, menu_selector(SkillButton::skillClickCallBack));<br />    mItemSkill->setPosition(CCPointZero);<br /><br />    mMenuSkill = CCMenu::create(mItemSkill, NULL);<br />    mMenuSkill->setPosition(CCPointZero);<br />    addChild(mMenuSkill, -100);<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> d阴媄模版</span><span style="color: #008000; "><br /></span>    mStencil = CCSprite::create(stencil_file_name);<br />    mStencil->setPosition(CCPointZero);<br />    mStencil->setVisible(<span style="color: #0000FF; ">false</span>);<br />    addChild(mStencil);<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> d旋{q度条精?/span><span style="color: #008000; "><br /></span>    CCSprite* progressSprite = CCSprite::create(button_normal_name);<br />    mProgressTimer = CCProgressTimer::create(progressSprite);<br />    mProgressTimer->setPosition(CCPointZero);<br />    mProgressTimer->setVisible(<span style="color: #0000FF; ">false</span>);<br />    addChild(mProgressTimer, 100);<br /><br />    mCDTime = cdTime;<br />    <span style="color: #0000FF; ">return</span> <span style="color: #0000FF; ">true</span>;<br />}<br /><br /><span style="color: #008000; ">/*</span><span style="color: #008000; ">* 技能按钮点d?nbsp;</span><span style="color: #008000; ">*/</span><br /><span style="color: #0000FF; ">void</span> SkillButton::skillClickCallBack(cocos2d::CCObject* obj)<br />{<br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> 冷却计时Q即时状态技能按钮不可点?/span><span style="color: #008000; "><br /></span>    mItemSkill->setEnabled(<span style="color: #0000FF; ">false</span>);<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> 模版可见</span><span style="color: #008000; "><br /></span>    mStencil->setVisible(<span style="color: #0000FF; ">true</span>);<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> 讄_q度条ؓ时?/span><span style="color: #008000; "><br /></span>    mProgressTimer->setVisible(<span style="color: #0000FF; ">true</span>);<br />    mProgressTimer->setType(kCCProgressTimerTypeRadial);<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; ">准备一?U旋?60度的动画(逐渐覆盖半透模板Ş成冷却效?q里q行计时冷却动画的实现和旉控制)</span><span style="color: #008000; "><br /></span>    CCActionInterval* action_progress_to = CCProgressTo::create(mCDTime, 100);<br />    CCCallFunc* action_callback = CCCallFuncN::create(<span style="color: #0000FF; ">this</span>, callfuncN_selector(SkillButton::skillCoolDownCallBack));<br />    mProgressTimer->runAction(CCSequence::create(action_progress_to, action_callback, NULL));<br />}<br /><br /><span style="color: #008000; ">/*</span><span style="color: #008000; ">* 技能冷却完成回?nbsp;</span><span style="color: #008000; ">*/</span><br /><span style="color: #0000FF; ">void</span> SkillButton::skillCoolDownCallBack(CCNode* node)<br />{<br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> 讄蒙板不可?/span><span style="color: #008000; "><br /></span>    mStencil->setVisible(<span style="color: #0000FF; ">false</span>);<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> q度条技能不可见</span><span style="color: #008000; "><br /></span>    mProgressTimer->setVisible(<span style="color: #0000FF; ">false</span>);<br /><br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> 按钮|ؓ可用</span><span style="color: #008000; "><br /></span>    mItemSkill->setEnabled(<span style="color: #0000FF; ">true</span>);<br />}</div><br />试代码Q?br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->    mSkillButton = SkillButton::createSkillButton(2.f, "stencil.png", "normal.png", "click.png");<br />    mSkillButton->setPosition(ccp(s.width/2, s.height/2));<br />    addChild(mSkillButton);</div><br /><a title="代码下蝲" href="/Files/wc250en007/cocos2d-x/SkillButton.rar">代码下蝲</a><br /><br />参考地址Q?br /><a >http://blog.sina.com.cn/s/blog_732784f70100umuj.html</a> <br /><a >http://www.cocos2dev.com/?p=64</a> <br /><br /></div></div><img src ="http://www.shnenglu.com/wc250en007/aggbug/188511.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-08-28 11:33 <a href="http://www.shnenglu.com/wc250en007/archive/2012/08/28/188511.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>cocos2d-x lSpritedMaskQ遮|?http://www.shnenglu.com/wc250en007/archive/2012/08/26/188362.htmlLet me see seeLet me see seeSun, 26 Aug 2012 15:06:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/08/26/188362.htmlhttp://www.shnenglu.com/wc250en007/comments/188362.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/08/26/188362.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/188362.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/188362.html阅读全文

Let me see see 2012-08-26 23:06 发表评论
]]>
cocos2d-x 贝塞曲U之游戏应用http://www.shnenglu.com/wc250en007/archive/2012/08/24/188048.htmlLet me see seeLet me see seeFri, 24 Aug 2012 10:04:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/08/24/188048.htmlhttp://www.shnenglu.com/wc250en007/comments/188048.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/08/24/188048.html#Feedback2http://www.shnenglu.com/wc250en007/comments/commentRss/188048.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/188048.html贝塞曲U是应用于二l图形应用程序的数学曲线。曲U的定义有四个点Qv始点、终止点Q也U锚点)以及两个怺分离的中间点。滑动两个中间点Q贝塞尔曲线的Ş状会发生变化 

p0LQp3是终点,p1,p2是控制点
http://en.wikipedia.org/wiki/B%C3%A9zier_curve 

?游戏应用

我们可能需要在游戏中模拟导Ҏ的Ud轨迹Q用才cocos2d-x下的bezier可以L的模拟出?br />cocos2d-x下ؓ我们提供了两个action CCBezierBy和CCBezierToQ用也很简单,只需要填充结构体Q?br />
        ccBezierConfig tr0;    
        tr0.endPosition=ccp(280, 240);
        tr0.controlPoint_1=ccp(40, 400);
        tr0.controlPoint_2=ccp(280, 80);

        CCActionInterval* bezierForward = CCBezierBy::create(1.f, tr0);
我们只需要提供两个控制点和一个终点位|就可以了,q里要注意的?br />CCBezierq个action是以当前位置v始点的,两个控制点和l点都是相对于v始点的偏Ud?/span>
如:tr0.endPosition = ccp(280,240); 是相对于起始点的偏移

? 游戏实例
我们来模拟一个射游戏,屏幕中心Ҏ一个hQ点dqQ何位|,会朝q个点击位置一支箭Q箭到达指定点后抖动一?播放一个抖动动?,然后消失


p0是箭的发位|,p3是箭的目标点Qp1,p2是控刉行轨q的控制点,p1p0p3l成了箭的角度,假设我们有十六个方向的箭Q即360.f/16= 22.5度一个方?br />



W一步:存贮的飞行动画和抖动动dCCAnimationCatch中,后面播放动画旉过名字来获得动?br />
    // 存贮的飞行动画,有多少个方向,存贮多个动画
    for (int i = 0; i < mDirections; ++i)
    {
        // 飞行动?nbsp;
        CCArray* spriteFramesArray = CCArray::create(flyFrames);

        // 从图片中每一帧的位置来生成CCSpriteFrame
        for ( int j = 0; j < flyFrames; ++j )
        {
            CCSpriteFrame* frame = CCSpriteFrame::create(pTexture, 
                CCRectMake(j * frame_width, i * frame_height, frame_width, frame_height));
            spriteFramesArray->addObject(frame);
        }

        //以键值Ş式存贮动dCCAnimationCatch?/span>
        float frameTime = 1.f / (mSpeed * flyFrames);
        CCAnimation* animation = CCAnimation::create(spriteFramesArray, frameTime);

        String name = getArrowAnimateName(i);
        CCAnimationCache::sharedAnimationCache()->addAnimation(animation, name.c_str());

        spriteFramesArray->removeAllObjects();
        spriteFramesArray->release();
    }

    // 同理存贮的抖动动画
    .



W二步:获得箭目标点,用贝塞尔曲线模拟的飞行轨迹
      首先Q要求出的击方向Q从CCAnimationCatche中取出对应的飞行动画Q我们有16个方向的动画Q下面是写的一个简单的求射角度和方向的函敎ͼ

#define EPSION 0.0001f 
#define IS_EQUAL(val1, val2)  (fabs((val1) - (val2)) <= EPSION)
const int mDirections = 16;

/** 更新方向,传入起始点和l止点,利用actan来获得射的弧度Q然后{换ؓ角度
    
*/
int ArrowDirection::updateDirection(const cocos2d::CCPoint& ptRole, const cocos2d::CCPoint& ptTarget)
{
    CCPoint sub = ccpSub(ptTarget, ptRole);

    if (IS_EQUAL(sub.x, 0.f) && IS_EQUAL(sub.y, 0.f))
        return -1;

    if (IS_EQUAL(sub.y, 0.f) && sub.x > 0)
    {
        mDegree = 90.f;
    }
    else if (IS_EQUAL(sub.y, 0.f) && sub.x < 0)
    {
        mDegree = 180.f;
    }
    else
    {
        // 弧度转角?/span>
        float radians = atanf(sub.x/sub.y);
        mDegree = CC_RADIANS_TO_DEGREES(radians);

        if (sub.x >= 0 && sub.y >= 0 )          // W一象限
        {

        }
        else if (sub.x >= 0 && sub.y <= 0)      // W二象限
        {
            mDegree += 180.f;
        }
        else if (sub.x <= 0 && sub.y <= 0)      // W三象限
        {
            mDegree += 180.f;
        }
        else                                   // W四象限
        {
            mDegree += 360.f;
        }
    }

    if (mDegree < 0.f)
        mDegree = 0.f;
    if (mDegree > 360.f)
        mDegree = 0.f;

    float single = (float)360 / 16;
    for (int i = 0; i < mDirections; ++i)
    {
        if (mDegree >= i * single && mDegree <= (i+1) * single)
            return mDirections;
    }

    return mDirections - 1;
}


      有了角度和动d好办了,我们已经知道了目标点Q哈哈,可以让箭一ҎN行动MҎ着贝塞曲U移动就OK?br />
    // 播放飞行动?/span>
    String name = getArrowAnimateName(dir);
    cocos2d::CCAnimation* animation = CCAnimationCache::sharedAnimationCache()->animationByName(name.c_str());

    CCAnimate* animate = CCAnimate::actionWithAnimation(animation);
    mSprite->runAction(animate);

    // 填充bezier
    ccBezierConfig cfg;
    cfg.controlPoint_1 = ccp(0, control_height);
    cfg.controlPoint_2 = ccp(ptRelativeTarget.x, ptRelativeTarget.y + control_height);
    cfg.endPosition = ptRelativeTarget;

    // 沿着贝塞曲U移?/span>
    CCActionInterval* bezierForward = CCBezierBy::create(2.f, cfg);
    CCActionInterval* seq = (CCActionInterval*)CCSequence::create(bezierForward, 
                                                        CCCallFuncND::create(this, callfuncND_selector(ArrowDirection::arrowFlyOverCallBack), this),
                                                        NULL);

    mSprite->runAction(seq);
我们为action序列d了回调函?strong style="font-size: 13px; ">ArrowDirection::arrowFlyOverCallBack 飞行完毕后q入下一阶段
 

W三步:到辄标点Q播放抖动动?br />
在上一阶段的回调函C先停止所有动?br />
sprite->stopAllActions();

然后播放抖动动画Q抖动动d加一个回调函?br />
CCAnimate* animate = CCAnimate::actionWithAnimation(animation);
sprite->runAction(CCRepeatForever::create(animate));

CCActionInterval* delay = CCDelayTime::create(pArrowDir->getArrowShakeTime());
CCActionInterval* seq = (CCActionInterval*)CCSequence::create(delay, 
                                                              CCCallFuncND::create(pArrowDir, callfuncND_selector(ArrowDirection::arrowDisappearedCallBack), pArrowDir),
                                                              NULL);

sprite->runAction(seq);

W四步:播放完毕Q清除箭
在上一阶段回调中删除自?br />
removeFromParentAndCleanup(true);

-------------------------------------------------------------------------------
调试帮助Q?br />1.光看是不够的Q要看箭的飞行轨q,q是要画出来Q在CCNode的派生类中重载draw()函数Q在里面画贝塞尔曲线
void ArrowDirection::draw()
{
    if (mDrawBezier)
    {
        CCPoint control1 = ccpAdd(mBezierStartPoint, mBezierConfig.controlPoint_1);
        CCPoint control2 = ccpAdd(mBezierStartPoint, mBezierConfig.controlPoint_2);
        CCPoint end = ccpAdd(mBezierStartPoint, mBezierConfig.endPosition);

        // L制点
        ccDrawLine(mBezierStartPoint, control1);
        ccDrawLine(control2, end);

        // 画贝塞尔曲线
        ccDrawCubicBezier(mBezierStartPoint, mBezierConfig.controlPoint_1, mBezierConfig.controlPoint_2, mBezierConfig.endPosition, 100);
    }
}
更多L参考cocos2d-x_子DrawPrimitivesTest


Let me see see 2012-08-24 18:04 发表评论
]]>
cocos2d-x 随机?/title><link>http://www.shnenglu.com/wc250en007/archive/2012/08/24/188128.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Fri, 24 Aug 2012 06:14:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/08/24/188128.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/188128.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/08/24/188128.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/188128.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/188128.html</trackback:ping><description><![CDATA[ cocos2d-x中提供了CCRANDOM_0_1()?br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008000; ">/*</span><span style="color: #008000; ">* @def CCRANDOM_0_1<br /> returns a random float between 0 and 1<br /> </span><span style="color: #008000; ">*/</span><br /><span style="color: #0000FF; ">#define</span> CCRANDOM_0_1() ((float)rand()/RAND_MAX)</div>生成float范围是[0.f,1.f]Q包??<br />哈哈 如果我们需要[0,100]的随机数<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">float</span> random = CCRANDOM_0_1() * 100; <span style="color: #008000; ">//</span><span style="color: #008000; ">[0,100]   CCRANDOM_0_1() 取D围是[0,1]</span></div><img src ="http://www.shnenglu.com/wc250en007/aggbug/188128.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-08-24 14:14 <a href="http://www.shnenglu.com/wc250en007/archive/2012/08/24/188128.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>发布release版本的apk软ghttp://www.shnenglu.com/wc250en007/archive/2012/08/15/187250.htmlLet me see seeLet me see seeWed, 15 Aug 2012 02:11:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/08/15/187250.htmlhttp://www.shnenglu.com/wc250en007/comments/187250.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/08/15/187250.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/187250.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/187250.htmlSigning in Release Mode

When your application is ready for release to other users, you must:

  1. Obtain a suitable private key
  2. Compile the application in release mode
  3. Sign your application with your private key
  4. Align the final APK package
发布release版本要有4?br />官方说明Q?nbsp; http://developer.android.com/tools/publishing/app-signing.html#releasecompile 


qx通过Eclipse生成在bin目录下的apk文gQ都是debug版的Q如何创建release版的软g呢? 
其实q是挺简单的?nbsp;

1. 通过java自带的keytool工具Q创建release版的keystore 

keytool -genkey -v -keystore keystore_name.keystore -alias alias_name -keyalg RSA -validity 10000 


keystore_name.keystoreQ要创徏的release版keystore的文件名 
alias_nameQ别名?取个好记点的名字吧,后面q要用到?Q填写配|文?
-keyalg RSAQ通过RSA法生成 
-validity 10000Q有效期Q单位是?nbsp;

如果java环境配置正常Q输入命令后会出C列信?nbsp;
Enter keystore password:Qkeystore的密码) 
Re-enter new password:Q确认keystore的密码) 
What is your first and last name? 
  [Unknown]:  Q姓名,用自己喜Ƣ的名字吧,不知道会昄在哪里) 
What is the name of your organizational unit? 
  [Unknown]:  Q组l单位) 
What is the name of your organization? 
  [Unknown]:  Q组l,不知道和上面那个有什么区别) 
What is the name of your City or Locality? 
  [Unknown]:  Q城市) 
What is the name of your State or Province? 
  [Unknown]:  Q州Q省Q县Q?nbsp;
What is the two-letter country code for this unit? 
  [Unknown]:  CN 
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=CN correct? 
  [no]:  yes Q确认输入的信息Q?nbsp;

Generating 1,024 bit RSA key pair and self-signed certificate (SHA1withRSA) with 
a validity of 10,000 days 
        for: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=CN 
Enter key password for <alias_name> 
        (RETURN if same as keystore password):Qalias的密码,如果和keytore密码一_直接回RQ?nbsp;
Re-enter new password:Q确认alias的密码) 
[Storing my-release-key.keystore] 


2.发布Release版本
Signing in Release Mode


When your application is ready for release to other users, you must:

  1. Obtain a suitable private key
  2. Compile the application in release mode
  3. Sign your application with your private key
  4. Align the final APK package
官方的步骤有4步,~译release版本的应用程?br />
2.1 Eclipse导出
在Eclipse中,右键要发布的目Q依ơ选择Android Tool -> Export Signed Application Package... 
然后是step-by-step了,选择刚才生成的release版keystoreQ输入密码,选择aliasQ输入alias密码Q生成release版的apk?nbsp;

2.2 采用ANT命o行Ş?/strong>

$ ant release

By default, the build script compiles the application APK without signing it. The output file in your project bin/ will be <your_project_name>-unsigned.apk. Because the application APK is still unsigned, you must manually sign it with your private key and then align it using zipalign. 

默认~译出来的版本是没有证书?em style="color: #006600; font-family: 'courier new', courier, monospace; font-weight: bold; "><your_project_name>-unsigned.apk Q需要手动添加证书和寚w

To specify your keystore and alias, open the project ant.properties file (found in the root of the project directory) and add entries for key.store and key.alias. For example: 

我们可以?strong>ant.properties
文g中指定证书位|和寚w

# This file is used to override default values used by the Ant build system.
#
# This file must be checked into Version Control Systems, as it is
# integral to the build system of your project.

# This file is only used by the Ant script.

# You can use this to override default values such as
#  'source.dir' for the location of your java source folder and
#  'out.dir' for the location of your output folder.

# You can also use it define how the release builds are signed by declaring
# the following properties:
#  'key.store' for the location of your keystore and
#  'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.

#我的证书在上一U目录下
#alias是创书时填写的alias_name

key.store=../keystore_name.keystore 
key.alias=alias_name

接下来的步骤很easy?br />

Save your changes. Now you can build a signed .apk in release mode:

  1. Open a command-line and navigate to the root of your project directory.
  2. Use Ant to compile your project in release mode:
    ant release
  3. When prompted, enter you keystore and alias passwords.

    Caution: As described above, your password will be visible on the screen.

This creates your Android application .apk file inside the project bin/ directory, named<your_project_name>-release.apk. This .apk file has been signed with the private key specified inant.properties and aligned with zipalign. It's ready for installation and distribution.

ant release后会生成一?em style="color: #006600; font-family: 'courier new', courier, monospace; font-weight: bold; background-color: #f9f9f9; "><your_project_name>-release.apk的版?br />
啊,世界清静了~~~ 

最后就是安装了?nbsp;
׃使用了新的签名,必须先卸载原来安装的E序才可以安装?/span> 


/////////////////////////////////////////////////////////////////////////////////////////////////////////////

常见问题Q?br />生成的debug和release有什么区?大小差不?br />
Support for a true debug build. Developers no longer need to add the android:debuggable attribute to the tag in the manifest — the build tools add the attribute automatically. In Eclipse/ADT, all incremental builds are assumed to be debug builds, so the tools insert android:debuggable="true". When exporting a signed release build, the tools do not add the attribute. In Ant, a ant debug command automatically inserts the android:debuggable="true" attribute, while ant release does not. If android:debuggable="true" is manually set, then ant release will actually do a debug build, rather than a release build. 






























Let me see see 2012-08-15 10:11 发表评论
]]>
Android Push Notification实现信息推送?/title><link>http://www.shnenglu.com/wc250en007/archive/2012/08/08/186668.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Wed, 08 Aug 2012 10:38:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/08/08/186668.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/186668.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/08/08/186668.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/186668.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/186668.html</trackback:ping><description><![CDATA[<p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; vertical-align: baseline; font-weight: bold; padding-top: 0px">本文介绍AndroidPn目实现推送的使用q程?/strong></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">上个博文中提到在Android中实C息推送,其中一个比较成熟的解决Ҏ便是使用XMPP协议实现。而AndroidPn目是使用XMPP协议实现信息推送的一个开源项目。在q里l大家介l其使用q程?span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; vertical-align: baseline; padding-top: 0px" id="more-558"></span></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; vertical-align: baseline; font-weight: bold; padding-top: 0px">Apndroid Push Notification的特点: </strong></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">快速集?提供一U比C2DM更加快捷的用方?避免各种限制.</p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">无需架设服务?通过使用"云服?,减少额外服务器负?</p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">可以同时推送消息到|站面,android 手机</p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">耗电?占用量?</p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; vertical-align: baseline; font-weight: bold; padding-top: 0px">具体配置q程Q?nbsp;</strong></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">首先Q?我们需要下载androidpn-client-0.5.0.zip和androidpn-server-0.5.0-bin.zip?/p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">下蝲地址Q?a style="border-bottom: rgb(104,153,23) 1px dotted; padding-bottom: 1px; border-right-width: 0px; padding-left: 2px; padding-right: 2px; border-top-width: 0px; color: rgb(103,166,17); border-left-width: 0px; text-decoration: none; padding-top: 1px; -webkit-transition: color 0.3s linear" >http://sourceforge.net/projects/androidpn/</a></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">解压两个包,Eclipse导入clientQ配|好目标q_Q打开raw/androidpn.properties文gQ配|客LE序?/p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">1. 如果是模拟器来运行客LE序,把xmppHost配置?0.0.2.2[模拟器把10.0.2.2认ؓ是所在主机的地址Q?27.0.0.1是模拟器本n的回环地址Q?0.0.2.1表示|关地址Q?0.0.2.3表示DNS地址Q?0.0.2.15表示目标讑֤的网l地址]Q关于模拟器的详l信息,大家可参阅相兌料,q里不再详述.</p> <div style="padding-bottom: 0px; widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); vertical-align: baseline; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">xmppPort=5222 是服务器的xmpp服务监听端口</div> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <div style="padding-bottom: 0px; widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); vertical-align: baseline; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">q行androidpn-server-0.5.0\bin\run.bat启动服务器,从浏览器讉Khttp://127.0.0.1:7070/index.do (androidPN Server有个轻量U的web服务器,?070端口监听hQ接受用戯入的文本消息)</div> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <div style="padding-bottom: 0px; widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); vertical-align: baseline; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">q行客户端,客户端会向服务器发vq接hQ注册成功后Q服务器能识别客LQƈl护和客L的IP长连接?/div> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; vertical-align: baseline; font-weight: bold; padding-top: 0px">2. 如果是在同一个局域网内的其他机器的模拟器试(或者用同一无线路由器wifi上网的真? Q则需要把q个D|ؓ服务器机器的局域网ip.   </strong></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; vertical-align: baseline; font-weight: bold; padding-top: 0px">例如 你的电脑和android手机 都通过同一个无U\由器wifi上网, 电脑的ip地址?192.168.1.2 ?手机的ip地址?192.168.1.3, q个时?需要把q个g改ؓ xmppHost=192.168.1.1 或是电脑的IP地址Q就可以在手Z使用? </strong></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">3. 如果是不在同一个局域网的真机测试,我们需要将q个D|ؓ服务器的IP地址?/p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; vertical-align: baseline; font-weight: bold; padding-top: 0px">具体配置如下图所C:</strong></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline-block; max-width: 610px; height: auto; vertical-align: text-bottom; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" alt="" src="http://images.cnblogs.com/cnblogs_com/hanyonglu/2012-03-16_081017.png" /></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; vertical-align: baseline; font-weight: bold; padding-top: 0px">我的电脑IP是:192.168.8.107 </strong></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">服务器运行主界面Q?/p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline-block; max-width: 610px; height: auto; vertical-align: text-bottom; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" alt="" src="http://images.cnblogs.com/cnblogs_com/hanyonglu/2012-03-16_074350.png" /></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline-block; max-width: 610px; height: auto; vertical-align: text-bottom; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" alt="" src="http://images.cnblogs.com/cnblogs_com/hanyonglu/2012-03-16_074433.png" width="797" height="310" /></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline-block; max-width: 610px; height: auto; vertical-align: text-bottom; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" alt="" src="http://images.cnblogs.com/cnblogs_com/hanyonglu/2012-03-16_074420.png" width="797" height="306" /></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">推送信息:</p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline-block; max-width: 610px; height: auto; vertical-align: text-bottom; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" alt="" src="http://images.cnblogs.com/cnblogs_com/hanyonglu/2012-03-16_074154.png" width="798" height="481" /></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">试l果如下图:</p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline-block; max-width: 610px; height: auto; vertical-align: text-bottom; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" alt="" src="http://images.cnblogs.com/cnblogs_com/hanyonglu/SC20120316-074221.png" width="480" height="800" /></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline-block; max-width: 610px; height: auto; vertical-align: text-bottom; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" alt="" src="http://images.cnblogs.com/cnblogs_com/hanyonglu/SC20120316-074227.png" /></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">模拟器和真机试通过?/p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; vertical-align: baseline; font-weight: bold; padding-top: 0px">其他使用q程介绍Q?/strong></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">当然了,以上是在自己的服务器上配|ƈ实现信息推送,如果大家想省事的话,在这里给大家推荐个网址Q?nbsp;可以更轻村֜实现推送,~点是需要通过别h的服务器Q关于这点,你懂的?/p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">|址Q?nbsp;<a style="border-bottom: rgb(104,153,23) 1px dotted; padding-bottom: 1px; border-right-width: 0px; padding-left: 2px; padding-right: 2px; border-top-width: 0px; color: rgb(103,166,17); border-left-width: 0px; text-decoration: none; padding-top: 1px; -webkit-transition: color 0.3s linear" >http://www.push-notification.org/</a></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">只需甌个API卛_使用?/p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">至于其他的推送方案会在以后的博文中介l?/p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">完毕?br />原文地址Q?a >http://www.cnblogs.com/hanyonglu/archive/2012/03/16/2399655.html</a><br />////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br /><span style="color: red">新手常见问题Q?/span><br />解压两个包,Eclipse导入clientQ配|好目标q_~译Q出现问?/p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #000000">E</span><span style="color: #000000">/</span><span style="color: #000000">AndroidRuntime(</span><span style="color: #000000">13171</span><span style="color: #000000">): FATAL EXCEPTION: main<br /><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" />E</span><span style="color: #000000">/</span><span style="color: #000000">AndroidRuntime(</span><span style="color: #000000">13678</span><span style="color: #000000">): java.lang.NoClassDefFoundError:<br />  ....</span></div> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px">出现上述调试信息Qƈ且真Z出现错误Q在虚拟Z也出现错?br />原因Q代码依赖于其他?br />解决办法Q要在具体project上右键属性,在java build path里的order and export里把要编译的包文件前打勾。然后再clean该工E,h再运行就可以了?br /></p> <p style="widows: 2; text-transform: none; background-color: rgb(240,240,240); text-indent: 0px; margin: 10px 0px; font: 300 13px/26px 'Century Gothic', 'Microsoft YaHei', 'Trebuchet MS', Arial, Verdana, Tahoma, 'DejaVu Sans', 'Liberation sans', 'Bitstream Vera Sans', sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(34,34,34); word-spacing: 0px; -webkit-text-size-adjust: none; -webkit-text-stroke-width: 0px"><br /> </p><img src ="http://www.shnenglu.com/wc250en007/aggbug/186668.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-08-08 18:38 <a href="http://www.shnenglu.com/wc250en007/archive/2012/08/08/186668.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>45度斜角地图菱形坐标{?/title><link>http://www.shnenglu.com/wc250en007/archive/2012/07/20/184285.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Fri, 20 Jul 2012 00:12:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/07/20/184285.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/184285.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/07/20/184285.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/184285.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/184285.html</trackback:ping><description><![CDATA[<span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">我们要做一?5度游戏地图中Q那么如何判断鼠标点中了哪一个碎片呢Q?如图Q?/span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><ignore_js_op style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span id="xnrpbnv" class="Apple-converted-space"> <img style="width: 189px; height: 117px" border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/wc250en007/D3D/1.jpg" width="189" height="117" /></span></ignore_js_op><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">也许你想到通过解两个直U方E(Ҏ式)Q?br /></span><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/wc250en007/D3D/2.jpg" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><ignore_js_op style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span id="bzjhdfx" class="Apple-converted-space"> </span></ignore_js_op><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">不过q是个笨办法Q那么有更简单的办法吗?</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">开门见山:</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">***********************************</span><font style="widows: 2; text-transform: none; background-color: rgb(255,255,255); font-variant: normal; font-style: normal; text-indent: 0px; font-family: Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); font-weight: normal; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" size="3"><br style="word-wrap: break-word" />N=int(x/TileW - y/TileH)<br style="word-wrap: break-word" />M=int(x/TileW + y/TileH)</font><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">***********************************</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">N,M是碎片的索引Q从0开始?/span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">TileW,TileH是碎片的长宽?/span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">x,y是鼠标坐标,但是注意坐标pd炏V?/span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">以上q程如下图演C:</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><ignore_js_op style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span id="lrdjnbd" class="Apple-converted-space"> <img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/wc250en007/D3D/3.jpg" width="347" height="302" /></span></ignore_js_op><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">那么Q是什么原理呢Q?/span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">我们建立一个新的坐标系。以׃字的u,v为新的基向量?br /><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/wc250en007/D3D/4.jpg" width="499" height="347" /></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><ignore_js_op style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span id="pbhbvpp" class="Apple-converted-space"> </span></ignore_js_op><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">然后把鼠标坐标(注意原点Q)(x,y)转换成基于新的基集t={u,v}的展开式:</span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><ignore_js_op style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span id="vhzvxfd" class="Apple-converted-space"> </span></ignore_js_op><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/wc250en007/D3D/5.jpg" width="499" height="347" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">使用的时候很?/span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">公式?/span><br style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(68,68,68); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /> <div style="background-image: url(http://www.webgamei.com/club/static/image/common/codebg.gif); border-bottom: rgb(204,204,204) 1px solid; border-left: rgb(204,204,204) 1px solid; padding-bottom: 5px; widows: 2; text-transform: none; background-color: rgb(247,247,247); text-indent: 0px; margin: 10px 0px; padding-left: 10px; padding-right: 0px; zoom: 1; font: 14px/21px Tahoma, 'Microsoft Yahei', Simsun; word-wrap: break-word; white-space: normal; background-position: 0px 0px; orphans: 2; letter-spacing: normal; color: rgb(102,102,102); overflow: hidden; border-top: rgb(204,204,204) 1px solid; border-right: rgb(204,204,204) 1px solid; word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="blockcode"> <div style="word-wrap: break-word" id="code_OMZ"> <ol style="padding-bottom: 0px !important; margin: 0px 0px 0px 10px; padding-left: 0px !important; padding-right: 0px !important; word-wrap: break-word; padding-top: 0px !important"><li style="padding-bottom: 0px; line-height: 1.8em; list-style-type: decimal-leading-zero; margin: 0px 0px 0px 2em; padding-left: 10px; padding-right: 0px; font-family: Monaco, Consolas, ''Lucida Console'', ''Courier New'', serif; word-wrap: break-word; font-size: 12px; padding-top: 0px">N=int(x/TileW - y/TileH)<br style="word-wrap: break-word" /></li><li style="padding-bottom: 0px; line-height: 1.8em; list-style-type: decimal-leading-zero; margin: 0px 0px 0px 2em; padding-left: 10px; padding-right: 0px; font-family: Monaco, Consolas, ''Lucida Console'', ''Courier New'', serif; word-wrap: break-word; font-size: 12px; padding-top: 0px">M=int(x/TileW + y/TileH)</li></ol></div></div><br /><br />------------------------------------------------------------------------------------------------------------<br />下面说的?5度地图,地图坐标pd端的格子计方?br /> <p>关于45度角地图中像素坐标和地图坐标之间的{换,|上有各U方法,其实坐标转换是计算tite宽和tile高在像素坐标中的偏移|本方法是针对 tite块原点坐标在菱Ş的顶点的位置的坐标{换,?5度角地图中,方块形状形,你可以用flash cs工具或其他绘囑ַ具很快的创徏U菱形方块,按以?个步骤就可以了:<br />1?l制一个Q意大的正方形;<br />2?把这个正方Ş旋{45度;<br />3?把旋转的正方形的高度~放为原来的50%?br />q有一点就是方块尺寸的问题Q菱形方块的宽度是高度的2倍,其次方块寸比例应该?Q?。例?4像素X 32像素?00像素 X 50像素{,q样的尺寸刚好能使方块在地图的时候很好地排列在屏q上?br />至于坐标间的转换其实大家看图好理解了:</p> <p><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/wc250en007/D3D/6.jpg" width="401" height="221" /><br />图中是一个以U色(0,0)位置为原点,U点每向地图坐标pM轴上Ud一个单位,原点相对像素坐标pX中的偏移gؓ:方块宽度/2<br />菱Ş方块?var tileW :Number;<br />菱Ş方块?var tileH :Number;<br />地图的行?var row :int;<br />地图的列?var col :int;<br />U色原点坐标(像素坐标p? var originP : Point;<br />那么U色的原点坐标在地图坐标pM的位|ؓQ?br />originP.x = row * tileW /2;<br />originP.y = 0;<br />原点坐标出来了,那么其它点的坐标呢?<br />思\是先求出在地囑֝标系?M方向或N方向)每移动一个单位的像素坐标pX轴和像素坐标pY轴的像素偏移倹{?br />如红色原点移动到黑色点的位置Q?br />M在像素坐标系X轴的偏移像素 = tileW /2;Q向叛_U)<br />M在像素坐标系Y轴的偏移像素 = tileH /2; Q向下偏U)<br />N在像素坐标系X轴的偏移像素 = - tileW /2;Q向左偏U)<br />N在像素坐标系Y轴的偏移像素 = tileH /2; Q向下偏U)<br />假如有个地图坐标点(MQNQ,那么它对应的像素坐标pȝ点ؓvar p:Point<br />p.x = 原点坐标X + M在像素坐标系X轴的偏移像素 × M + N在像素坐标系X轴的偏移像素 × N = originP.x + tileW /2 × M + Q?tileW/2Q?× N = originP.x + (M – N) × tileW/2Q?br />p.y = 原点坐标Y + M在像素坐标系Y轴的偏移像素 × M + N在像素坐标系Y轴的偏移像素 × N = originP.y + tileH/2 × M + tileH/2 × N = originP.y + (M + N) × tileH/2;<br /><br />原文地址Q?a >http://blog.sina.com.cn/s/blog_6807f539010103ce.html</a></p><img src ="http://www.shnenglu.com/wc250en007/aggbug/184285.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-07-20 08:12 <a href="http://www.shnenglu.com/wc250en007/archive/2012/07/20/184285.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>cocos2d-x学习资料汇?/title><link>http://www.shnenglu.com/wc250en007/archive/2012/07/12/183002.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Thu, 12 Jul 2012 07:35:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/07/12/183002.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/183002.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/07/12/183002.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/183002.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/183002.html</trackback:ping><description><![CDATA[<p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="1" data-scayt_word="我之前一直学习cQ+的,W一ơ接触cocos2d是oc版的Q虽然很好用Q但是,我还是对cQ+情有独钟Q再加之cocos2d-xp׃hdQ更应该拥抱她,热爱她,把她发扬光大。之后,我将会全面投入cocos2d-x的怀抱,Ƣ迎大家和我交流Q一起学习?>我之前一直学习cQ+的,W一ơ接触cocos2d是oc版的Q虽然很好用Q但是,我还是对cQ+情有独钟Q再加之cocos2d-xp׃hdQ更应该拥抱她,热爱她,把她发扬光大。之后,我将会全面投入cocos2d-x的怀抱,Ƣ迎大家和我交流Q一起学习?/span></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="2" data-scayt_word="补充一点:我选择cocos2d-x决不是简单地支持国q么单,cocos2d-x真的很强大。关于游戏引擎如何选择的问题,请大家看q个帖子?>补充一点:我选择cocos2d-x决不是简单地支持国q么单,cocos2d-x真的很强大。关于游戏引擎如何选择的问题,请大家看<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">q个帖子</a>?/span></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="3" data-scayt_word="下面列出的链接排名不分先后,呵呵Q不一定要按顺序读。具体如何读Q以后摸熟悉了再跟大家分享?>下面列出的链接排名不分先后,呵呵Q不一定要按顺序读。具体如何读Q以后摸熟悉了再跟大家分享?/span></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="4" data-scayt_word="psQ这些链接的来源是googleQ四个群里面的开发者A献,由我整理而成Q如果有遗漏的地方,Ƣ迎大家补充啊?>psQ这些链接的来源是googleQ四个群里面的开发者A献,由我整理而成Q如果有遗漏的地方,Ƣ迎大家补充啊?/span></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="5" data-scayt_word="q有Q希望有学习或者正在用cocos2d-x的朋友,如果你们有博客,也请在评论里面留下你们的脚印Q相互学习,共同q步Q谢啦?>q有Q希望有学习或者正在用cocos2d-x的朋友,如果你们有博客,也请在评论里面留下你们的脚印Q相互学习,共同q步Q谢啦?/span></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">0.<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">http://www.supersuraccoon-cocos2d.com/<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="6" data-scayt_word="zh">zh</span>/2012/02/11/<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="7" data-scayt_word="sticky-ios-cocos2d-develop-recommended-blog-list-keep-updating">sticky-ios-cocos2d-develop-recommended-blog-list-keep-updating</span>/</a>(It's amazing!Thank you <a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank"><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="8" data-scayt_word="supersuraccoon">supersuraccoon</span></a>!)</p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">1.<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">csdn的cocos2d-x开发专?/a>?/p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2.<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">csdn的cocos2d-x入门专栏?/a></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">3.<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">himi的cocos2d-x游戏开?/a><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="9" data-scayt_word="Q这个链接是csdn的,大家可以d注himi的新个h主页Q?>Q这个链接是csdn的,大家可以d注himi的新个h主页Q?/span></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">4.<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">老G的blog</a></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">5.<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">cocoaChina上面的汇d</a>Q这个汇d늛了api、wiki、相x档和一些开发者博客。值得收藏Q?/p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">6.<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">搭徏cocos2d-x-android环境 Windows<span id="xnfbldb" class="Apple-converted-space"> </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="10" data-scayt_word="XP3">XP3</span><span id="dflfhfv" class="Apple-converted-space"> </span>+ Eclipse +<span id="pzdfzhn" class="Apple-converted-space"> </span><span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="11" data-scayt_word="NDKR7">NDKR7</span>+<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="12" data-scayt_word="COCOS2DX">COCOS2DX</span>(<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" data-scaytid="13" data-scayt_word="没有用到cygwin和minigw">没有用到cygwin和minigw</span>)</a></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">7.<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">cocos2d-x ~译 Anroid版本遇到的问题以及解军_?/a></p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">8.<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"> </span><a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">cocos2d-xdq告条(BADA版本Q?/a>Q上面写了很多关于lua的文章)</p> <p style="padding-bottom: 10px; widows: 2; text-transform: none; background-color: rgb(249,249,249); text-indent: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font: 14px/25px Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; padding-top: 10px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">9.<a style="padding-bottom: 0px; font-style: normal; margin: 0px; padding-left: 0px; padding-right: 0px; letter-spacing: normal; color: rgb(41,113,167); font-size: 14px; cursor: pointer; text-decoration: none; padding-top: 0px" target="_blank">http://blog.plicatibu.com/category/cocos2d/</a></p><img src ="http://www.shnenglu.com/wc250en007/aggbug/183002.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-07-12 15:35 <a href="http://www.shnenglu.com/wc250en007/archive/2012/07/12/183002.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>cocos2d box2d 基础 知识 创徏人物、金币、碰??/title><link>http://www.shnenglu.com/wc250en007/archive/2012/07/12/183001.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Thu, 12 Jul 2012 07:33:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2012/07/12/183001.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/183001.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2012/07/12/183001.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/183001.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/183001.html</trackback:ping><description><![CDATA[     摘要: 原文地址Qhttp://blog.csdn.net/a8467562/article/details/7580443 1 Q?首先 ?构徏 世界 Q即b2World 你也可能用到 debug 调试QGLESDebugDraw   b2Vec2 gravity; gravity.Set(0.0f, -9.8f); _world = new ...  <a href='http://www.shnenglu.com/wc250en007/archive/2012/07/12/183001.html'>阅读全文</a><img src ="http://www.shnenglu.com/wc250en007/aggbug/183001.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2012-07-12 15:33 <a href="http://www.shnenglu.com/wc250en007/archive/2012/07/12/183001.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>cocos2d-x工具集合http://www.shnenglu.com/wc250en007/archive/2012/07/12/182996.htmlLet me see seeLet me see seeThu, 12 Jul 2012 06:56:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/12/182996.htmlhttp://www.shnenglu.com/wc250en007/comments/182996.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/12/182996.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/182996.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/182996.htmlEditors for cocos2d-x Texture,Tilemap,Particle,Action,Level etc

推荐地址Q?a >http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Editors_for_cocos2d-x_TextureTilemapParticleActionLevel_etc

Action Editor

Map Editor

SpriteSheet Editor

Particle Editor

Font editor:

Texture atlas editor:

Physics object editor:

Font editor:



Let me see see 2012-07-12 14:56 发表评论
]]>
cocos2d-x 使用box2d来做撞(且仅用来做碰撞检)(一)http://www.shnenglu.com/wc250en007/archive/2012/07/11/182858.htmlLet me see seeLet me see seeWed, 11 Jul 2012 09:10:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/11/182858.htmlhttp://www.shnenglu.com/wc250en007/comments/182858.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/11/182858.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/182858.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/182858.html阅读全文

Let me see see 2012-07-11 17:10 发表评论
]]>
cocos2d-x环境配置http://www.shnenglu.com/wc250en007/archive/2012/07/06/181613.htmlLet me see seeLet me see seeFri, 06 Jul 2012 02:21:00 GMThttp://www.shnenglu.com/wc250en007/archive/2012/07/06/181613.htmlhttp://www.shnenglu.com/wc250en007/comments/181613.htmlhttp://www.shnenglu.com/wc250en007/archive/2012/07/06/181613.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/181613.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/181613.html阅读全文

Let me see see 2012-07-06 10:21 发表评论
]]>
þùƷվ| þþþþþž99Ʒ| Ѿþþþþ| ݺۺϾþۺ88| ɫۺϾþ| þ99Ʒþþôѧ| þۺϸþúݺ97ɫ| ƷۺϾþþþþ88С˵| 2019þþø456| ҹþӰԺ| Ļþۺ| þþƷһ| Ѿþˬˬav| þ޹vwww| þþþav| ݺݾƷþþĻ| 97Ʒ˾þþô߽97| һۺϾþ| ˾þˬ| þþùҺ| պӰԺþ| þˬ˸߳AV| þۺϸϾþù| ޹Ʒþþž| 91޹˾þþƷ| 㽶þavһ| ɫۺϾþ߹ۿ| ˺ݺۺϾþ| þþƷ޾Ʒɫ| þˬһ | ƷþþþþþþþĻ| AVպƷþþþþþ| ŷպƷþþþ| 97þþþ| ۺþþ| ˳ɾƷþþþ| þþAVҰ| ھƷۺϾþþ40p| ޾ƷþþþþҲ| þۺɫݺ| vĻþ|