@Override protected void postInitialized() { super.postInitialized(); this.pcsPlayerSkinPreview = new PlayerCharacterSkin(); this.pcsPlayerSkinPreview.setScaleCenter(0, 0); this.pcsPlayerSkinPreview.setScale(9f); this.pcsPlayerSkinPreview.setX(EnvironmentVars.MAIN_CONTEXT.width() - 32f * 9f - 64f); this.pcsPlayerSkinPreview.setY( (EnvironmentVars.MAIN_CONTEXT.height() + Button.BUTTON_HEIGHT - 32f * 9f) / 2f); this.pcsPlayerSkinPreview.loadTextures(); this.directPlayerSkin(); this.sPlayerSkinGradient = new Sprite( this.pcsPlayerSkinPreview.getX() - 24f, this.pcsPlayerSkinPreview.getY() - 24f, MiscRegions.region_empty, EnvironmentVars.MAIN_CONTEXT.getVertexBufferObjectManager()); this.sPlayerSkinGradient.setScaleCenter(0, 0); this.sPlayerSkinGradient.setScale(32f * 9f + 48f); this.sPlayerSkinGradient.setColor(Color.WHITE); this.sPlayerSkinGradient.setShaderProgram(RadialGradientShaderProgram.getInstance()); super.afeContainer.attachChild(this.sPlayerSkinGradient); super.afeContainer.attachChild(this.pcsPlayerSkinPreview); this.sPlayerSkinGradient.setAlpha(0); this.pcsPlayerSkinPreview.setAlpha(0); this.initRotateChar(); this.initButtons(); super.tmButtonTouchManager.setComponents( this.bBack, this.bHair, this.bLegs, this.bSkin, this.bTorso); }
protected void showFirstWave() { if (this.rsRoundSystem.getStartRound() != 1) return; // @formatter:off this.sFirstWave = new Sprite( (EnvironmentVars.MAIN_CONTEXT.width() - HudRegions.region_wave_1[0].getWidth()) / 2f, (EnvironmentVars.MAIN_CONTEXT.height() - HudRegions.region_wave_1[0].getHeight()) / 2f, HudRegions.region_wave_1[0], EnvironmentVars.MAIN_CONTEXT.getVertexBufferObjectManager()); this.sFirstWave.setScale(4f); this.sFirstWaveSub = new Sprite( (EnvironmentVars.MAIN_CONTEXT.width() - HudRegions.region_wave_1[1].getWidth()) / 2f, this.sFirstWave.getY() + this.sFirstWave.getHeightScaled() + 4f, HudRegions.region_wave_1[1], EnvironmentVars.MAIN_CONTEXT.getVertexBufferObjectManager()) { @Override public void dispose() { ResourceManager.btWave1.unload(); super.dispose(); } }; this.sFirstWaveSub.setScale(1.5f); // @formatter:on final Music FIRST_WAVE_MUSIC = ResourceManager.mFirstWave; EnvironmentVars.MAIN_CONTEXT.registerSound(FIRST_WAVE_MUSIC); FIRST_WAVE_MUSIC.seekTo(0); FIRST_WAVE_MUSIC.play(); SessionScene.HUD.attachChild(SessionScene.this.sFirstWave); SessionScene.HUD.attachChild(SessionScene.this.sFirstWaveSub); ResourceManager.btWave1.load(); final DelayModifier DELAY_LIFETIME = new DelayModifier(3f) { @Override protected void onModifierFinished(IEntity pItem) { super.onModifierFinished(pItem); SessionScene.this.rsRoundSystem.start(); final FlashUpdateHandler FLASH = new FlashUpdateHandler(0.05f, 2); FLASH.runOnSwitch( new Runnable() { @Override public void run() { final boolean VISIBLE = SessionScene.this.sFirstWave.isVisible(); SessionScene.this.sFirstWave.setVisible(!VISIBLE); } }); FLASH.runOnFinish( new Runnable() { @Override public void run() { SessionScene.this.unregisterUpdateHandler(FLASH); SessionScene.this.sFirstWave.setVisible(true); EntityUtils.animateEntity( SessionScene.this.sFirstWave, 0.25f, EntityUtils.ANIMATION_JUMP_OUT_MEDIUM_INTESTIVITY, EaseLinear.getInstance(), EntityUtils.getDetachDisposeListener()); EntityUtils.animateEntity( SessionScene.this.sFirstWaveSub, 1f, EntityUtils.ANIMATION_FADE_OUT, EaseCubicInOut.getInstance(), EntityUtils.getDetachDisposeListener()); } }); SessionScene.this.registerUpdateHandler(FLASH); } }; DELAY_LIFETIME.setAutoUnregisterWhenFinished(true); this.registerEntityModifier(DELAY_LIFETIME); EntityUtils.animateEntity(this.sFirstWave, 1f, EntityUtils.ANIMATION_FADE_IN); EntityUtils.animateEntity(this.sFirstWaveSub, 1f, EntityUtils.ANIMATION_FADE_IN); }