Java Code Examples for com.megacrit.cardcrawl.dungeons.AbstractDungeon#isScreenUp()
The following examples show how to use
com.megacrit.cardcrawl.dungeons.AbstractDungeon#isScreenUp() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractMemory.java From jorbs-spire-mod with MIT License | 6 votes |
public void render(SpriteBatch sb) { if (isRemembered || MemoryFtueTip.shouldFakeBeingRemembered(this)) { float rotation = (-rememberBgRotationTimer / REMEMBER_BG_ROTATION_DURATION) * 360F; RenderUtils.renderAtlasRegionCenteredAt(sb, REMEMBER_BG_IMG_64, centerX, centerY, Settings.scale, REMEMBER_BG_COLOR, rotation); } AtlasRegion img = isClarified || MemoryFtueTip.shouldFakeBeingClarified(this) ? this.staticInfo.CLARITY_IMG_48 : this.staticInfo.EMPTY_IMG_48; RenderUtils.renderAtlasRegionCenteredAt(sb, img, centerX, centerY, ICON_COLOR); for (AbstractGameEffect effect : renderEffects) { effect.render(sb, centerX, centerY); } hb.render(sb); if ((!AbstractDungeon.isScreenUp || PeekButton.isPeeking) && hb.hovered) { renderTip(); } SlayTheRelicsIntegration.renderTipHitbox(hb, getTips()); }
Example 2
Source File: BottledMemoryRelic.java From jorbs-spire-mod with MIT License | 6 votes |
@Override public void onEquip() { // follow same behavior as base game bottle relics. Maybe there's some mod that adds a bottle mechanic changing card using getPurgeableCards CardGroup rememberCards = CardUtils.getCardsForBottling(AbstractDungeon.player.masterDeck.getPurgeableCards()); rememberCards.group.removeIf(c -> !c.hasTag(REMEMBER_MEMORY)); if (rememberCards.size() > 0) { this.cardSelected = false; if (AbstractDungeon.isScreenUp) { AbstractDungeon.dynamicBanner.hide(); AbstractDungeon.overlayMenu.cancelButton.hide(); AbstractDungeon.previousScreen = AbstractDungeon.screen; } AbstractDungeon.getCurrRoom().phase = AbstractRoom.RoomPhase.INCOMPLETE; AbstractDungeon.gridSelectScreen.open(rememberCards, 1, this.DESCRIPTIONS[1] + this.name + LocalizedStrings.PERIOD, false, false, false, false); } }
Example 3
Source File: CampfireThirstEffect.java From jorbs-spire-mod with MIT License | 5 votes |
public void update() { if (!AbstractDungeon.isScreenUp) { this.duration -= Gdx.graphics.getDeltaTime(); this.updateBlackScreenColor(); } if (!AbstractDungeon.isScreenUp && !AbstractDungeon.gridSelectScreen.selectedCards.isEmpty()) { for (AbstractCard c : AbstractDungeon.gridSelectScreen.selectedCards) { int wrathStacks = WrathField.wrathEffectCount.get(c); int healAmount = wrathStacks * this.healPerWrathStack; int maxHPIncreaseAmount = wrathStacks * this.maxHPPerWrathStack; WrathField.wrathEffectCount.set(c, 0); AbstractDungeon.player.heal(healAmount); AbstractDungeon.player.increaseMaxHp(maxHPIncreaseAmount, true); AbstractDungeon.effectsQueue.add(new ShowCardBrieflyEffect(c.makeStatEquivalentCopy())); } AbstractDungeon.gridSelectScreen.selectedCards.clear(); ((RestRoom)AbstractDungeon.getCurrRoom()).fadeIn(); } if (this.duration < 1.0F && !this.openedScreen) { this.openedScreen = true; // Currently this is piggy backing off of the Toke / purge grid screen as its UX is close enough for a v1 // could probably stand to patch GridCardSelectScreen to make it a bit friendlier AbstractDungeon.gridSelectScreen.open(CampfireThirstPatch.getWrathCards(),1, TEXT[0], false, false, true, true); } if (this.duration < 0.0F) { this.isDone = true; if (CampfireUI.hidden) { AbstractRoom.waitTimer = 0.0F; AbstractDungeon.getCurrRoom().phase = AbstractRoom.RoomPhase.COMPLETE; ((RestRoom)AbstractDungeon.getCurrRoom()).cutFireSound(); } } }
Example 4
Source File: BottledPlaceholderRelic.java From StS-DefaultModBase with MIT License | 5 votes |
@Override public void onEquip() { // 1. When we acquire the relic cardSelected = false; // 2. Tell the relic that we haven't bottled the card yet if (AbstractDungeon.isScreenUp) { // 3. If the map is open - hide it. AbstractDungeon.dynamicBanner.hide(); AbstractDungeon.overlayMenu.cancelButton.hide(); AbstractDungeon.previousScreen = AbstractDungeon.screen; } AbstractDungeon.getCurrRoom().phase = AbstractRoom.RoomPhase.INCOMPLETE; // 4. Set the room to INCOMPLETE - don't allow us to use the map, etc. CardGroup group = CardGroup.getGroupWithoutBottledCards(AbstractDungeon.player.masterDeck); // 5. Get a card group of all currently unbottled cards AbstractDungeon.gridSelectScreen.open(group, 1, DESCRIPTIONS[3] + name + DESCRIPTIONS[2], false, false, false, false); // 6. Open the grid selection screen with the cards from the CardGroup we specified above. The description reads "Select a card to bottle for" + (relic name) + "." }