<legend id='iECDg'><style id='iECDg'><dir id='iECDg'><q id='iECDg'></q></dir></style></legend>
  • <i id='iECDg'><tr id='iECDg'><dt id='iECDg'><q id='iECDg'><span id='iECDg'><b id='iECDg'><form id='iECDg'><ins id='iECDg'></ins><ul id='iECDg'></ul><sub id='iECDg'></sub></form><legend id='iECDg'></legend><bdo id='iECDg'><pre id='iECDg'><center id='iECDg'></center></pre></bdo></b><th id='iECDg'></th></span></q></dt></tr></i><div id='iECDg'><tfoot id='iECDg'></tfoot><dl id='iECDg'><fieldset id='iECDg'></fieldset></dl></div>

      <small id='iECDg'></small><noframes id='iECDg'>

      <tfoot id='iECDg'></tfoot>

          <bdo id='iECDg'></bdo><ul id='iECDg'></ul>

        Cocos2D 中的评分系统

        Scoring System In Cocos2D(Cocos2D 中的评分系统)

          • <bdo id='phD5s'></bdo><ul id='phD5s'></ul>
              <tbody id='phD5s'></tbody>
            1. <legend id='phD5s'><style id='phD5s'><dir id='phD5s'><q id='phD5s'></q></dir></style></legend>
            2. <tfoot id='phD5s'></tfoot>

              <small id='phD5s'></small><noframes id='phD5s'>

              <i id='phD5s'><tr id='phD5s'><dt id='phD5s'><q id='phD5s'><span id='phD5s'><b id='phD5s'><form id='phD5s'><ins id='phD5s'></ins><ul id='phD5s'></ul><sub id='phD5s'></sub></form><legend id='phD5s'></legend><bdo id='phD5s'><pre id='phD5s'><center id='phD5s'></center></pre></bdo></b><th id='phD5s'></th></span></q></dt></tr></i><div id='phD5s'><tfoot id='phD5s'></tfoot><dl id='phD5s'><fieldset id='phD5s'></fieldset></dl></div>

                • 本文介绍了Cocos2D 中的评分系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的游戏有一个碰撞检测,当我的导弹击中敌人时,敌人就会消失.我想添加一个评分系统,每次我的导弹击中敌人时加 1 分.我将在下面发布我的游戏代码(我使用了 HelloWorldLayer.m)**

                  My game has a collision detection where when my missile hits the enemy the enemy disappears. I want to add a scoring system that adds 1 point every time my missile hits the enemy. I'll post my game code below (I used the HelloWorldLayer.m)**

                  代码如下:

                  链接 - http://pastebin.com/iGP83SCv

                  在碰撞部分,我只想让它在每次弹丸击中敌人萌芽"时加 1 分,并在标签中显示分数.示例:得分:0000

                  In the collision section i just want it to add 1 point every time the projectile hits the enemy "sprout" and display the score in label. Example: Score:0000

                  PS,请尽可能简单地解释一下.

                  PS, please explain it as easy as possible.

                  推荐答案

                  @synthesize int 类型的 "score" 属性和类型的 "scoreLabel" 属性CCLabelTTF.

                  @synthesize a "score" property of type int, and a "scoreLabel" property of type CCLabelTTF.

                  -(void)init

                  在第 126 行,将score"属性加 1,并将该值设置为 CCLabelTTF.

                  On line 126, increment your "score" property by 1, and set that value into your CCLabelTTF.

                  这篇关于Cocos2D 中的评分系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Resume game cocos2d(恢复游戏 cocos2d)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                  <tfoot id='wJ9sS'></tfoot>

                    <small id='wJ9sS'></small><noframes id='wJ9sS'>

                        <i id='wJ9sS'><tr id='wJ9sS'><dt id='wJ9sS'><q id='wJ9sS'><span id='wJ9sS'><b id='wJ9sS'><form id='wJ9sS'><ins id='wJ9sS'></ins><ul id='wJ9sS'></ul><sub id='wJ9sS'></sub></form><legend id='wJ9sS'></legend><bdo id='wJ9sS'><pre id='wJ9sS'><center id='wJ9sS'></center></pre></bdo></b><th id='wJ9sS'></th></span></q></dt></tr></i><div id='wJ9sS'><tfoot id='wJ9sS'></tfoot><dl id='wJ9sS'><fieldset id='wJ9sS'></fieldset></dl></div>

                            <tbody id='wJ9sS'></tbody>

                          <legend id='wJ9sS'><style id='wJ9sS'><dir id='wJ9sS'><q id='wJ9sS'></q></dir></style></legend>
                          • <bdo id='wJ9sS'></bdo><ul id='wJ9sS'></ul>