コード例 #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
ファイル: CSpriteFishDieScore.cs プロジェクト: yinlei/Fishing
        //-------------------------------------------------------------------------
        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;
        }
コード例 #4
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;
        }
コード例 #5
0
ファイル: CSpriteScore.cs プロジェクト: yinlei/Fishing
        //-------------------------------------------------------------------------
        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
        }
コード例 #6
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
        }
コード例 #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
        }
コード例 #8
0
ファイル: CSpriteBgNumber.cs プロジェクト: yinlei/Fishing
        //-------------------------------------------------------------------------
        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
        }