示例#1
0
 //-------------------------------------------------------------------------
 public CSpriteScoreTurnplate(CRenderScene scene, EbVector3 position, float up_angle)
 {
     mScene = scene;
     mPosition = position;
     mAngle = up_angle;
     mSpriteNumber = new CSpriteNumber(mScene, new CScoreDigitFactory(mScene));
     mSpriteNumber.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.TurretScore));
 }
示例#2
0
 //-------------------------------------------------------------------------
 public CSpriteScoreTurnplate(CRenderScene scene, EbVector3 position, float up_angle)
 {
     mScene        = scene;
     mPosition     = position;
     mAngle        = up_angle;
     mSpriteNumber = new CSpriteNumber(mScene, new CScoreDigitFactory(mScene));
     mSpriteNumber.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.TurretScore));
 }
示例#3
0
 //-------------------------------------------------------------------------
 public void release()
 {
     if (mSpriteNumber != null)
     {
         mSpriteNumber.destroy();
         mSpriteNumber = null;
     }
     _distroyTurnplateParticle();
 }
示例#4
0
 //-------------------------------------------------------------------------
 public void release()
 {
     if (mSpriteNumber != null)
     {
         mSpriteNumber.destroy();
         mSpriteNumber = null;
     }
     _distroyTurnplateParticle();
 }
示例#5
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;
        }
示例#6
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;
        }
示例#7
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
        }
示例#8
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
        }
示例#9
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
        }
示例#10
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
        }
示例#11
0
 //-------------------------------------------------------------------------
 public override float getScale(CSpriteNumber._eNumberSize size)
 {
     return mScene.getRenderConfigure().getScoreNumberScale(size);
 }
示例#12
0
 public abstract float getScale(CSpriteNumber._eNumberSize size);
示例#13
0
 public float getScoreNumberScale(CSpriteNumber._eNumberSize size)
 {
     return mRenderConfigureStruct.mScoreNumberScale[size];
 }