Exemplo n.º 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
        }
Exemplo n.º 2
0
 //-------------------------------------------------------------------------
 public float getLayer(_eLevelLayer layer)
 {
     return mDicLayer[layer].getLayer();
 }
Exemplo n.º 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());
 }
Exemplo n.º 4
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
            }
Exemplo n.º 5
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());
 }
Exemplo n.º 6
0
 //-------------------------------------------------------------------------
 public float getLayer(_eLevelLayer layer)
 {
     return(mDicLayer[layer].getLayer());
 }