//------------------------------------------------------------------------- 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 }
//------------------------------------------------------------------------- public float getLayer(_eLevelLayer layer) { return mDicLayer[layer].getLayer(); }
//------------------------------------------------------------------------- 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()); }
//------------------------------------------------------------------------- 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 }
//------------------------------------------------------------------------- public float getLayer(_eLevelLayer layer) { return(mDicLayer[layer].getLayer()); }