コード例 #1
0
 //-------------------------------------------------------------------------
 public void shockScreen()
 {
     if (mShockBackgroundStillSprite == null)
     {
         return;
     }
     mShockBackgroundStillSprite.setActive(true);
     mSecondsSinceSwitchBackground = 0;
     mIsShockingScreen             = true;
 }
コード例 #2
0
 //-------------------------------------------------------------------------
 void _initRippleBackground()
 {
     mRippleBackgroundStillSprite = _loadRippleStillSprite();
     mRippleBackgroundStillSprite.setPosition(new EbVector3(-mScene.getSceneLength() / 2, -mScene.getSceneWidth() / 2, 0));
     mRippleBackgroundStillSprite.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.Wave));
     mRippleBackgroundStillSprite.setActive(false);
 }
コード例 #3
0
        //-------------------------------------------------------------------------
        void _updateFireAnimation(float elapsed_tm)
        {
            if (mIsFireAnimation)
            {
                mMassEntity.update(elapsed_tm);
                mTurretBarrelSprite.setPosition(mMassEntity.Position);
                mTurretBarrelSprite.setDirection(mMassEntity.Angle);

                if (!mMassEntity.IsEndRoute)
                {
                    return;
                }

                mIsFireAnimation = false;
                mTurretBlazeSprite.setActive(false);
            }
        }
コード例 #4
0
 void setActive(bool active)
 {
     foreach (var it in mRectangle)
     {
         it.setActive(active);
     }
     mArrow.setActive(active);
     mNumber.setActive(active);
 }
コード例 #5
0
        //-------------------------------------------------------------------------
        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
        }
コード例 #6
0
        //-------------------------------------------------------------------------
        public void switchBackgroundMap(int map_vibid, float already_update_time)
        {
            playSwitchAudio(EbDataMgr.Instance.getData <TbDataMap>(map_vibid).SwitchLevelAudioName);

            mLevelBackgroundMgr.onLoadMapEnd += resetNewBackground;

            mCurrentMapId = map_vibid;

            mLevelBackgroundMgr.switchBackground(EbDataMgr.Instance.getData <TbDataMap>(map_vibid).MapName, already_update_time);
            mRippleBackgroundStillSprite.setActive(true);
            mRippleBackgroundStillSprite.setPosition(new EbVector3(-mScene.getSceneLength() / 2, -mScene.getSceneWidth() / 2, 0));
        }
コード例 #7
0
ファイル: LevelBackgroundMgr.cs プロジェクト: yinlei/Fishing
        //-------------------------------------------------------------------------
        public LevelBackgroundMgr(CRenderScene scene, CSpriteBackgroundLoader loader)
        {
            mScene = scene;
            mBackgroundLoader = loader;

            mSpeed = 960f / mMaxTime;

            mWaveStillSprite = mScene.getRenderObjectPool().newStillSprite();
            mWaveStillSprite.playAnimation("WaterWave");
            mWaveStillSprite.setActive(false);
            mWaveStillSprite.setScale(700f / 550f);

            #if UNITY_EDITOR
            mWaveStillSprite.gameObject.name = "TkSpriteWaterWave";
            #endif
        }
コード例 #8
0
        //-------------------------------------------------------------------------
        public LevelBackgroundMgr(CRenderScene scene, CSpriteBackgroundLoader loader)
        {
            mScene            = scene;
            mBackgroundLoader = loader;

            mSpeed = 960f / mMaxTime;

            mWaveStillSprite = mScene.getRenderObjectPool().newStillSprite();
            mWaveStillSprite.playAnimation("WaterWave");
            mWaveStillSprite.setActive(false);
            mWaveStillSprite.setScale(700f / 550f);

#if UNITY_EDITOR
            mWaveStillSprite.gameObject.name = "TkSpriteWaterWave";
#endif
        }
コード例 #9
0
ファイル: CSpriteLevel.cs プロジェクト: yinlei/Fishing
 //-------------------------------------------------------------------------
 void _initRippleBackground()
 {
     mRippleBackgroundStillSprite = _loadRippleStillSprite();
     mRippleBackgroundStillSprite.setPosition(new EbVector3(-mScene.getSceneLength() / 2, -mScene.getSceneWidth() / 2, 0));
     mRippleBackgroundStillSprite.setLayer(mScene.getLayerAlloter().getLayer(_eLevelLayer.Wave));
     mRippleBackgroundStillSprite.setActive(false);
 }
コード例 #10
0
ファイル: LevelScreenShocker.cs プロジェクト: yinlei/Fishing
        //-------------------------------------------------------------------------
        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
        }