示例#1
0
        //-------------------------------------------------------------------------
        void _newShockBackground(string background_name)
        {
            mShockBackgroundStillSprite = mBackgroundLoader.newBackgroundStillSprite(background_name, mScene);
            mShockBackgroundStillSprite.setPosition(EbVector3.Zero);
            mShockBackgroundStillSprite.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.ShockBackground));
            mShockBackgroundStillSprite.setActive(false);

#if UNITY_EDITOR
            mShockBackgroundStillSprite.gameObject.name = "TkBackground";
#endif
        }
示例#2
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
            }