From 74aac546784ab81ffe413ebe4217a53a9f70de8d Mon Sep 17 00:00:00 2001 From: hundun Date: Sun, 22 Oct 2023 19:11:24 +0800 Subject: [PATCH] update UI --- IdleMushroom-game/core/assets/cells.png | Bin 8908 -> 6976 bytes ...346\234\252\346\240\207\351\242\230-1.psd" | Bin 83753 -> 82831 bytes .../gdxgame/idledemo/IdleMushroomGame.java | 24 ++- .../idledemo/logic/DemoGameDictionary.java | 57 ++---- .../idledemo/logic/DemoSaveHandler.java | 4 +- .../EpochScaleOutputComponent.java | 36 ---- .../prototype/AutoProviderPrototype.java | 3 +- .../logic/prototype/AutoSellerPrototype.java | 6 +- .../logic/prototype/DirtPrototype.java | 20 +++ .../prototype/EpochCounterPrototype.java | 8 +- .../MainScreenConstructionControlBoard.java | 65 +++---- .../ui/main/MainScreenPopupInfoBoard.java | 43 +++++ .../idledemo/ui/main/OneEpochInfoAreaVM.java | 83 +++++++++ .../idledemo/ui/main/TwoEpochInfoAreaVM.java | 58 ++++++ .../idledemo/ui/screen/MainPlayScreen.java | 39 +--- .../idledemo/ui/screen/WorldPlayScreen.java | 39 ++-- .../ui/shared/BaseCellDetailNodeVM.java | 2 +- .../ui/shared/ConstructionDetailPartVM.java | 28 +-- .../ui/shared/ConstructionWikiVM.java | 50 ++++++ ...ilBoardVM.java => WorldDetailBoardVM.java} | 68 +++---- ...ailNode.java => WorldEmptyDetailNode.java} | 7 +- ...Node.java => WorldMushroomDetailNode.java} | 31 ++-- .../ui/world/WorldScreenPopupInfoBoard.java | 33 ++++ .../ui/world/WorldTreeDetailNode.java | 167 ++++++++++++++++++ .../starter/ui/component/PopupInfoBoard.java | 2 +- .../ui/screen/play/PlayScreenLayoutConst.java | 2 + .../construction/base/BaseConstruction.java | 4 +- .../construction/base/ExistenceComponent.java | 3 - .../construction/base/OutputComponent.java | 34 ++-- .../construction/base/UpgradeComponent.java | 4 - .../model/resource/ResourcePack.java | 3 +- 31 files changed, 652 insertions(+), 271 deletions(-) delete mode 100644 IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/construction/EpochScaleOutputComponent.java create mode 100644 IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/MainScreenPopupInfoBoard.java create mode 100644 IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/OneEpochInfoAreaVM.java create mode 100644 IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/TwoEpochInfoAreaVM.java create mode 100644 IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/ConstructionWikiVM.java rename IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/{WorldCellDetailBoardVM.java => WorldDetailBoardVM.java} (56%) rename IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/{WorldConstructionPrototypeCellDetailNode.java => WorldEmptyDetailNode.java} (97%) rename IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/{WorldConstructionInstanceCellDetailNode.java => WorldMushroomDetailNode.java} (81%) create mode 100644 IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldScreenPopupInfoBoard.java create mode 100644 IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldTreeDetailNode.java diff --git a/IdleMushroom-game/core/assets/cells.png b/IdleMushroom-game/core/assets/cells.png index f04d3727b1632b864803122741e8d95a48e9a12b..ddca8edefcc37a3c058f8f796653fb648da939c4 100644 GIT binary patch delta 4268 zcmZuzc{tSH_aFQAAvmx_iHMAakWYf=wAolANP2E-pOy?pAgNP zy_EV*<%SCOXd9TEBM&u)dhlhrcV;WO_E5#-AGLJQEavE*l(Q-x5U+v%fAdt-wtbD> zwI{`d$yl5>Chc@3)jL9A?wivSul(m_;N<~L?f)GbKnncq{eOLg>W{<<5F7fP&SMQj zFZd$~y0=)OC77-O9s?6!RnC$jgP0)KGdki9#*JPw8I~ z!y!J3rQa@+o1RJQc(x+^#93CsvMuWQp=g+=LmamO8g}<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6gqFKVQdm2fz|6MdN6p3MU)kzo>clS~(Q81gH2e_7l$GJ~Fpv z&ZqFWhFU~TUY&Q$0!*OjPr-B7S+-ks;YOo5voHT%He7;xmj#dP2!9^!JUPBhE&HqZ z=GS(wEB3Iad=s(YfQB~@ZdOT-SDg~1vf4EtpgTbhdCMK}oy7UZz3RhBcRWwdnV-U$ zQ?&vY@dMewNLZ4k)2H{ic2scir`OFpjyT(5U{I>iMZ&p@e21mfCt1XO_DPPx`jCc| zi>h-o(wvllav6fI9pTjh!OWkrfjNo3V)3UA{Au+LN*95I}^su3} zf9Ffs0=We8Opmc2tnD-|o}&N#=jS8$h%hBmg@K7sK=S(Ootu|z-maV%_nay0%gABD z*DEfk@Qts(#RZsQUw!!(vN!Cf8uX`)&)*E|c6xpg`tAr(y;7+>iR&^U9Ol9muJy;> z=?yw#DP1^_VgfC!uJm`<&p_v!P?|YHOv2!0-!sF<@z6NT7C}-Q z1<(6`e&(^MrFm(wt=}V0GW)%Xu!8ycp39PVO1zy1mWV!>AtlNC5pdDGmGgd~2_$s* zdEK|Xfmq)io8BA_*KhmMFe!g^$?k7$PlB6qR?AoZIOnLC0~ax)IR*n*{(f!GJ5Mdp zTv(y<+E|yR%kUcSw&Mk8CnQfzmBrX4UFZWTIxDEH=H!j+T0&l3nQG&#y#gUdcxfrDIv`Pr}k_!StAU9SiG9PZ!cdL6B0s@qkJ4GB5iG#&+YG$K>r|53qn{Jr#d*@lfpiUabOFu^;Yz-JjYym5?Tm* cM+5>X5LS{y*VFS%4Io|*)%DbBRO}=F2M35VNdN!< diff --git "a/IdleMushroom-game/core/assets/raw/\346\234\252\346\240\207\351\242\230-1.psd" "b/IdleMushroom-game/core/assets/raw/\346\234\252\346\240\207\351\242\230-1.psd" index 985fb0d2def71caf00e2435ebdb4f78df2c0a6cf..7d2c9e3f111947b06bb0b4f5154915c88711e991 100644 GIT binary patch delta 12757 zcmbVS349bq)~}kGBqZSoMvh20L|`HYMvg#WzzKu|6~`Hn4}*t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Sui-$wlAljJK<0?WKnMy0IeKPhs>Z`8$rvb-|7gh!7ZMA<#ou9FLwsPY-D# zVVqW5Lp~xB%#1+|RCkA2Gw5M*fb?Jt?@fYQu;F+{Cu;#ULcS*5@N5n2VBJxc5DmfV zE*!rLh1$I6ijspk2&WC8-7r2O1m=|p$T#F7#`}os);59NmjFNq_AEc892q3#e) z6f$Mr3_3D}A2;lQjv)CLTxtdR=QHS-0sJUqu$Qd7GlPyD#LqSMKvEAlNHn6H2XQ!O z4?|j*NSK#a9@A(9yhJfr>6n{OA^2x8H!O4(dU3;h7V{o{4l;`4jbThx3)A7;PbjAR q#!ANyIE6?Fdgu&`D4&C*I|WZVt+XtWbE(QgnT`jI?0r$DRQJDYiP^3I diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/IdleMushroomGame.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/IdleMushroomGame.java index df662ab..1e2e258 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/IdleMushroomGame.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/IdleMushroomGame.java @@ -33,7 +33,9 @@ public class IdleMushroomGame extends BaseIdleGame { epochConfigMap = JavaFeatureForGwt.mapOf( 1, RootEpochConfig.builder() .maxLevel(5) - .outputScale(1) + .build(), + 2, RootEpochConfig.builder() + .maxLevel(10) .constructionEpochConfigMap(JavaFeatureForGwt.mapOf( DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER, ConstructionEpochConfig.builder() @@ -49,23 +51,20 @@ public class IdleMushroomGame extends BaseIdleGame { .build() )) .build(), - 2, RootEpochConfig.builder() - .maxLevel(10) - .outputScale(2) - .constructionEpochConfigMap(JavaFeatureForGwt.mapOf( - DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER, - ConstructionEpochConfig.builder() - .transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER) - .build() - )) - .build(), 3, RootEpochConfig.builder() .maxLevel(15) - .outputScale(4) .constructionEpochConfigMap(JavaFeatureForGwt.mapOf( DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER, ConstructionEpochConfig.builder() .transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER) + .build(), + DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL, + ConstructionEpochConfig.builder() + .transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL) + .build(), + DemoConstructionPrototypeId.EPOCH_2_TREE, + ConstructionEpochConfig.builder() + .transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_3_TREE) .build() )) .build() @@ -133,7 +132,6 @@ protected void createStage3() { @Builder public static class RootEpochConfig { Integer maxLevel; - Integer outputScale; Map constructionEpochConfigMap; } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoGameDictionary.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoGameDictionary.java index ea37396..64598fb 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoGameDictionary.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoGameDictionary.java @@ -16,33 +16,27 @@ public class DemoGameDictionary implements IGameDictionary { public String constructionPrototypeIdToShowName(Language language, String constructionId) { switch (language) { - case CN: + default: switch (constructionId) { - case DemoConstructionPrototypeId.MAIN_MUSHROOM: - return "点击器"; - case DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: - return "高级自动点击器"; + case DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: + case DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: + case DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER: return "自动点击器"; + case DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL: + case DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL: + case DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL: + return "空地"; + case DemoConstructionPrototypeId.EPOCH_1_TREE: + return "灌木丛"; + case DemoConstructionPrototypeId.EPOCH_2_TREE: + return "树"; + case DemoConstructionPrototypeId.EPOCH_3_TREE: + return "森林"; case DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER: return "自动出售器"; case DemoConstructionPrototypeId.EPOCH_COUNTER: return "EPOCH_COUNTER"; - default: - return "口口"; - } - default: - switch (constructionId) { - case DemoConstructionPrototypeId.MAIN_MUSHROOM: - return "Clicker"; - case DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: - return "ComplexAutoClicker"; - case DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: - return "SimpleAutoClicker"; - case DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER: - return "AutoSeller"; - case DemoConstructionPrototypeId.EPOCH_COUNTER: - return "EPOCH_COUNTER"; default: return "[dic lost]"; } @@ -54,12 +48,14 @@ public String constructionPrototypeIdToShowName(Language language, String constr @Override public String constructionPrototypeIdToDetailDescriptionConstPart(Language language, String constructionId) { switch (language) { - case CN: + default: switch (constructionId) { - case DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: - return "EPOCH_2自动获得饼干"; case DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: return "EPOCH_1自动获得饼干"; + case DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: + return "EPOCH_2自动获得饼干"; + case DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER: + return "EPOCH_3自动获得饼干"; case DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER: return "自动出售饼干"; case DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL: @@ -69,21 +65,6 @@ public String constructionPrototypeIdToDetailDescriptionConstPart(Language langu default: return "[dic lost]"; } - default: - switch (constructionId) { - case DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: - return "EPOCH_2 Auto gain some cookie"; - case DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: - return "EPOCH_1 Auto gain some cookie"; - case DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER: - return "Auto sell some cookie"; - case DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL: - return "Empty"; - case DemoConstructionPrototypeId.EPOCH_COUNTER: - return "the EPOCH_COUNTER"; - default: - return "[dic lost]"; - } } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoSaveHandler.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoSaveHandler.java index 9cd53b9..99b7301 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoSaveHandler.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoSaveHandler.java @@ -63,8 +63,8 @@ protected RootSaveData genereateStarterRootSaveData() { DemoConstructionPrototypeId.EPOCH_COUNTER + "_" + SINGLETON, ConstructionSaveData.builder() .prototypeId(DemoConstructionPrototypeId.EPOCH_COUNTER) - .level(0) - .workingLevel(0) + .level(1) + .workingLevel(1) .position(uselessPosition) .build() ); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/construction/EpochScaleOutputComponent.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/construction/EpochScaleOutputComponent.java deleted file mode 100644 index 428e7f7..0000000 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/construction/EpochScaleOutputComponent.java +++ /dev/null @@ -1,36 +0,0 @@ -package hundun.gdxgame.idledemo.logic.construction; - -import hundun.gdxgame.idledemo.IdleMushroomGame; -import hundun.gdxgame.idledemo.IdleMushroomGame.ConstructionEpochConfig; -import hundun.gdxgame.idledemo.IdleMushroomGame.RootEpochConfig; -import hundun.gdxgame.idledemo.logic.DemoConstructionPrototypeId; -import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; -import hundun.gdxgame.idleshare.gamelib.framework.model.construction.starter.BaseAutoOutputComponent; - -public class EpochScaleOutputComponent extends BaseAutoOutputComponent { - - public EpochScaleOutputComponent(BaseConstruction construction) { - super(construction); - } - - @Override - public long calculateModifiedOutputGain(long baseValue, int level, int proficiency) { - RootEpochConfig config = construction.getGameplayContext().getConstructionManager() - .getSingletonConstructionInstancesOrEmpty() - .stream() - .filter(it -> it.getPrototypeId().equals(DemoConstructionPrototypeId.EPOCH_COUNTER)) - .findAny() - .map(epochCounter -> IdleMushroomGame.epochConfigMap.get(epochCounter.getSaveData().getLevel())) - .orElse(null); - if (config == null || config.getOutputScale() == null) { - return (long)(baseValue * level); - } else { - return (long)(baseValue * level * config.getOutputScale()); - } - } - - @Override - public long calculateModifiedOutputCost(long baseValue, int level, int proficiency) { - return (long)((baseValue * level)); - } -} diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/AutoProviderPrototype.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/AutoProviderPrototype.java index 44405c8..035c326 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/AutoProviderPrototype.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/AutoProviderPrototype.java @@ -8,7 +8,6 @@ import hundun.gdxgame.idledemo.logic.ResourceType; import hundun.gdxgame.idledemo.logic.construction.BaseIdleDemoConstruction; import hundun.gdxgame.idledemo.logic.construction.DemoSimpleAutoOutputComponent; -import hundun.gdxgame.idledemo.logic.construction.EpochScaleOutputComponent; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.AbstractConstructionPrototype; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.DescriptionPackage; @@ -74,7 +73,7 @@ public BaseConstruction getInstance(GridPosition position) { AutoProviderProficiencyComponent proficiencyComponent = new AutoProviderProficiencyComponent(construction); construction.setProficiencyComponent(proficiencyComponent); - EpochScaleOutputComponent outputComponent = new EpochScaleOutputComponent(construction); + DemoSimpleAutoOutputComponent outputComponent = new DemoSimpleAutoOutputComponent(construction); construction.setOutputComponent(outputComponent); construction.getOutputComponent().setOutputCostPack(DemoBuiltinConstructionsLoader.toPack(new HashMap<>())); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/AutoSellerPrototype.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/AutoSellerPrototype.java index 989760d..417d47c 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/AutoSellerPrototype.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/AutoSellerPrototype.java @@ -20,7 +20,7 @@ public class AutoSellerPrototype extends AbstractConstructionPrototype { public static DescriptionPackage descriptionPackageEN = DescriptionPackage.builder() .upgradeButtonText("Upgrade") - .outputCostDescriptionStart("USELESS") + .outputCostDescriptionStart("Cost") .outputGainDescriptionStart("Produce") .upgradeCostDescriptionStart("Upgrade cost") .upgradeMaxLevelDescription("(max)") @@ -31,8 +31,8 @@ public class AutoSellerPrototype extends AbstractConstructionPrototype { public static DescriptionPackage descriptionPackageCN = DescriptionPackage.builder() .upgradeButtonText("升级") - .outputCostDescriptionStart("USELESS") - .outputGainDescriptionStart("自动产出") + .outputCostDescriptionStart("消耗") + .outputGainDescriptionStart("产出") .upgradeCostDescriptionStart("升级费用") .upgradeMaxLevelDescription("(已达到最大等级)") .levelDescriptionProvider(DescriptionPackageFactory.WORKING_LEVEL_IMP) diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/DirtPrototype.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/DirtPrototype.java index 2d3fe21..4a7375e 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/DirtPrototype.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/DirtPrototype.java @@ -70,6 +70,26 @@ public BaseConstruction getInstance(GridPosition position) { .build() )); break; + case DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL: + thiz.getExistenceComponent().setBuyCandidateConfigs(JavaFeatureForGwt.listOf( + ConstructionBuyCandidateConfig.builder() + .prototypeId(DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER) + .buyCostPack(DemoBuiltinConstructionsLoader.toPack(JavaFeatureForGwt.mapOf( + ResourceType.MUSHROOM, 50 + ))) + .build() + )); + break; + case DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL: + thiz.getExistenceComponent().setBuyCandidateConfigs(JavaFeatureForGwt.listOf( + ConstructionBuyCandidateConfig.builder() + .prototypeId(DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER) + .buyCostPack(DemoBuiltinConstructionsLoader.toPack(JavaFeatureForGwt.mapOf( + ResourceType.MUSHROOM, 50 + ))) + .build() + )); + break; default: } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/EpochCounterPrototype.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/EpochCounterPrototype.java index b5d6e30..d5a2904 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/EpochCounterPrototype.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/EpochCounterPrototype.java @@ -68,17 +68,17 @@ public BaseConstruction getInstance(GridPosition position) { ))); thiz.getUpgradeComponent().setCalculateCostFunction((baseValue, level) -> { switch (level) { - case 0: - return 50L; case 1: - return 100L; + return 50L; case 2: + return 100L; + case 3: return 150L; default: return 1L; } }); - thiz.getLevelComponent().maxLevel = 2; + thiz.getLevelComponent().maxLevel = 3; return thiz; } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/MainScreenConstructionControlBoard.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/MainScreenConstructionControlBoard.java index 8a28fc6..7aebc05 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/MainScreenConstructionControlBoard.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/MainScreenConstructionControlBoard.java @@ -25,6 +25,7 @@ import hundun.gdxgame.idleshare.gamelib.framework.callback.ISecondaryInfoBoardCallback; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.UpgradeComponent.UpgradeState; +import hundun.gdxgame.idleshare.gamelib.framework.model.grid.GridPosition; import java.util.List; import java.util.stream.Collectors; @@ -43,7 +44,7 @@ public class MainScreenConstructionControlBoard extends Table protected SellerPart sellerPart; protected EpochPart epochPart; - protected ConstructionDetailPartVM epochDetailPart; + public MainScreenConstructionControlBoard(MainPlayScreen parent, ISecondaryInfoBoardCallback callback) { this.parent = parent; this.callback = callback; @@ -85,21 +86,17 @@ public void onConstructionCollectionChange() { this.epochPart = new EpochPart(parent, callback); this.add(epochPart).spaceRight(10).expand(); - this.epochDetailPart = new ConstructionDetailPartVM(parent); - this.add(epochDetailPart).spaceRight(10).expand(); - BaseConstruction sellerConstruction = singletonConstructions.stream() .filter(it -> it.getPrototypeId().equals(DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER)) .findAny() .orElse(null); - this.sellerPart.updateAsConstruction(sellerConstruction); + this.sellerPart.updateForNewConstruction(sellerConstruction, null); BaseConstruction epochConstruction = singletonConstructions.stream() .filter(it -> it.getPrototypeId().equals(DemoConstructionPrototypeId.EPOCH_COUNTER)) .findAny() .orElse(null); - this.epochPart.updateAsConstruction(epochConstruction); - this.epochDetailPart.rebuildCells(epochConstruction); + this.epochPart.updateForNewConstruction(epochConstruction, null); parent.getGame().getFrontend().log("ConstructionInfoBorad", "Constructions change to: " + singletonConstructions.stream().map(BaseConstruction::getName).collect(Collectors.joining(",")) @@ -116,6 +113,8 @@ public static class EpochPart extends BaseCellDetailNodeVM { TextButton upgradeButton; + Table leftPart; + protected ConstructionDetailPartVM epochDetailPart; public EpochPart( @@ -129,6 +128,9 @@ public EpochPart( int CHILD_HEIGHT = playScreenLayoutConst.CONSTRUCION_CHILD_BUTTON_HEIGHT; int NAME_CHILD_HEIGHT = playScreenLayoutConst.CONSTRUCION_CHILD_NAME_HEIGHT; + this.leftPart = new Table(); + this.epochDetailPart = new ConstructionDetailPartVM(parent); + this.constructionNameLabel = new Label("", parent.getGame().getMainSkin()); constructionNameLabel.setWrap(true); @@ -152,10 +154,14 @@ public void changed(ChangeEvent event, Actor actor) { questionMarkArea.addListener(new StarterSecondaryInfoBoardCallerClickListener(() -> model, parent)); // ------ this ------ - this.add(constructionNameLabel).size(CHILD_WIDTH, NAME_CHILD_HEIGHT).row(); - this.add(questionMarkArea).height(CHILD_HEIGHT).row(); - this.add(upgradeButton).size(CHILD_WIDTH, CHILD_HEIGHT).row(); - this.add(workingLevelLabel).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + leftPart.add(constructionNameLabel).size(CHILD_WIDTH, NAME_CHILD_HEIGHT).row(); + leftPart.add(questionMarkArea).height(CHILD_HEIGHT).row(); + leftPart.add(upgradeButton).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + leftPart.add(workingLevelLabel).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + + this.add(leftPart); + this.add(epochDetailPart); + this.setBackground(DrawableFactory.createBorderBoard(30, 10, 0.8f, 1)); } @@ -196,8 +202,10 @@ private void update() { } - public void updateAsConstruction(BaseConstruction construction) { + @Override + public void updateForNewConstruction(BaseConstruction construction, GridPosition position) { this.model = construction; + this.epochDetailPart.rebuildCells(construction); update(); } @@ -216,10 +224,10 @@ public static class SellerPart extends BaseCellDetailNodeVM { Label workingLevelLabel; TextButton upgradeButton; - TextButton transformButton; Table changeWorkingLevelGroup; + Table leftPart; Table detailGroup; @@ -234,6 +242,8 @@ public SellerPart( int CHILD_HEIGHT = playScreenLayoutConst.CONSTRUCION_CHILD_BUTTON_HEIGHT; int NAME_CHILD_HEIGHT = playScreenLayoutConst.CONSTRUCION_CHILD_NAME_HEIGHT; + leftPart = new Table(); + this.constructionNameLabel = new Label("", parent.getGame().getMainSkin()); constructionNameLabel.setWrap(true); @@ -275,20 +285,20 @@ public void clicked(InputEvent event, float x, float y) { detailGroup = new Table(); - this.transformButton = new TextButton("-", parent.getGame().getMainSkin()); - Container questionMarkArea = new Container<>(new Image(parent.getGame().getIdleMushroomTextureManager().getQuestionMarkTexture())); questionMarkArea.setBackground(parent.getGame().getIdleMushroomTextureManager().getDefaultBoardNinePatchDrawable()); questionMarkArea.setTouchable(Touchable.enabled); questionMarkArea.addListener(new StarterSecondaryInfoBoardCallerClickListener(() -> model, parent)); // ------ this ------ - this.add(constructionNameLabel).size(CHILD_WIDTH, NAME_CHILD_HEIGHT).row(); - this.add(questionMarkArea).height(CHILD_HEIGHT).row(); - this.add(upgradeButton).size(CHILD_WIDTH, CHILD_HEIGHT).row(); - this.add(workingLevelLabel).size(CHILD_WIDTH, CHILD_HEIGHT).row(); - this.add(changeWorkingLevelGroup).size(CHILD_WIDTH, CHILD_HEIGHT).row(); - this.add(detailGroup).row(); + leftPart.add(constructionNameLabel).size(CHILD_WIDTH, NAME_CHILD_HEIGHT).row(); + leftPart.add(questionMarkArea).height(CHILD_HEIGHT).row(); + leftPart.add(upgradeButton).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + leftPart.add(workingLevelLabel).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + leftPart.add(changeWorkingLevelGroup).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + + this.add(leftPart); + this.add(detailGroup); this.setBackground(DrawableFactory.createBorderBoard(30, 10, 0.8f, 1)); } @@ -335,16 +345,6 @@ private void update() { upgradeButton.setDisabled(true); upgradeButton.getLabel().setColor(Color.RED); } - if (model.getUpgradeComponent().canTransfer()) - { - transformButton.setDisabled(false); - transformButton.getLabel().setColor(Color.WHITE); - } - else - { - transformButton.setDisabled(true); - transformButton.getLabel().setColor(Color.RED); - } boolean canUpWorkingLevel = model.getLevelComponent().canChangeWorkingLevel(1); if (canUpWorkingLevel) { @@ -369,7 +369,8 @@ private void update() { } - public void updateAsConstruction(BaseConstruction construction) { + @Override + public void updateForNewConstruction(BaseConstruction construction, GridPosition position) { this.model = construction; if (construction != null) { if (construction.getLevelComponent().isTypeWorkingLevelChangeable()) { diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/MainScreenPopupInfoBoard.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/MainScreenPopupInfoBoard.java new file mode 100644 index 0000000..9c22753 --- /dev/null +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/MainScreenPopupInfoBoard.java @@ -0,0 +1,43 @@ +package hundun.gdxgame.idledemo.ui.main; + +import com.badlogic.gdx.scenes.scene2d.Touchable; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import hundun.gdxgame.idledemo.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idledemo.ui.screen.MainPlayScreen; +import hundun.gdxgame.idledemo.ui.shared.ConstructionDetailPartVM; +import hundun.gdxgame.idledemo.ui.shared.ConstructionWikiVM; +import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; + +public class MainScreenPopupInfoBoard extends Table { + + MainPlayScreen parent; + TwoEpochInfoAreaVM twoEpochInfoAreaVM; + ConstructionWikiVM constructionDetailPartVM; + public MainScreenPopupInfoBoard(MainPlayScreen parent) { + //super("GUIDE_TEXT", parent.game.getButtonSkin()); + this.parent = parent; + //this.setBounds(5, GameAreaControlBoard.Y, GameAreaControlBoard.X - 10, 120); + this.setTouchable(Touchable.disabled); + this.setBackground(parent.getLayoutConst().simpleBoardBackground); + this.setVisible(false); + + this.twoEpochInfoAreaVM = new TwoEpochInfoAreaVM(parent); + this.constructionDetailPartVM = new ConstructionWikiVM(parent); + } + + public void update(BaseConstruction construction) { + this.clearChildren(); + if (construction.getPrototypeId().equals(DemoConstructionPrototypeId.EPOCH_COUNTER)) { + this.add(twoEpochInfoAreaVM) + .size(parent.getLayoutConst().popupInfoBoardWidth, parent.getLayoutConst().popupInfoBoardHeight); + twoEpochInfoAreaVM.rebuildCells(construction); + } else { + this.add(constructionDetailPartVM) + .size(parent.getLayoutConst().popupInfoBoardWidth, parent.getLayoutConst().popupInfoBoardHeight); + constructionDetailPartVM.rebuildCells(construction); + } + } + + + +} diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/OneEpochInfoAreaVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/OneEpochInfoAreaVM.java new file mode 100644 index 0000000..17f9179 --- /dev/null +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/OneEpochInfoAreaVM.java @@ -0,0 +1,83 @@ +package hundun.gdxgame.idledemo.ui.main; + +import com.badlogic.gdx.scenes.scene2d.ui.*; +import com.badlogic.gdx.utils.Align; +import com.badlogic.gdx.utils.Null; +import hundun.gdxgame.corelib.base.util.DrawableFactory; +import hundun.gdxgame.idledemo.IdleMushroomGame.RootEpochConfig; +import hundun.gdxgame.idledemo.ui.screen.MainPlayScreen; +import hundun.gdxgame.idleshare.core.starter.ui.screen.play.PlayScreenLayoutConst; +import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; + +public class OneEpochInfoAreaVM extends Table { + + MainPlayScreen parent; + BaseConstruction epochCounterConstruction; + @Null + RootEpochConfig epochConfig; + int epochLevel; + Label epochInfoLabel; + Label maxLevelLabel; + + + public OneEpochInfoAreaVM( + MainPlayScreen parent + ) { + super(); + final PlayScreenLayoutConst playScreenLayoutConst = parent.getLayoutConst(); + this.parent = parent; + + int CHILD_WIDTH = playScreenLayoutConst.SELLER_PART_CHILD_WIDTH; + int CHILD_HEIGHT = playScreenLayoutConst.CONSTRUCION_CHILD_BUTTON_HEIGHT; + int NAME_CHILD_HEIGHT = playScreenLayoutConst.CONSTRUCION_CHILD_NAME_HEIGHT; + + // ------ changeWorkingLevelGroup ------ + + + this.epochInfoLabel = new Label("", parent.getGame().getMainSkin()); + epochInfoLabel.setAlignment(Align.center); + this.maxLevelLabel = new Label("", parent.getGame().getMainSkin()); + maxLevelLabel.setAlignment(Align.center); + + // ------ this ------ + this.add(epochInfoLabel).row(); + this.add(maxLevelLabel).row(); + + this.setBackground(DrawableFactory.createBorderBoard(30, 10, 0.8f, 1)); + } + + private void update() { + // ------ update show-state ------ + if (epochCounterConstruction == null) { + setVisible(false); + //textButton.setVisible(false); + //Gdx.app.log("ConstructionView", this.hashCode() + " no model"); + return; + } else { + setVisible(true); + //textButton.setVisible(true); + //Gdx.app.log("ConstructionView", model.getName() + " set to its view"); + } + + + + // ------ update text ------ + if (epochConfig != null) { + epochInfoLabel.setText("时期:" + epochLevel); + maxLevelLabel.setText("蘑菇等级上限:" + epochConfig.getMaxLevel()); + } else { + epochInfoLabel.setText("时期:max"); + maxLevelLabel.setText(""); + } + + + } + + + public void updateAsConstruction(@Null RootEpochConfig epochConfig, BaseConstruction epochCounterConstruction, int epochLevel) { + this.epochCounterConstruction = epochCounterConstruction; + this.epochConfig = epochConfig; + this.epochLevel = epochLevel; + update(); + } +} diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/TwoEpochInfoAreaVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/TwoEpochInfoAreaVM.java new file mode 100644 index 0000000..868ec16 --- /dev/null +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/main/TwoEpochInfoAreaVM.java @@ -0,0 +1,58 @@ +package hundun.gdxgame.idledemo.ui.main; + +import com.badlogic.gdx.scenes.scene2d.Actor; +import com.badlogic.gdx.scenes.scene2d.ui.Container; +import com.badlogic.gdx.scenes.scene2d.ui.Label; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup; +import hundun.gdxgame.idledemo.IdleMushroomGame; +import hundun.gdxgame.idledemo.IdleMushroomGame.RootEpochConfig; +import hundun.gdxgame.idledemo.ui.screen.MainPlayScreen; +import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; + +public class TwoEpochInfoAreaVM extends Table { + + MainPlayScreen parent; + Label titleLabel; + OneEpochInfoAreaVM currentLevelInfoAreaVM; + OneEpochInfoAreaVM nextLevelInfoAreaVM; + + VerticalGroup midPart; + public TwoEpochInfoAreaVM(MainPlayScreen parent) { + //super("GUIDE_TEXT", parent.game.getButtonSkin()); + this.parent = parent; + //this.setBounds(5, GameAreaControlBoard.Y, GameAreaControlBoard.X - 10, 120); + + this.titleLabel = new Label("", parent.getGame().getMainSkin()); + this.add(titleLabel).colspan(3).row(); + + + this.currentLevelInfoAreaVM = new OneEpochInfoAreaVM(parent); + this.add(currentLevelInfoAreaVM); + this.midPart = new VerticalGroup(); + this.add(midPart).padLeft(50).padRight(50); + this.nextLevelInfoAreaVM = new OneEpochInfoAreaVM(parent); + this.add(nextLevelInfoAreaVM); + } + + public void rebuildCells(BaseConstruction epochCounterConstruction) { + int currentEpochLevel = epochCounterConstruction.getSaveData().getLevel(); + RootEpochConfig epochConfig = IdleMushroomGame.epochConfigMap.get(currentEpochLevel); + int nextEpochLevel = currentEpochLevel + 1; + RootEpochConfig nextEpochConfig = IdleMushroomGame.epochConfigMap.get(nextEpochLevel); + titleLabel.setText(epochCounterConstruction.getDetailDescriptionConstPart()); + currentLevelInfoAreaVM.updateAsConstruction(epochConfig, epochCounterConstruction, currentEpochLevel); + midPart.clearChildren(); + if (nextEpochConfig != null) { + midPart.addActor(new Label("-->", parent.getGame().getMainSkin())); + nextLevelInfoAreaVM.updateAsConstruction(nextEpochConfig, epochCounterConstruction, nextEpochLevel); + }else { + midPart.addActor(new Label("max", parent.getGame().getMainSkin())); + nextLevelInfoAreaVM.setVisible(false); + } + + } + + + +} diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/screen/MainPlayScreen.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/screen/MainPlayScreen.java index 3ba88d2..5452f8c 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/screen/MainPlayScreen.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/screen/MainPlayScreen.java @@ -2,16 +2,14 @@ import com.badlogic.gdx.InputProcessor; import com.badlogic.gdx.graphics.g2d.SpriteBatch; -import com.badlogic.gdx.scenes.scene2d.Touchable; import com.badlogic.gdx.scenes.scene2d.ui.Image; -import com.badlogic.gdx.scenes.scene2d.ui.Label; -import com.badlogic.gdx.scenes.scene2d.ui.Table; import hundun.gdxgame.idledemo.IdleMushroomGame; import hundun.gdxgame.idledemo.logic.DemoScreenId; import hundun.gdxgame.idledemo.logic.ResourceType; import hundun.gdxgame.idledemo.logic.RootSaveData; import hundun.gdxgame.idledemo.ui.main.MainScreenConstructionControlBoard; +import hundun.gdxgame.idledemo.ui.main.MainScreenPopupInfoBoard; import hundun.gdxgame.idledemo.ui.world.HexCellVM; import hundun.gdxgame.idledemo.ui.main.GameEntityFactory; import hundun.gdxgame.idleshare.core.framework.model.manager.GameEntityManager; @@ -35,37 +33,6 @@ public MainPlayScreen(IdleMushroomGame game) { super(game, DemoScreenId.SCREEN_MAIN); } - public static class MainScreenPopupInfoBoard extends Table { - - MainPlayScreen parent; - - public MainScreenPopupInfoBoard(MainPlayScreen parent) { - //super("GUIDE_TEXT", parent.game.getButtonSkin()); - this.parent = parent; - //this.setBounds(5, GameAreaControlBoard.Y, GameAreaControlBoard.X - 10, 120); - this.setTouchable(Touchable.disabled); - this.setBackground(parent.getLayoutConst().simpleBoardBackground); - this.setVisible(false); - } - - - private void rebuildCells(BaseConstruction model) { - this.clearChildren(); - - add(new Label(model.getDetailDescroptionConstPart(), parent.getGame().getMainSkin())) - .colspan(3) - .left() - .row(); - - } - - public void update(BaseConstruction model) { - rebuildCells(model); - } - - - } - @Override protected void lazyInitUiRootContext() { super.lazyInitUiRootContext(); @@ -137,9 +104,7 @@ protected void lazyInitBackUiAndPopupUiContent() { super.lazyInitBackUiAndPopupUiContent(); this.secondaryInfoBoard = new MainScreenPopupInfoBoard(this); - popupRootTable.add(secondaryInfoBoard).bottom().expand().row(); - popupRootTable.add(new Image()) - .height(layoutConst.CONSTRUCION_BOARD_ROOT_BOX_HEIGHT); + popupRootTable.add(secondaryInfoBoard).center().expand(); } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/screen/WorldPlayScreen.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/screen/WorldPlayScreen.java index 8922f15..31612ae 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/screen/WorldPlayScreen.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/screen/WorldPlayScreen.java @@ -13,9 +13,11 @@ import hundun.gdxgame.idledemo.logic.ResourceType; import hundun.gdxgame.idledemo.ui.world.HexCellVM; import hundun.gdxgame.idledemo.ui.world.HexAreaVM; -import hundun.gdxgame.idledemo.ui.world.WorldCellDetailBoardVM; +import hundun.gdxgame.idledemo.ui.world.WorldDetailBoardVM; +import hundun.gdxgame.idledemo.ui.world.WorldScreenPopupInfoBoard; import hundun.gdxgame.idleshare.core.framework.model.CameraDataPackage; import hundun.gdxgame.idleshare.gamelib.framework.callback.IConstructionCollectionListener; +import hundun.gdxgame.idleshare.gamelib.framework.callback.ISecondaryInfoBoardCallback; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; import lombok.Getter; @@ -25,13 +27,13 @@ * @author hundun * Created on 2021/11/02 */ -public class WorldPlayScreen extends BaseDemoPlayScreen implements IConstructionCollectionListener { +public class WorldPlayScreen extends BaseDemoPlayScreen implements IConstructionCollectionListener, ISecondaryInfoBoardCallback { HexAreaVM hexAreaVM; protected OrthographicCamera deskCamera; protected Stage deskStage; - - protected WorldCellDetailBoardVM worldCellDetailBoardVM; + protected WorldScreenPopupInfoBoard secondaryInfoBoard; + protected WorldDetailBoardVM worldDetailBoardVM; @Getter private boolean disableHexAreaInput; @@ -47,8 +49,8 @@ public WorldPlayScreen(IdleMushroomGame game) { protected void lazyInitUiRootContext() { super.lazyInitUiRootContext(); - worldCellDetailBoardVM = new WorldCellDetailBoardVM(this); - worldCellDetailBoardVM.addListener(new ClickListener() { + worldDetailBoardVM = new WorldDetailBoardVM(this); + worldDetailBoardVM.addListener(new ClickListener() { @Override public void enter(InputEvent event, float x, float y, int pointer, Actor fromActor) { super.enter(event, x, y, pointer, fromActor); @@ -60,7 +62,7 @@ public void exit(InputEvent event, float x, float y, int pointer, Actor toActor) disableHexAreaInput = false; } }); - uiRootTable.add(worldCellDetailBoardVM) + uiRootTable.add(worldDetailBoardVM) .height(layoutConst.CONSTRUCION_BOARD_ROOT_BOX_HEIGHT) .fill() .colspan(UI_ROOT_TABLE_COLSPAN_SIZE) @@ -72,8 +74,11 @@ protected void lazyInitLogicContext() { storageInfoTable.lazyInit(ResourceType.VALUES_FOR_SHOW_ORDER); - logicFrameListeners.add(worldCellDetailBoardVM); - this.getGame().getIdleGameplayExport().getGameplayContext().getEventManager().registerListener(worldCellDetailBoardVM); + this.secondaryInfoBoard = new WorldScreenPopupInfoBoard(this); + popupRootTable.add(secondaryInfoBoard).center().expand(); + + logicFrameListeners.add(worldDetailBoardVM); + this.getGame().getIdleGameplayExport().getGameplayContext().getEventManager().registerListener(worldDetailBoardVM); } @Override @@ -91,7 +96,7 @@ protected void updateUIForShow() { List constructions = game.getIdleGameplayExport().getGameplayContext().getConstructionManager() .getWorldConstructionInstances(); hexAreaVM.updateUIForShow(constructions); - worldCellDetailBoardVM.selectCell(null); + worldDetailBoardVM.selectCell(null); } @Override @@ -122,7 +127,7 @@ protected InputProcessor provideDefaultInputProcessor() { @Override public void onCellClicked(HexCellVM vm) { - worldCellDetailBoardVM.selectCell(vm != null ? vm.getDeskData() : null); + worldDetailBoardVM.selectCell(vm != null ? vm.getDeskData() : null); hexAreaVM.selectCell(vm != null ? vm.getDeskData() : null); } @@ -132,4 +137,16 @@ public void onConstructionCollectionChange() { .getWorldConstructionInstances(); hexAreaVM.updateUIForConstructionCollectionChange(constructions); } + + @Override + public void showAndUpdateGuideInfo(BaseConstruction model) { + secondaryInfoBoard.setVisible(true); + secondaryInfoBoard.update(model); + } + + @Override + public void hideAndCleanGuideInfo() { + secondaryInfoBoard.setVisible(false); + //popUpInfoBoard.setText("GUIDE_TEXT"); + } } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/BaseCellDetailNodeVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/BaseCellDetailNodeVM.java index f498f16..6abc940 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/BaseCellDetailNodeVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/BaseCellDetailNodeVM.java @@ -10,5 +10,5 @@ public abstract class BaseCellDetailNodeVM extends Table { public abstract void subLogicFrame(); - + public abstract void updateForNewConstruction(BaseConstruction construction, GridPosition position); } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/ConstructionDetailPartVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/ConstructionDetailPartVM.java index 9b1d98c..d19224e 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/ConstructionDetailPartVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/ConstructionDetailPartVM.java @@ -45,11 +45,6 @@ public void rebuildCells(@Null BaseConstruction newModel) { this.clearChildren(); - add(wapperContainer(new Label(model.getDetailDescroptionConstPart(), parent.getGame().getMainSkin()))) - .colspan(3) - .left() - .row(); - resourcePackAsActor(model.getOutputComponent().getOutputCostPack(), this, parent); resourcePackAsActor(model.getOutputComponent().getOutputGainPack(), this, parent); @@ -69,15 +64,22 @@ public void rebuildCells(@Null BaseConstruction newModel) { } public static void resourcePackAsActor(ResourcePack pack, Table target, BaseDemoPlayScreen parent) { - if (pack != null && pack.getModifiedValues() != null) { - List pairsToActors = pairsToActors(pack.getModifiedValues(), parent.getGame()); - target.add(wapperContainer(new Label(pack.getDescriptionStart(), parent.getGame().getMainSkin()))); - for (Actor actor : pairsToActors) { - target.add(wapperContainer(actor)) - .height(parent.getLayoutConst().RESOURCE_AMOUNT_PAIR_NODE_HEIGHT) - .width(parent.getLayoutConst().RESOURCE_AMOUNT_PAIR_NODE_WIDTH); + resourcePackAsActor(pack, target, parent, false); + } + + public static void resourcePackAsActor(ResourcePack pack, Table target, BaseDemoPlayScreen parent, boolean isPreviewNextLevel) { + if (pack != null) { + List targetValue = isPreviewNextLevel ? pack.getPreviewNextLevelModifiedValues() : pack.getModifiedValues(); + if (targetValue != null) { + List pairsToActors = pairsToActors(targetValue, parent.getGame()); + target.add(wapperContainer(new Label(pack.getDescriptionStart(), parent.getGame().getMainSkin()))); + for (Actor actor : pairsToActors) { + target.add(wapperContainer(actor)) + .height(parent.getLayoutConst().RESOURCE_AMOUNT_PAIR_NODE_HEIGHT) + .width(parent.getLayoutConst().RESOURCE_AMOUNT_PAIR_NODE_WIDTH); + } + target.row(); } - target.row(); } } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/ConstructionWikiVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/ConstructionWikiVM.java new file mode 100644 index 0000000..82c2ca9 --- /dev/null +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/shared/ConstructionWikiVM.java @@ -0,0 +1,50 @@ +package hundun.gdxgame.idledemo.ui.shared; + +import com.badlogic.gdx.scenes.scene2d.Actor; +import com.badlogic.gdx.scenes.scene2d.Touchable; +import com.badlogic.gdx.scenes.scene2d.ui.Container; +import com.badlogic.gdx.scenes.scene2d.ui.Label; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import com.badlogic.gdx.utils.Null; +import hundun.gdxgame.idledemo.IdleMushroomGame; +import hundun.gdxgame.idledemo.ui.screen.BaseDemoPlayScreen; +import hundun.gdxgame.idleshare.core.starter.ui.component.ResourceAmountPairNode; +import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; +import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.UpgradeComponent.UpgradeState; +import hundun.gdxgame.idleshare.gamelib.framework.model.resource.ResourcePack; +import hundun.gdxgame.idleshare.gamelib.framework.model.resource.ResourcePair; + +import java.util.ArrayList; +import java.util.List; + +public class ConstructionWikiVM extends Table { + + BaseDemoPlayScreen parent; + BaseConstruction model; + + Label label; + + public ConstructionWikiVM(BaseDemoPlayScreen parent) { + //super("GUIDE_TEXT", parent.game.getButtonSkin()); + this.parent = parent; + this.label = new Label("", parent.getGame().getMainSkin()); + this.add(label); + } + + + public void rebuildCells(@Null BaseConstruction newModel) { + if (newModel != null) { + this.model = newModel; + } + + this.label.setText(model.getDetailDescriptionConstPart()); + } + + + + public void update() { + rebuildCells(null); + } + + +} diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldCellDetailBoardVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldDetailBoardVM.java similarity index 56% rename from IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldCellDetailBoardVM.java rename to IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldDetailBoardVM.java index 7f3eaa3..5f89c09 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldCellDetailBoardVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldDetailBoardVM.java @@ -7,23 +7,21 @@ import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import hundun.gdxgame.gamelib.starter.listerner.ILogicFrameListener; import hundun.gdxgame.idledemo.logic.DemoConstructionPrototypeId; -import hundun.gdxgame.idledemo.ui.screen.BaseDemoPlayScreen; import hundun.gdxgame.idledemo.ui.screen.WorldPlayScreen; import hundun.gdxgame.idledemo.ui.shared.BaseCellDetailNodeVM; import hundun.gdxgame.idleshare.gamelib.framework.callback.IConstructionCollectionListener; -import hundun.gdxgame.idleshare.gamelib.framework.model.construction.AbstractConstructionPrototype; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; import lombok.Getter; import lombok.Setter; -public class WorldCellDetailBoardVM extends Table implements IConstructionCollectionListener, ILogicFrameListener { +public class WorldDetailBoardVM extends Table implements IConstructionCollectionListener, ILogicFrameListener { @Getter @Setter public BaseConstruction detailingConstruction; BaseCellDetailNodeVM content; - protected BaseDemoPlayScreen screen; + protected WorldPlayScreen screen; - public WorldCellDetailBoardVM(WorldPlayScreen parent) + public WorldDetailBoardVM(WorldPlayScreen parent) { this.screen = parent; this.setBackground(parent.getGame().getTextureManager().getDefaultBoardNinePatchDrawable()); @@ -51,29 +49,33 @@ public void selectCell(BaseConstruction construction) switch (construction.getPrototypeId()) { case DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL: - updateAsConstructionPrototypeDetail(construction); + case DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL: + case DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL: { + WorldEmptyDetailNode innerBoardVM = new WorldEmptyDetailNode(screen); + content = innerBoardVM; break; - default: - updateAsConstructionDetail(construction); + } + case DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: + case DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: + case DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER: { + WorldMushroomDetailNode innerBoardVM = new WorldMushroomDetailNode(screen); + content = innerBoardVM; + break; + } + case DemoConstructionPrototypeId.EPOCH_1_TREE: + case DemoConstructionPrototypeId.EPOCH_2_TREE: + case DemoConstructionPrototypeId.EPOCH_3_TREE: { + WorldTreeDetailNode innerBoardVM = new WorldTreeDetailNode(screen); + content = innerBoardVM; break; + } + default: } - } - private void updateAsEmpty() - { - this.clearChildren(); - content = null; - } - private void updateAsConstructionDetail(BaseConstruction construction) - { this.clearChildren(); - WorldConstructionInstanceCellDetailNode innerBoardVM = new WorldConstructionInstanceCellDetailNode(screen); - innerBoardVM.updateAsConstruction(construction, construction.getSaveData().getPosition()); - this.add(innerBoardVM) - .width(screen.getLayoutConst().WorldConstructionCellDetailNodeWidth) - .height(screen.getLayoutConst().WorldConstructionCellDetailNodeHeight); - content = innerBoardVM; + content.updateForNewConstruction(construction, construction.getSaveData().getPosition()); + this.add(content); TextButton textButton = new TextButton("clear", screen.getGame().getMainSkin()); textButton.addListener(new ChangeListener() { @@ -84,29 +86,13 @@ public void changed(ChangeEvent event, Actor actor) { }); this.add(textButton); } - - private void updateAsConstructionPrototypeDetail(BaseConstruction construction) + private void updateAsEmpty() { this.clearChildren(); - - - WorldConstructionPrototypeCellDetailNode innerBoardVM = new WorldConstructionPrototypeCellDetailNode(screen); - innerBoardVM.updateAsConstructionPrototype(construction, construction.getSaveData().getPosition()); - this.add(innerBoardVM) - .width(screen.getLayoutConst().WorldConstructionCellDetailNodeWidth) - .height(screen.getLayoutConst().WorldConstructionCellDetailNodeHeight); - content = innerBoardVM; - - TextButton textButton = new TextButton("clear", screen.getGame().getMainSkin()); - textButton.addListener(new ChangeListener() { - @Override - public void changed(ChangeEvent event, Actor actor) { - screen.onCellClicked(null); - } - }); - this.add(textButton); + content = null; } + @Override public void onConstructionCollectionChange() { diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldConstructionPrototypeCellDetailNode.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldEmptyDetailNode.java similarity index 97% rename from IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldConstructionPrototypeCellDetailNode.java rename to IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldEmptyDetailNode.java index bd7aef2..41ebf5b 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldConstructionPrototypeCellDetailNode.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldEmptyDetailNode.java @@ -23,7 +23,7 @@ * @author hundun * Created on 2021/11/05 */ -public class WorldConstructionPrototypeCellDetailNode extends BaseCellDetailNodeVM { +public class WorldEmptyDetailNode extends BaseCellDetailNodeVM { BaseDemoPlayScreen screen; BaseConstruction construction; GridPosition position; @@ -33,7 +33,7 @@ public class WorldConstructionPrototypeCellDetailNode extends BaseCellDetailNode - public WorldConstructionPrototypeCellDetailNode( + public WorldEmptyDetailNode( BaseDemoPlayScreen parent ) { super(); @@ -96,7 +96,8 @@ public void subLogicFrame() { children.forEach(it -> it.subLogicFrame()); } - public void updateAsConstructionPrototype( + @Override + public void updateForNewConstruction( BaseConstruction construction, GridPosition position ) { diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldConstructionInstanceCellDetailNode.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldMushroomDetailNode.java similarity index 81% rename from IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldConstructionInstanceCellDetailNode.java rename to IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldMushroomDetailNode.java index d2fa9f7..66ac2b4 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldConstructionInstanceCellDetailNode.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldMushroomDetailNode.java @@ -3,16 +3,17 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.scenes.scene2d.Actor; -import com.badlogic.gdx.scenes.scene2d.ui.Label; -import com.badlogic.gdx.scenes.scene2d.ui.Table; -import com.badlogic.gdx.scenes.scene2d.ui.TextButton; +import com.badlogic.gdx.scenes.scene2d.Touchable; +import com.badlogic.gdx.scenes.scene2d.ui.*; import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import com.badlogic.gdx.utils.Align; import hundun.gdxgame.corelib.base.util.DrawableFactory; import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; import hundun.gdxgame.idledemo.ui.screen.BaseDemoPlayScreen; +import hundun.gdxgame.idledemo.ui.screen.WorldPlayScreen; import hundun.gdxgame.idledemo.ui.shared.BaseCellDetailNodeVM; import hundun.gdxgame.idledemo.ui.shared.ConstructionDetailPartVM; +import hundun.gdxgame.idleshare.core.starter.ui.component.board.construction.impl.StarterConstructionControlNode.StarterSecondaryInfoBoardCallerClickListener; import hundun.gdxgame.idleshare.core.starter.ui.screen.play.PlayScreenLayoutConst; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; import hundun.gdxgame.idleshare.gamelib.framework.model.grid.GridPosition; @@ -22,7 +23,7 @@ * @author hundun * Created on 2021/11/05 */ -public class WorldConstructionInstanceCellDetailNode extends BaseCellDetailNodeVM { +public class WorldMushroomDetailNode extends BaseCellDetailNodeVM { BaseDemoPlayScreen parent; BaseConstruction model; Label constructionNameLabel; @@ -38,8 +39,8 @@ public class WorldConstructionInstanceCellDetailNode extends BaseCellDetailNodeV Table leftPart; ConstructionDetailPartVM rightPart; - public WorldConstructionInstanceCellDetailNode( - BaseDemoPlayScreen parent + public WorldMushroomDetailNode( + WorldPlayScreen parent ) { super(); final PlayScreenLayoutConst playScreenLayoutConst = parent.getLayoutConst(); @@ -60,7 +61,7 @@ public WorldConstructionInstanceCellDetailNode( upgradeButton.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { - Gdx.app.log(WorldConstructionInstanceCellDetailNode.class.getSimpleName(), "upgradeButton changed"); + Gdx.app.log(WorldMushroomDetailNode.class.getSimpleName(), "upgradeButton changed"); model.getUpgradeComponent().doUpgrade(); } }); @@ -83,11 +84,18 @@ public void changed(ChangeEvent event, Actor actor) { } }); + Container questionMarkArea = new Container<>(new Image(parent.getGame().getIdleMushroomTextureManager().getQuestionMarkTexture())); + questionMarkArea.setBackground(parent.getGame().getIdleMushroomTextureManager().getDefaultBoardNinePatchDrawable()); + questionMarkArea.setTouchable(Touchable.enabled); + questionMarkArea.addListener(new StarterSecondaryInfoBoardCallerClickListener(() -> model, parent)); // ------ leftPart ------ - leftPart.add(constructionNameLabel).size(CHILD_WIDTH, NAME_CHILD_HEIGHT).row(); - leftPart.add(upgradeButton).size(CHILD_WIDTH, CHILD_HEIGHT).row(); - leftPart.add(workingLevelLabel).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + leftPart.add(constructionNameLabel).size(CHILD_WIDTH, NAME_CHILD_HEIGHT); + leftPart.add(questionMarkArea); + leftPart.row(); + leftPart.add(workingLevelLabel).size(CHILD_WIDTH, CHILD_HEIGHT); + leftPart.add(upgradeButton).size(CHILD_WIDTH, CHILD_HEIGHT); + leftPart.row(); leftPart.add(proficiencyLabel).size(CHILD_WIDTH, CHILD_HEIGHT).row(); leftPart.add(transformButton).size(CHILD_WIDTH, CHILD_HEIGHT).row(); leftPart.setBackground(DrawableFactory.createBorderBoard(30, 10, 0.8f, 1)); @@ -151,7 +159,8 @@ private void update() { } - public void updateAsConstruction(BaseConstruction construction, GridPosition position) { + @Override + public void updateForNewConstruction(BaseConstruction construction, GridPosition position) { this.model = construction; update(); rightPart.rebuildCells(model); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldScreenPopupInfoBoard.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldScreenPopupInfoBoard.java new file mode 100644 index 0000000..f23dcdf --- /dev/null +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldScreenPopupInfoBoard.java @@ -0,0 +1,33 @@ +package hundun.gdxgame.idledemo.ui.world; + +import com.badlogic.gdx.scenes.scene2d.Touchable; +import com.badlogic.gdx.scenes.scene2d.ui.Label; +import com.badlogic.gdx.scenes.scene2d.ui.Table; +import hundun.gdxgame.idledemo.ui.screen.WorldPlayScreen; +import hundun.gdxgame.idledemo.ui.shared.ConstructionWikiVM; +import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; + +public class WorldScreenPopupInfoBoard extends Table { + + WorldPlayScreen parent; + ConstructionWikiVM constructionWikiVM; + public WorldScreenPopupInfoBoard(WorldPlayScreen parent) { + //super("GUIDE_TEXT", parent.game.getButtonSkin()); + this.parent = parent; + //this.setBounds(5, GameAreaControlBoard.Y, GameAreaControlBoard.X - 10, 120); + this.setTouchable(Touchable.disabled); + this.setBackground(parent.getLayoutConst().simpleBoardBackground); + this.setVisible(false); + + this.constructionWikiVM = new ConstructionWikiVM(parent); + this.add(constructionWikiVM) + .size(parent.getLayoutConst().popupInfoBoardWidth, parent.getLayoutConst().popupInfoBoardHeight); + } + + public void update(BaseConstruction construction) { + this.constructionWikiVM.rebuildCells(construction); + } + + + +} diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldTreeDetailNode.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldTreeDetailNode.java new file mode 100644 index 0000000..2264c8c --- /dev/null +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/WorldTreeDetailNode.java @@ -0,0 +1,167 @@ +package hundun.gdxgame.idledemo.ui.world; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.scenes.scene2d.Actor; +import com.badlogic.gdx.scenes.scene2d.Touchable; +import com.badlogic.gdx.scenes.scene2d.ui.*; +import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; +import com.badlogic.gdx.utils.Align; +import hundun.gdxgame.corelib.base.util.DrawableFactory; +import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; +import hundun.gdxgame.idledemo.ui.screen.BaseDemoPlayScreen; +import hundun.gdxgame.idledemo.ui.screen.WorldPlayScreen; +import hundun.gdxgame.idledemo.ui.shared.BaseCellDetailNodeVM; +import hundun.gdxgame.idleshare.core.starter.ui.component.board.construction.impl.StarterConstructionControlNode.StarterSecondaryInfoBoardCallerClickListener; +import hundun.gdxgame.idleshare.core.starter.ui.screen.play.PlayScreenLayoutConst; +import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; +import hundun.gdxgame.idleshare.gamelib.framework.model.grid.GridPosition; + + +/** + * @author hundun + * Created on 2021/11/05 + */ +public class WorldTreeDetailNode extends BaseCellDetailNodeVM { + BaseDemoPlayScreen parent; + BaseConstruction model; + Label constructionNameLabel; + + Label workingLevelLabel; + Label proficiencyLabel; + Label positionLabel; + + TextButton upgradeButton; + TextButton transformButton; + + + + + public WorldTreeDetailNode( + WorldPlayScreen parent + ) { + super(); + final PlayScreenLayoutConst playScreenLayoutConst = parent.getLayoutConst(); + this.parent = parent; + + + + int CHILD_WIDTH = playScreenLayoutConst.CONSTRUCION_CHILD_WIDTH; + int CHILD_HEIGHT = playScreenLayoutConst.CONSTRUCION_CHILD_BUTTON_HEIGHT; + int NAME_CHILD_HEIGHT = playScreenLayoutConst.CONSTRUCION_CHILD_NAME_HEIGHT; + + this.constructionNameLabel = new Label("", parent.getGame().getMainSkin()); + constructionNameLabel.setWrap(true); + + + this.upgradeButton = new TextButton("", parent.getGame().getMainSkin()); + upgradeButton.addListener(new ChangeListener() { + @Override + public void changed(ChangeEvent event, Actor actor) { + Gdx.app.log(WorldTreeDetailNode.class.getSimpleName(), "upgradeButton changed"); + model.getUpgradeComponent().doUpgrade(); + } + }); + + this.workingLevelLabel = new Label("", parent.getGame().getMainSkin()); + workingLevelLabel.setAlignment(Align.center); + + + + + this.proficiencyLabel = new Label("", parent.getGame().getMainSkin()); + this.positionLabel = new Label("", parent.getGame().getMainSkin()); + + this.transformButton = new TextButton("-", parent.getGame().getMainSkin()); + transformButton.addListener(new ChangeListener() { + @Override + public void changed(ChangeEvent event, Actor actor) { + parent.getGame().getFrontend().log(this.getClass().getSimpleName(), "transformButton clicked"); + model.getUpgradeComponent().doTransform(); + } + }); + + Container questionMarkArea = new Container<>(new Image(parent.getGame().getIdleMushroomTextureManager().getQuestionMarkTexture())); + questionMarkArea.setBackground(parent.getGame().getIdleMushroomTextureManager().getDefaultBoardNinePatchDrawable()); + questionMarkArea.setTouchable(Touchable.enabled); + questionMarkArea.addListener(new StarterSecondaryInfoBoardCallerClickListener(() -> model, parent)); + + // ------ leftPart ------ + this.add(constructionNameLabel).size(CHILD_WIDTH, NAME_CHILD_HEIGHT); + this.add(questionMarkArea); + this.row(); + this.add(workingLevelLabel).size(CHILD_WIDTH, CHILD_HEIGHT); + this.add(upgradeButton).size(CHILD_WIDTH, CHILD_HEIGHT); + this.row(); + this.add(proficiencyLabel).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + this.add(transformButton).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + this.setBackground(DrawableFactory.createBorderBoard(30, 10, 0.8f, 1)); + + } + + + + + + + + private void update() { + // ------ update show-state ------ + if (model == null) { + setVisible(false); + //textButton.setVisible(false); + //Gdx.app.log("ConstructionView", this.hashCode() + " no model"); + return; + } else { + setVisible(true); + //textButton.setVisible(true); + //Gdx.app.log("ConstructionView", model.getName() + " set to its view"); + } + // ------ update text ------ + constructionNameLabel.setText(JavaFeatureForGwt.stringFormat( + "%s (%s, %s)", + model.getName(), + model.getSaveData().getPosition().getX(), + model.getSaveData().getPosition().getY() + )); + upgradeButton.setText(model.getDescriptionPackage().getUpgradeButtonText()); + workingLevelLabel.setText(model.getLevelComponent().getWorkingLevelDescription()); + proficiencyLabel.setText(model.getProficiencyComponent().getProficiencyDescroption()); + positionLabel.setText(model.getSaveData().getPosition().toShowText()); + + // ------ update clickable-state ------ + if (model.getUpgradeComponent().canUpgrade()) { + upgradeButton.setDisabled(false); + upgradeButton.getLabel().setColor(Color.WHITE); + } else { + upgradeButton.setDisabled(true); + upgradeButton.getLabel().setColor(Color.RED); + } + if (model.getUpgradeComponent().canTransfer()) + { + transformButton.setDisabled(false); + transformButton.getLabel().setColor(Color.WHITE); + } + else + { + transformButton.setDisabled(true); + transformButton.getLabel().setColor(Color.RED); + } + + // ------ update model ------ + //model.onLogicFrame(); + + } + + @Override + public void updateForNewConstruction(BaseConstruction construction, GridPosition position) { + this.model = construction; + update(); + } + + @Override + public void subLogicFrame() { + update(); + } + +} diff --git a/idleshare/core/src/hundun/gdxgame/idleshare/core/starter/ui/component/PopupInfoBoard.java b/idleshare/core/src/hundun/gdxgame/idleshare/core/starter/ui/component/PopupInfoBoard.java index 60e2dcc..5ccf36b 100644 --- a/idleshare/core/src/hundun/gdxgame/idleshare/core/starter/ui/component/PopupInfoBoard.java +++ b/idleshare/core/src/hundun/gdxgame/idleshare/core/starter/ui/component/PopupInfoBoard.java @@ -42,7 +42,7 @@ private Container wapperContainer(T content) { private void rebuildCells(BaseConstruction model) { this.clearChildren(); - add(wapperContainer(new Label(model.getDetailDescroptionConstPart(), parent.getGame().getMainSkin()))) + add(wapperContainer(new Label(model.getDetailDescriptionConstPart(), parent.getGame().getMainSkin()))) .colspan(3) .left() .row(); diff --git a/idleshare/core/src/hundun/gdxgame/idleshare/core/starter/ui/screen/play/PlayScreenLayoutConst.java b/idleshare/core/src/hundun/gdxgame/idleshare/core/starter/ui/screen/play/PlayScreenLayoutConst.java index 5104a0d..ca929af 100644 --- a/idleshare/core/src/hundun/gdxgame/idleshare/core/starter/ui/screen/play/PlayScreenLayoutConst.java +++ b/idleshare/core/src/hundun/gdxgame/idleshare/core/starter/ui/screen/play/PlayScreenLayoutConst.java @@ -42,6 +42,8 @@ public class PlayScreenLayoutConst { public int ALL_ACHIEVEMENT_BOARD_NODE_HEIGHT = 150; public int WorldConstructionCellDetailNodeWidth = 800; public int WorldConstructionCellDetailNodeHeight = CONSTRUCION_BOARD_ROOT_BOX_HEIGHT - 20; + public float popupInfoBoardWidth = 400; + public float popupInfoBoardHeight = 200; public PlayScreenLayoutConst(int gameLogicWidth, int gameLogicHeight) { this.EXPECTED_DRAW_MIN_X = 0; diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/BaseConstruction.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/BaseConstruction.java index e826509..8e56e59 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/BaseConstruction.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/BaseConstruction.java @@ -45,7 +45,7 @@ public abstract class BaseConstruction implements IBuffChangeListener, ITileNode @Getter protected String prototypeId; @Getter - protected String detailDescroptionConstPart; + protected String detailDescriptionConstPart; @Getter public DescriptionPackage descriptionPackage; @@ -116,7 +116,7 @@ public void lazyInitDescription(IdleGameplayContext gameContext, Language langua this.gameplayContext = gameContext; this.name = gameContext.getGameDictionary().constructionPrototypeIdToShowName(language, prototypeId); - this.detailDescroptionConstPart = gameContext.getGameDictionary().constructionPrototypeIdToDetailDescriptionConstPart(language, prototypeId); + this.detailDescriptionConstPart = gameContext.getGameDictionary().constructionPrototypeIdToDetailDescriptionConstPart(language, prototypeId); outputComponent.lazyInitDescription(); upgradeComponent.lazyInitDescription(); diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/ExistenceComponent.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/ExistenceComponent.java index 78a4ed6..d724948 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/ExistenceComponent.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/ExistenceComponent.java @@ -55,15 +55,12 @@ public void updateModifiedValues() if (destroyGainPack != null && destroyCostPack != null) { destroyCostPack.setModifiedValues(destroyCostPack.getBaseValues()); - destroyCostPack.setModifiedValuesDescription(ResourcePack.toDescription(destroyCostPack.getModifiedValues())); destroyGainPack.setModifiedValues(destroyGainPack.getBaseValues()); - destroyGainPack.setModifiedValuesDescription(ResourcePack.toDescription(destroyGainPack.getModifiedValues())); } if (buyCandidateConfigs != null) { buyCandidateConfigs.forEach(it -> { it.getBuyCostPack().setModifiedValues(it.getBuyCostPack().getBaseValues()); - it.getBuyCostPack().setModifiedValuesDescription(ResourcePack.toDescription(it.getBuyCostPack().getModifiedValues())); }); } } diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/OutputComponent.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/OutputComponent.java index faf0487..6a8f88c 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/OutputComponent.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/OutputComponent.java @@ -23,7 +23,6 @@ public abstract class OutputComponent { @Setter protected ResourcePack outputGainPack; - /** * output行为所需要支付的费用; 无费用时为null */ @@ -31,7 +30,6 @@ public abstract class OutputComponent { @Setter protected ResourcePack outputCostPack; - protected static final int DEFAULT_AUTO_OUPUT_SECOND_MAX = 1; @Getter @Setter @@ -69,11 +67,17 @@ public void updateModifiedValues() { }) .collect(Collectors.toList()) ); - this.outputGainPack.setModifiedValuesDescription( - outputGainPack.getModifiedValues().stream() - .map(pair -> pair.getType() + "x" + pair.getAmount()) - .collect(Collectors.joining(", ")) - + "; " + outputGainPack.setPreviewNextLevelModifiedValues( + outputGainPack.getBaseValues().stream() + .map(pair -> { + long newAmout = this.calculateModifiedOutputGain( + pair.getAmount(), + construction.saveData.getWorkingLevel() + 1, + construction.saveData.getProficiency() + ); + return new ResourcePair(pair.getType(), newAmout); + }) + .collect(Collectors.toList()) ); } // -------------- @@ -90,11 +94,17 @@ public void updateModifiedValues() { }) .collect(Collectors.toList()) ); - this.outputCostPack.setModifiedValuesDescription( - outputCostPack.getModifiedValues().stream() - .map(pair -> pair.getType() + "x" + pair.getAmount()) - .collect(Collectors.joining(", ")) - + "; " + outputCostPack.setPreviewNextLevelModifiedValues( + outputCostPack.getBaseValues().stream() + .map(pair -> { + long newAmout = this.calculateModifiedOutputGain( + pair.getAmount(), + construction.saveData.getWorkingLevel() + 1, + construction.saveData.getProficiency() + ); + return new ResourcePair(pair.getType(), newAmout); + }) + .collect(Collectors.toList()) ); } } diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/UpgradeComponent.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/UpgradeComponent.java index 14cebdb..d65df11 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/UpgradeComponent.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/UpgradeComponent.java @@ -79,12 +79,9 @@ public void updateModifiedValues() { if (upgradeCostPack != null) { if (reachMaxLevel) { this.upgradeCostPack.setModifiedValues(null); - this.upgradeCostPack.setModifiedValuesDescription(null); if (transformCostPack != null) { upgradeState = UpgradeState.REACHED_MAX_UPGRADE_HAS_TRANSFER; - this.transformCostPack.setModifiedValues(transformCostPack.getBaseValues()); - this.transformCostPack.setModifiedValuesDescription(ResourcePack.toDescription(this.transformCostPack.getModifiedValues())); } else { upgradeState = UpgradeState.REACHED_MAX_UPGRADE_NO_TRANSFER; } @@ -97,7 +94,6 @@ public void updateModifiedValues() { }) .collect(Collectors.toList()) ); - this.upgradeCostPack.setModifiedValuesDescription(ResourcePack.toDescription(this.upgradeCostPack.getModifiedValues())); } } } diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/resource/ResourcePack.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/resource/ResourcePack.java index d70212e..48550bd 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/resource/ResourcePack.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/resource/ResourcePack.java @@ -14,8 +14,7 @@ public class ResourcePack { String descriptionStart; List baseValues; List modifiedValues; - String modifiedValuesDescription; - + List previewNextLevelModifiedValues; public static String toDescription(List list) { return list.stream() .map(pair -> pair.getType() + "x" + pair.getAmount())