Ejemplo n.º 1
0
 //-------------------------------------------------------------------------
 public void shockScreen()
 {
     if (mShockBackgroundStillSprite == null)
     {
         return;
     }
     mShockBackgroundStillSprite.setActive(true);
     mSecondsSinceSwitchBackground = 0;
     mIsShockingScreen             = true;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
        }
    }
Ejemplo n.º 4
0
 void setActive(bool active)
 {
     foreach (var it in mRectangle)
     {
         it.setActive(active);
     }
     mArrow.setActive(active);
     mNumber.setActive(active);
 }
Ejemplo n.º 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
    }
Ejemplo n.º 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));
    }
Ejemplo n.º 7
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
    }