Ejemplo n.º 1
0
        //-------------------------------------------------------------------------
        void _initCSprite(string name, string tag)
        {
            if (mAnimationName == "")
            {
                return;
            }

            mSprite = mScene.getRenderObjectPool().newStillSprite();
            mSprite.setTag(tag);
            mSprite.playAnimation(mAnimationName);
            mSprite.setScale(1f);
            mSprite.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.Buffer));
            //if (name == "BufLock")
            //{
            //    mSprite.setScale(0.47f);
            //}
            //else
            //{
            //    mSprite.setScale(0.38f * 2.7f);
            //}

#if UNITY_EDITOR
            mSprite.gameObject.name = "TkSpriteBuffer_" + name;
#endif
        }
Ejemplo n.º 2
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());
 }
Ejemplo 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());
 }
Ejemplo n.º 4
0
        //-------------------------------------------------------------------------
        void _initCSprite(string name, string tag)
        {
            if (mAnimationName == "") return;

            mSprite = mScene.getRenderObjectPool().newStillSprite();
            mSprite.setTag(tag);
            mSprite.playAnimation(mAnimationName);
            mSprite.setScale(1f);
            mSprite.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.Buffer));
            //if (name == "BufLock")
            //{
            //    mSprite.setScale(0.47f);
            //}
            //else
            //{
            //    mSprite.setScale(0.38f * 2.7f);
            //}

            #if UNITY_EDITOR
            mSprite.gameObject.name = "TkSpriteBuffer_" + name;
            #endif
        }
Ejemplo n.º 5
0
 //-------------------------------------------------------------------------
 public void setTag(string tag)
 {
     mStillSprite.setTag(tag);
 }