コード例 #1
0
        //-------------------------------------------------------------------------
        public void load(string prefab_name, _eLevelLayer layer)
        {
            mBgSprite = mBackgroundLoader.newBackgroundStillSprite(prefab_name, mScene);
            mBgSprite.setPosition(EbVector3.Zero);
            mBgSprite.setDirection(0);
            mBgSprite.setLayer(mScene.getLayerAlloter().getLayer(layer));
            mBgClippedSprite = mBgSprite.gameObject.GetComponent <tk2dClippedSprite>();

#if UNITY_EDITOR
            mBgSprite.gameObject.name = "TkBackground";
#endif
        }
コード例 #2
0
ファイル: RenderLayerAlloter.cs プロジェクト: yinlei/Fishing
 //-------------------------------------------------------------------------
 public float getLayer(_eLevelLayer layer)
 {
     return mDicLayer[layer].getLayer();
 }
コード例 #3
0
 //-------------------------------------------------------------------------
 void _initTurretUnit(ref StillSprite still_sprite, string animation_name, float scale, _eLevelLayer layer)
 {
     still_sprite = mScene.getRenderObjectPool().newStillSprite();
     still_sprite.playAnimation(animation_name);
     still_sprite.setScale(scale);
     still_sprite.setLayer(mScene.getLayerAlloter().getLayer(layer));
     still_sprite.setPosition(mRenderTurret.getTurretPos());
     still_sprite.setDirection(mScene.getTurretHelper().getBaseAngleByTurretId(mRenderTurret.getTurretId()));
     still_sprite.setTag("CSpriteTurret" + mRenderTurret.getTurretId());
 }
コード例 #4
0
ファイル: LevelBackgroundMgr.cs プロジェクト: yinlei/Fishing
            //-------------------------------------------------------------------------
            public void load(string prefab_name, _eLevelLayer layer)
            {
                mBgSprite = mBackgroundLoader.newBackgroundStillSprite(prefab_name, mScene);
                mBgSprite.setPosition(EbVector3.Zero);
                mBgSprite.setDirection(0);
                mBgSprite.setLayer(mScene.getLayerAlloter().getLayer(layer));
                mBgClippedSprite = mBgSprite.gameObject.GetComponent<tk2dClippedSprite>();

                #if UNITY_EDITOR
                mBgSprite.gameObject.name = "TkBackground";
                #endif
            }
コード例 #5
0
ファイル: CSpriteTurretFort.cs プロジェクト: yinlei/Fishing
 //-------------------------------------------------------------------------
 void _initTurretUnit(ref StillSprite still_sprite, string animation_name, float scale, _eLevelLayer layer)
 {
     still_sprite = mScene.getRenderObjectPool().newStillSprite();
     still_sprite.playAnimation(animation_name);
     still_sprite.setScale(scale);
     still_sprite.setLayer(mScene.getLayerAlloter().getLayer(layer));
     still_sprite.setPosition(mRenderTurret.getTurretPos());
     still_sprite.setDirection(mScene.getTurretHelper().getBaseAngleByTurretId(mRenderTurret.getTurretId()));
     still_sprite.setTag("CSpriteTurret" + mRenderTurret.getTurretId());
 }
コード例 #6
0
 //-------------------------------------------------------------------------
 public float getLayer(_eLevelLayer layer)
 {
     return(mDicLayer[layer].getLayer());
 }