Beispiel #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));
 }
Beispiel #2
0
 //-------------------------------------------------------------------------
 public void release()
 {
     if (mSpriteNumber != null)
     {
         mSpriteNumber.destroy();
         mSpriteNumber = null;
     }
     _distroyTurnplateParticle();
 }
Beispiel #3
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;
    }
Beispiel #4
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
    }
Beispiel #5
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
    }