Example #1
0
        //-------------------------------------------------------------------------
        CSpriteFishDieScore(CRenderScene render_scene, EbVector3 pos, int score, float delay_time)
        {
            mCSpriteNumber = new CSpriteNumber(render_scene, new CScoreDigitFactory(render_scene));
            mCSpriteNumber.create(score, pos, 0, getByScore(score));
            mCSpriteNumber.setLayer(render_scene.getLayerAlloter().getLayer(_eLevelLayer.FishScore));
            mFunDelayTime = delay_time;
            mIsNeedAutoDestroy = true;

            _initRoute(pos, 0);
            mNumber = score;
        }
Example #2
0
        //-------------------------------------------------------------------------
        CSpriteFishDieScore(CRenderScene render_scene, EbVector3 pos, int score, float delay_time)
        {
            mCSpriteNumber = new CSpriteNumber(render_scene, new CScoreDigitFactory(render_scene));
            mCSpriteNumber.create(score, pos, 0, getByScore(score));
            mCSpriteNumber.setLayer(render_scene.getLayerAlloter().getLayer(_eLevelLayer.FishScore));
            mFunDelayTime      = delay_time;
            mIsNeedAutoDestroy = true;

            _initRoute(pos, 0);
            mNumber = score;
        }
Example #3
0
        //-------------------------------------------------------------------------
        public CSpriteScore(CRenderScene scene, EbVector3 position, float angle, int turret_no)
        {
            mScene = scene;

            mSpriteNumber = new CSpriteNumber(mScene, new CPanelDigitFactory(mScene));
            mSpriteNumber.create(0, position, angle, CSpriteNumber._eNumberSize.Small1, CSpriteNumber._eNumberAlign.Right);
            mSpriteNumber.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.TurretScore));
            mBackground = mScene.getRenderObjectPool().newStillSprite();
            mBackground.playAnimation("score_panel_" + turret_no);
            mBackground.setScale(1, 1f);

            setScore(0);

            #if UNITY_EDITOR
            mBackground.gameObject.name = "TkSpriteSpriteScore_score_panel_" + turret_no;
            #endif
        }
Example #4
0
        //-------------------------------------------------------------------------
        public void display(int score, TbDataParticle particle_data)
        {
            if (score <= 0)
            {
                return;
            }

            mSpriteNumber.create(score, 100, mPosition, mAngle + mCurrentAngle);

            mStillParticle = mScene.getParticlemanager().newParticle(particle_data.ParticlePrefabName);
            mStillParticle.setPosition(mPosition);
            mStillParticle.setLooping(false);
            mStillParticle.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.TurretScoreBg));

            mIsDisplay = true;
            initRotate();
        }
Example #5
0
        //-------------------------------------------------------------------------
        public CSpriteScore(CRenderScene scene, EbVector3 position, float angle, int turret_no)
        {
            mScene = scene;

            mSpriteNumber = new CSpriteNumber(mScene, new CPanelDigitFactory(mScene));
            mSpriteNumber.create(0, position, angle, CSpriteNumber._eNumberSize.Small1, CSpriteNumber._eNumberAlign.Right);
            mSpriteNumber.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.TurretScore));
            mBackground = mScene.getRenderObjectPool().newStillSprite();
            mBackground.playAnimation("score_panel_" + turret_no);
            mBackground.setScale(1, 1f);

            setScore(0);

#if UNITY_EDITOR
            mBackground.gameObject.name = "TkSpriteSpriteScore_score_panel_" + turret_no;
#endif
        }
Example #6
0
        //-------------------------------------------------------------------------
        public CSpriteBgNumber(CRenderScene scene, BgColorEnum color, int number)
        {
            mScene = scene;
            float number_layer = mScene.getLayerAlloter().getLayer(_eLevelLayer.TurretScore);

            mCSpriteNumber = new CSpriteNumber(mScene, new CPanelDigitFactory(mScene));
            mCSpriteNumber.create(number, EbVector3.Zero, 0, CSpriteNumber._eNumberSize.Small2);
            mCSpriteNumber.setLayer(number_layer);

            mNumberBackgroundCSprite = mScene.getRenderObjectPool().newStillSprite();

            mNumberBackgroundCSprite.setLayer(number_layer + mScene.getLayerAlloter().EachFishGap / 100f);
            mNumberBackgroundCSprite.setScale(0.65f * number.ToString().Length, 0.8f);

            mNumberBackgroundCSprite.playAnimation(getAnimationNameByColor(color));

#if UNITY_EDITOR
            mNumberBackgroundCSprite.gameObject.name = "TkSpriteChips_" + getAnimationNameByColor(color);
#endif
        }
Example #7
0
        //-------------------------------------------------------------------------
        public CSpriteBgNumber(CRenderScene scene, BgColorEnum color, int number)
        {
            mScene = scene;
            float number_layer = mScene.getLayerAlloter().getLayer(_eLevelLayer.TurretScore);

            mCSpriteNumber = new CSpriteNumber(mScene, new CPanelDigitFactory(mScene));
            mCSpriteNumber.create(number, EbVector3.Zero, 0, CSpriteNumber._eNumberSize.Small2);
            mCSpriteNumber.setLayer(number_layer);

            mNumberBackgroundCSprite = mScene.getRenderObjectPool().newStillSprite();

            mNumberBackgroundCSprite.setLayer(number_layer + mScene.getLayerAlloter().EachFishGap / 100f);
            mNumberBackgroundCSprite.setScale(0.65f * number.ToString().Length, 0.8f);

            mNumberBackgroundCSprite.playAnimation(getAnimationNameByColor(color));

            #if UNITY_EDITOR
            mNumberBackgroundCSprite.gameObject.name = "TkSpriteChips_" + getAnimationNameByColor(color);
            #endif
        }