コード例 #1
0
ファイル: TileDemo.cs プロジェクト: chengcong/cocos2d-xna
        public override void onEnter()
        {
            base.onEnter();

            m_label.setString(title());
            //    m_subtitle.setString(subtitle());
        }
コード例 #2
0
        public override void onEnter()
        {
            base.onEnter();

            CCLabelTTF pLabel = (CCLabelTTF)(this.getChildByTag(1000));

            pLabel.setString(title());
        }
コード例 #3
0
        public void updateQuantityLabel()
        {
            if (quantityOfNodes != lastRenderedCount)
            {
                CCLabelTTF infoLabel = (CCLabelTTF)getChildByTag(PerformanceNodeChildrenTest.kTagInfoLayer);
                string     str;
                //sprintf(str, "%u nodes", quantityOfNodes);
                str = string.Format("{u} nodes", quantityOfNodes);
                infoLabel.setString(str);

                lastRenderedCount = quantityOfNodes;
            }
        }
コード例 #4
0
        public void updateQuantityLabel()
        {
            if (quantityParticles != lastRenderedCount)
            {
                CCLabelTTF infoLabel = (CCLabelTTF)getChildByTag(PerformanceParticleTest.kTagInfoLayer);
                //char str[20] = {0};
                string str;
                //sprintf(str, "%u particles", quantityParticles);
                str = string.Format("{0:u}particles", quantityParticles);
                infoLabel.setString(str);

                lastRenderedCount = quantityParticles;
            }
        }
コード例 #5
0
        public void updateNodes()
        {
            if (quantityNodes != lastRenderedCount)
            {
                CCLabelTTF infoLabel = (CCLabelTTF)getChildByTag(PerformanceSpriteTest.kTagInfoLayer);
                //char str[16] = {0};
                string str;
                //sprintf(str, "%u nodes", quantityNodes);
                str = string.Format("{0:U} nodes", quantityNodes);
                infoLabel.setString(str);

                lastRenderedCount = quantityNodes;
            }
        }
コード例 #6
0
        public void updateStrings(float dt)
        {
            CCLabelBMFont label1 = (CCLabelBMFont)getChildByTag((int)TagSprite.kTagBitmapAtlas1);
            CCLabelTTF    label2 = (CCLabelTTF)getChildByTag((int)TagSprite.kTagBitmapAtlas2);
            CCLabelAtlas  label3 = (CCLabelAtlas)getChildByTag((int)TagSprite.kTagBitmapAtlas3);

            if (!setEmpty)
            {
                label1.setString("not empty");
                label2.setString("not empty");
                label3.setString("hi");

                setEmpty = true;
            }
            else
            {
                label1.setString("");
                label2.setString("");
                label3.setString("");

                setEmpty = false;
            }
        }