Skip to content

Commit

Permalink
update UI
Browse files Browse the repository at this point in the history
  • Loading branch information
hundun000 committed Oct 22, 2023
1 parent d6f9d50 commit 74aac54
Show file tree
Hide file tree
Showing 31 changed files with 652 additions and 271 deletions.
Binary file modified IdleMushroom-game/core/assets/cells.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified IdleMushroom-game/core/assets/raw/未标题-1.psd
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public class IdleMushroomGame extends BaseIdleGame<RootSaveData> {
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()
Expand All @@ -49,23 +51,20 @@ public class IdleMushroomGame extends BaseIdleGame<RootSaveData> {
.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()
Expand Down Expand Up @@ -133,7 +132,6 @@ protected void createStage3() {
@Builder
public static class RootEpochConfig {
Integer maxLevel;
Integer outputScale;
Map<String, ConstructionEpochConfig> constructionEpochConfigMap;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]";
}
Expand All @@ -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:
Expand All @@ -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]";
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<>()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading

0 comments on commit 74aac54

Please sign in to comment.