//------------------------------------------------------------------------- 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 }
//------------------------------------------------------------------------- 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 }