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