<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                這個場景作為彈出場景,主要介紹下游戲。。。還有自己的聯系方式(*^__^*) …… 主要使用文本,就一個返回按鍵的響應函數 ~~~ //返回按鈕 void back(EventKeyboard::KeyCode keyCode, Event* pEvent); ~~~ 同樣要記得在析構函數中移除監聽 ~~~ AboutGame::~AboutGame() { _eventDispatcher->removeEventListenersForTarget(this); } ~~~ 文本已在XML文件中生成,直接調用即可 ~~~ bool AboutGame::init() { if (!Layer::init()) return false; //背景音樂 CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(true); CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic("sound/BackgroundMusic1.mp3", true); bool bRect = false; do { auto size = Director::getInstance()->getWinSize(); //設置背景圖片 auto m_background = Sprite::createWithSpriteFrameName("backgroundTollgateOne.png"); m_background->setPosition(Vec2(size.width/2,size.height/2)); m_background->setAnchorPoint(Vec2(0.5, 0.5)); this->addChild(m_background); //設置監聽器 auto m_listener = EventListenerKeyboard::create(); m_listener->onKeyReleased = CC_CALLBACK_2(AboutGame::back, this); _eventDispatcher->addEventListenerWithSceneGraphPriority(m_listener, this); //設置標簽 并 獲取中文文本 auto dictionary = Dictionary::createWithContentsOfFile("fonts/AboutMe.xml"); auto m_label3 = Label::createWithTTF( ((__String*)(dictionary->objectForKey("Others")))->getCString(), "fonts/DFPShaoNvW5-GB.ttf", 25 ); m_label3->setDimensions(size.width / 3 * 2, size.height / 2); m_label3->setColor(Color3B(255, 255, 255)); m_label3->setPosition(Point(size.width / 2, size.height/2)); this->addChild(m_label3); auto m_label1 = Label::createWithTTF( ((__String*)(dictionary->objectForKey("AboutMe")))->getCString(), "fonts/DFPShaoNvW5-GB.ttf", 35 ); m_label1->setColor(Color3B(255, 0, 0)); m_label1->setPosition( Point(size.width/2, size.height-m_label3->getContentSize().height-m_label1->getContentSize().height) ); this->addChild(m_label1); auto m_label2 = Label::createWithTTF( ((__String*)(dictionary->objectForKey("QQ")))->getCString(), "fonts/DFPShaoNvW5-GB.ttf", 25 ); m_label2->setDimensions(size.width / 3 * 2, size.height / 6); m_label2->setColor(Color3B(0, 255, 0)); m_label2->setPosition(Point(size.width / 2, m_label1->getPositionY() - m_label2->getContentSize().height)); this->addChild(m_label2); bRect = true; } while (0); return bRect; } //返回按鈕 void AboutGame::back(EventKeyboard::KeyCode keyCode, Event* pEvent) { if (keyCode == EventKeyboard::KeyCode::KEY_ESCAPE) { //背景音樂 CocosDenshion::SimpleAudioEngine::getInstance()->stopBackgroundMusic(true); CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic("sound/game_start.mp3", true); Director::getInstance()->popScene(); } } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看