Exemplo n.º 1
0
        //-------------------------------------------------------------------------
        public override void destroy()
        {
            if (mHasDestroy) return;
            mHasDestroy = true;
            if (mCSpriteFishNet != null) { mCSpriteFishNet.destroy(); }
            mScene.getRenderObjectPool().freeStillSprite(mStillSprite);

            mStillSprite = null;
            mCSpriteFishNet = null;
        }
Exemplo n.º 2
0
        //-------------------------------------------------------------------------
        public override void destroy()
        {
            if (mHasDestroy)
            {
                return;
            }
            mHasDestroy = true;
            if (mCSpriteFishNet != null)
            {
                mCSpriteFishNet.destroy();
            }
            mScene.getRenderObjectPool().freeStillSprite(mStillSprite);

            mStillSprite    = null;
            mCSpriteFishNet = null;
        }
Exemplo n.º 3
0
        //-------------------------------------------------------------------------
        void buildFrame(string pic_name, float scale, int vib_id)
        {
            mPicName = pic_name;
            vmVibId  = vib_id;

            if ((vib_id == 1 || vib_id == 2 || vib_id == 3 || vib_id == 4) && mMapParam.ContainsKey("NetColor"))
            {
                mAnimationName  = pic_name;
                mCSpriteFishNet = new CSpriteFishNet();
                Color color           = (Color)mMapParam["NetColor"];
                uint  et_player_rpcid = (uint)mMapParam["PlayerId"];
                mCSpriteFishNet.create(color, et_player_rpcid, (CRenderFish)mMapParam["BulletHitFish"], mScene, mAnimationName);
                mCSpriteFishNet.setScale(scale);
            }
            else
            {
                mStillSprite = mScene.getRenderObjectPool().newStillSprite();
                mStillSprite.setScale(scale);
                mStillSprite.playAnimation(pic_name);

#if UNITY_EDITOR
                mStillSprite.gameObject.name = "TkSpriteEffectFrameAnimation_" + pic_name;
#endif
            }

            EbVector3 v2 = (EbVector3)mMapParam["SourcePosition"];

            if (mCSpriteFishNet != null)
            {
                mCSpriteFishNet.setPosition(v2, 0);
                mCSpriteFishNet.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.FishNet));
            }
            if (mStillSprite != null)
            {
                mStillSprite.setPosition(v2);
                mStillSprite.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.FishNet));
            }
        }
Exemplo n.º 4
0
        //-------------------------------------------------------------------------
        void buildFrame(string pic_name, float scale, int vib_id)
        {
            mPicName = pic_name;
            vmVibId = vib_id;

            if ((vib_id == 1 || vib_id == 2 || vib_id == 3 || vib_id == 4) && mMapParam.ContainsKey("NetColor"))
            {
                mAnimationName = pic_name;
                mCSpriteFishNet = new CSpriteFishNet();
                Color color = (Color)mMapParam["NetColor"];
                uint et_player_rpcid = (uint)mMapParam["PlayerId"];
                mCSpriteFishNet.create(color, et_player_rpcid, (CRenderFish)mMapParam["BulletHitFish"], mScene, mAnimationName);
                mCSpriteFishNet.setScale(scale);
            }
            else
            {
                mStillSprite = mScene.getRenderObjectPool().newStillSprite();
                mStillSprite.setScale(scale);
                mStillSprite.playAnimation(pic_name);

            #if UNITY_EDITOR
                mStillSprite.gameObject.name = "TkSpriteEffectFrameAnimation_" + pic_name;
            #endif
            }

            EbVector3 v2 = (EbVector3)mMapParam["SourcePosition"];

            if (mCSpriteFishNet != null)
            {
                mCSpriteFishNet.setPosition(v2, 0);
                mCSpriteFishNet.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.FishNet));
            }
            if (mStillSprite != null)
            {
                mStillSprite.setPosition(v2);
                mStillSprite.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.FishNet));
            }
        }