//------------------------------------------------------------------------- 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)); }
//------------------------------------------------------------------------- public void release() { if (mSpriteNumber != null) { mSpriteNumber.destroy(); mSpriteNumber = null; } _distroyTurnplateParticle(); }
//------------------------------------------------------------------------- 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; }
//------------------------------------------------------------------------- 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 }
//------------------------------------------------------------------------- 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 }
//------------------------------------------------------------------------- public override float getScale(CSpriteNumber._eNumberSize size) { return mScene.getRenderConfigure().getScoreNumberScale(size); }
public abstract float getScale(CSpriteNumber._eNumberSize size);
public float getScoreNumberScale(CSpriteNumber._eNumberSize size) { return mRenderConfigureStruct.mScoreNumberScale[size]; }