Skip to content

Commit

Permalink
update UI and game-value
Browse files Browse the repository at this point in the history
  • Loading branch information
hundun000 committed Nov 12, 2023
1 parent e8c7ee7 commit 36c9fc8
Show file tree
Hide file tree
Showing 49 changed files with 440 additions and 347 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,6 @@ public List<String> getAchievementTexts(Language language)
}
}

@Override
public List<String> getPlayScreenTexts(Language language)
{
switch (language)
{
case CN:
return JavaFeatureForGwt.arraysAsList("购买", "购买费用");
default:
return JavaFeatureForGwt.arraysAsList("Build", "Build cost");
}
}

@Override
public List<String> getStageSelectMaskBoardTexts(Language language)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.DescriptionPackage;
import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.DescriptionPackageFactory;
import hundun.gdxgame.idleshare.gamelib.framework.model.construction.starter.BaseAutoProficiencyComponent;
import hundun.gdxgame.idleshare.gamelib.framework.model.construction.starter.ConstProficiencyComponent;
import hundun.gdxgame.idleshare.gamelib.framework.model.grid.GridPosition;
import hundun.gdxgame.idleshare.gamelib.framework.util.text.Language;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected void initChild() {
nodes.clear();
childTable.clearChildren();

parent.getGame().getIdleGameplayExport().getGameplayContext().getAchievementManager().getModels().values()
parent.getGame().getIdleGameplayExport().getGameplayContext().getAchievementManager().getAchievementInfoPackage().getSortedAchievementList()
.forEach(it -> {
OneAchievementNodeVM<T_GAME, T_SAVE> constructionView = new OneAchievementNodeVM<>(parent, it);
nodes.add(constructionView);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public HexAreaVM(WorldPlayScreen screen) {
this.screen = screen;
this.cameraDataPackage = new CameraDataPackage();
this.cameraDataPackage.setCameraZoomWeightOnlyAllowForceSet(true);

if (screen.getGame().debugMode) {
this.debugAll();
}
Expand Down
Binary file added IdleMushroom-game/core/assets/bg_shroom.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 added IdleMushroom-game/core/assets/main.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 removed IdleMushroom-game/core/assets/mainCokie.png
Binary file not shown.
Binary file added IdleMushroom-game/core/assets/raw/main.psd
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.Map;

import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt;
import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId;
import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId;
import hundun.gdxgame.idlemushroom.logic.DemoScreenId;
import hundun.gdxgame.idlemushroom.logic.ResourceType;
import hundun.gdxgame.idleshare.gamelib.framework.data.ChildGameConfig;
Expand All @@ -19,21 +19,22 @@ public IdleMushroomChildGameConfig() {

this.setConstructionConfig(
ConstructionConfig.builder()
.mainClickerConstructionPrototypeId(DemoConstructionPrototypeId.MAIN_MUSHROOM)
.mainClickerConstructionPrototypeId(IdleMushroomConstructionPrototypeId.MAIN_MUSHROOM)
.singletonPrototypeIds(JavaFeatureForGwt.listOf(
DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER,
DemoConstructionPrototypeId.EPOCH_COUNTER
IdleMushroomConstructionPrototypeId.MAIN_MUSHROOM,
IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER,
IdleMushroomConstructionPrototypeId.EPOCH_COUNTER
))
.worldPrototypeIds(JavaFeatureForGwt.listOf(
DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL,
DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL,
DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL,
DemoConstructionPrototypeId.EPOCH_1_TREE,
DemoConstructionPrototypeId.EPOCH_2_TREE,
DemoConstructionPrototypeId.EPOCH_3_TREE,
DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER,
DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER,
DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER
IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL,
IdleMushroomConstructionPrototypeId.EPOCH_2_EMPTY_CELL,
IdleMushroomConstructionPrototypeId.EPOCH_3_EMPTY_CELL,
IdleMushroomConstructionPrototypeId.EPOCH_1_TREE,
IdleMushroomConstructionPrototypeId.EPOCH_2_TREE,
IdleMushroomConstructionPrototypeId.EPOCH_3_TREE,
IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER,
IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER,
IdleMushroomConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER
))
.build()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public class IdleMushroomGame extends BaseIdleGame<RootSaveData> {
protected AbstractIdleScreenContext<IdleMushroomGame, RootSaveData> screenContext;

@Getter
protected IdleMushroomTextureManager idleMushroomTextureManager;
private final IdleMushroomTextureManager idleMushroomTextureManager;
private final IdleMushroomScreenContext idleMushroomScreenContext;
@Getter
private final IdleMushroomGameDictionary idleMushroomGameDictionary;

public static Map<Integer, RootEpochConfig> epochConfigMap;
static {
Expand All @@ -37,34 +40,34 @@ public class IdleMushroomGame extends BaseIdleGame<RootSaveData> {
2, RootEpochConfig.builder()
.maxLevel(10)
.constructionEpochConfigMap(JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER,
IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER,
ConstructionEpochConfig.builder()
.transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER)
.transformToPrototypeId(null)
.build(),
DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL,
IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL,
ConstructionEpochConfig.builder()
.transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL)
.transformToPrototypeId(IdleMushroomConstructionPrototypeId.EPOCH_2_EMPTY_CELL)
.build(),
DemoConstructionPrototypeId.EPOCH_1_TREE,
IdleMushroomConstructionPrototypeId.EPOCH_1_TREE,
ConstructionEpochConfig.builder()
.transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_2_TREE)
.transformToPrototypeId(IdleMushroomConstructionPrototypeId.EPOCH_2_TREE)
.build()
))
.build(),
3, RootEpochConfig.builder()
.maxLevel(15)
.constructionEpochConfigMap(JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER,
IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER,
ConstructionEpochConfig.builder()
.transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER)
.transformToPrototypeId(null)
.build(),
DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL,
IdleMushroomConstructionPrototypeId.EPOCH_2_EMPTY_CELL,
ConstructionEpochConfig.builder()
.transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL)
.transformToPrototypeId(IdleMushroomConstructionPrototypeId.EPOCH_3_EMPTY_CELL)
.build(),
DemoConstructionPrototypeId.EPOCH_2_TREE,
IdleMushroomConstructionPrototypeId.EPOCH_2_TREE,
ConstructionEpochConfig.builder()
.transformToPrototypeId(DemoConstructionPrototypeId.EPOCH_3_TREE)
.transformToPrototypeId(IdleMushroomConstructionPrototypeId.EPOCH_3_TREE)
.build()
))
.build()
Expand All @@ -74,18 +77,19 @@ public class IdleMushroomGame extends BaseIdleGame<RootSaveData> {

public IdleMushroomGame(ISaveTool<RootSaveData> saveTool) {
super(960, 640);
this.debugMode = true;
this.debugMode = false;

this.sharedViewport = new ScreenViewport();
this.textFormatTool = new TextFormatTool();
this.saveHandler = new DemoSaveHandler(frontend, saveTool);
this.mainSkinFilePath = null;
this.idleMushroomTextureManager = new IdleMushroomTextureManager();
this.textureManager = this.idleMushroomTextureManager;
this.screenContext = new IdleMushroomScreenContext(this);
this.idleMushroomScreenContext = new IdleMushroomScreenContext(this);
this.screenContext = idleMushroomScreenContext;
this.audioPlayManager = new AudioPlayManager(this);
this.childGameConfig = new IdleMushroomChildGameConfig();

this.idleMushroomGameDictionary = new IdleMushroomGameDictionary();
this.controlBoardScreenIds = JavaFeatureForGwt.listOf(
DemoScreenId.SCREEN_MAIN,
DemoScreenId.SCREEN_WORLD,
Expand All @@ -101,7 +105,7 @@ protected void createStage1() {
this.mainSkin = new FreeTypeSkin(Gdx.files.internal("skins/IdleMushroom/IdleMushroom.json"));
this.idleGameplayExport = new IdleGameplayExport(
frontend,
new DemoGameDictionary(),
idleMushroomGameDictionary,
new DemoBuiltinConstructionsLoader(),
new DemoAchievementLoader(),
BaseIdleScreen.LOGIC_FRAME_PER_SECOND,
Expand Down Expand Up @@ -146,14 +150,16 @@ public static class ConstructionEpochConfig {
public void doChangeEpoch(BaseConstruction epochCounter) {
int currentEpochLevel = epochCounter.getSaveData().getLevel();
RootEpochConfig rootEpochConfig = epochConfigMap.get(currentEpochLevel);

idleMushroomScreenContext.getMainPlayScreen().setMainClickerWithScale();
idleGameplayExport.getGameplayContext().getConstructionManager().getWorldConstructionInstances().stream()
.forEach(it -> {
ConstructionEpochConfig constructionEpochConfig = rootEpochConfig.getConstructionEpochConfigMap()
.get(it.getPrototypeId());
if (constructionEpochConfig != null) {
idleGameplayExport.getGameplayContext().getConstructionManager().addToRemoveQueue(it);
idleGameplayExport.getGameplayContext().getConstructionManager().addToCreateQueue(constructionEpochConfig.getTransformToPrototypeId(), it.getPosition());
if (constructionEpochConfig.getTransformToPrototypeId() != null) {
idleGameplayExport.getGameplayContext().getConstructionManager().addToCreateQueue(constructionEpochConfig.getTransformToPrototypeId(), it.getPosition());
}
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public Map<String, AbstractAchievement> getProviderMap(Language language) {
MushroomAchievementId.STEP_1,
textMap,
JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER, new SimpleEntry<>(1, 2)
IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER, new SimpleEntry<>(1, 2)
),
JavaFeatureForGwt.listOf(MushroomAchievementId.STEP_2, MushroomAchievementId.STEP_3, MushroomAchievementId.STEP_4),
new ResourcePair(ResourceType.DNA_POINT, 1000L)
Expand All @@ -60,7 +60,7 @@ public Map<String, AbstractAchievement> getProviderMap(Language language) {
MushroomAchievementId.STEP_2,
textMap,
JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new SimpleEntry<>(1, 2)
IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new SimpleEntry<>(1, 2)
),
null,
new ResourcePair(ResourceType.DNA_POINT, 1000L)
Expand All @@ -70,7 +70,7 @@ public Map<String, AbstractAchievement> getProviderMap(Language language) {
MushroomAchievementId.STEP_3,
textMap,
JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new SimpleEntry<>(1, 2)
IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new SimpleEntry<>(1, 2)
),
null,
new ResourcePair(ResourceType.DNA_POINT, 1000L)
Expand All @@ -80,7 +80,7 @@ public Map<String, AbstractAchievement> getProviderMap(Language language) {
MushroomAchievementId.STEP_4,
textMap,
JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new SimpleEntry<>(1, 2)
IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new SimpleEntry<>(1, 2)
),
null,
new ResourcePair(ResourceType.DNA_POINT, 1000L)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,48 +23,48 @@ public Map<String, AbstractConstructionPrototype> getProviderMap(Language langua
RootEpochConfig epochConfig2 = IdleMushroomGame.epochConfigMap.get(2);
RootEpochConfig epochConfig3 = IdleMushroomGame.epochConfigMap.get(3);
Map<String, AbstractConstructionPrototype> result = new HashMap<>();
result.put(DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL, new DirtPrototype(
DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL,
result.put(IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL, new DirtPrototype(
IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL,
language
));
result.put(DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL, new DirtPrototype(
DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL,
result.put(IdleMushroomConstructionPrototypeId.EPOCH_2_EMPTY_CELL, new DirtPrototype(
IdleMushroomConstructionPrototypeId.EPOCH_2_EMPTY_CELL,
language
));
result.put(DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL, new DirtPrototype(
DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL,
result.put(IdleMushroomConstructionPrototypeId.EPOCH_3_EMPTY_CELL, new DirtPrototype(
IdleMushroomConstructionPrototypeId.EPOCH_3_EMPTY_CELL,
language
));
result.put(DemoConstructionPrototypeId.EPOCH_1_TREE, new TreePrototype(
DemoConstructionPrototypeId.EPOCH_1_TREE,
result.put(IdleMushroomConstructionPrototypeId.EPOCH_1_TREE, new TreePrototype(
IdleMushroomConstructionPrototypeId.EPOCH_1_TREE,
language
));
result.put(DemoConstructionPrototypeId.EPOCH_2_TREE, new TreePrototype(
DemoConstructionPrototypeId.EPOCH_2_TREE,
result.put(IdleMushroomConstructionPrototypeId.EPOCH_2_TREE, new TreePrototype(
IdleMushroomConstructionPrototypeId.EPOCH_2_TREE,
language
));
result.put(DemoConstructionPrototypeId.EPOCH_3_TREE, new TreePrototype(
DemoConstructionPrototypeId.EPOCH_3_TREE,
result.put(IdleMushroomConstructionPrototypeId.EPOCH_3_TREE, new TreePrototype(
IdleMushroomConstructionPrototypeId.EPOCH_3_TREE,
language
));
result.put(DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER, new AutoProviderPrototype(
DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER,
result.put(IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER, new AutoProviderPrototype(
IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER,
epochConfig1,
language
));
result.put(DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER, new AutoProviderPrototype(
DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER,
result.put(IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER, new AutoProviderPrototype(
IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER,
epochConfig2,
language
));
result.put(DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER, new AutoProviderPrototype(
DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER,
result.put(IdleMushroomConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER, new AutoProviderPrototype(
IdleMushroomConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER,
epochConfig3,
language
));
result.put(DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new AutoSellerPrototype(language));
result.put(DemoConstructionPrototypeId.MAIN_MUSHROOM, new MainMushroomPrototype(language));
result.put(DemoConstructionPrototypeId.EPOCH_COUNTER, new EpochCounterPrototype(language));
result.put(IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new AutoSellerPrototype(language));
result.put(IdleMushroomConstructionPrototypeId.MAIN_MUSHROOM, new MainMushroomPrototype(language));
result.put(IdleMushroomConstructionPrototypeId.EPOCH_COUNTER, new EpochCounterPrototype(language));
return result;
}

Expand Down
Loading

0 comments on commit 36c9fc8

Please sign in to comment.