Skip to content

Commit

Permalink
update UI; rename mushroom root package
Browse files Browse the repository at this point in the history
  • Loading branch information
hundun000 committed Oct 22, 2023
1 parent a957c4e commit 630ee8c
Show file tree
Hide file tree
Showing 63 changed files with 713 additions and 446 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public Map<String, AbstractAchievement> getProviderMap(Language language) {
JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.COOKIE_SIMPLE_AUTO_PROVIDER, new SimpleEntry<>(1, 2)
),
DemoAchievementId.STEP_2,
JavaFeatureForGwt.listOf(DemoAchievementId.STEP_2),
new ResourcePair(ResourceType.COIN, 1000L)
);
OwnConstructionAchievement.Companion.quickAddOwnConstructionAchievement(
Expand Down
Binary file added IdleMushroom-game/core/assets/table_4.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/table_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package hundun.gdxgame.idledemo;
package hundun.gdxgame.idlemushroom;

import java.util.ArrayList;
import java.util.Map;

import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt;
import hundun.gdxgame.idledemo.logic.DemoConstructionPrototypeId;
import hundun.gdxgame.idledemo.logic.DemoScreenId;
import hundun.gdxgame.idledemo.logic.ResourceType;
import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId;
import hundun.gdxgame.idlemushroom.logic.DemoScreenId;
import hundun.gdxgame.idlemushroom.logic.ResourceType;
import hundun.gdxgame.idleshare.gamelib.framework.data.ChildGameConfig;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package hundun.gdxgame.idledemo;
package hundun.gdxgame.idlemushroom;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.viewport.ScreenViewport;
import com.ray3k.stripe.FreeTypeSkin;

import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt;
import hundun.gdxgame.idledemo.logic.*;
import hundun.gdxgame.gamelib.base.save.ISaveTool;
import hundun.gdxgame.idledemo.ui.screen.DemoScreenContext;
import hundun.gdxgame.idlemushroom.ui.screen.IdleMushroomScreenContext;
import hundun.gdxgame.idlemushroom.logic.*;
import hundun.gdxgame.idleshare.core.framework.BaseIdleGame;
import hundun.gdxgame.idleshare.core.framework.model.manager.AbstractIdleScreenContext;
import hundun.gdxgame.idleshare.core.framework.model.manager.AudioPlayManager;
Expand Down Expand Up @@ -82,7 +82,7 @@ public IdleMushroomGame(ISaveTool<RootSaveData> saveTool) {
this.mainSkinFilePath = null;
this.idleMushroomTextureManager = new IdleMushroomTextureManager();
this.textureManager = this.idleMushroomTextureManager;
this.screenContext = new DemoScreenContext(this);
this.screenContext = new IdleMushroomScreenContext(this);
this.audioPlayManager = new AudioPlayManager(this);
this.childGameConfig = new IdleMushroomChildGameConfig();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hundun.gdxgame.idledemo.logic;
package hundun.gdxgame.idlemushroom.logic;

import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt;
import hundun.gdxgame.idleshare.gamelib.framework.model.achievement.AbstractAchievement;
Expand All @@ -18,29 +18,27 @@ public Map<String, AbstractAchievement> getProviderMap(Language language) {
Map<String, List<String>> textMap = new HashMap<>();
switch (language)
{
case CN:
textMap.put(DemoAchievementId.STEP_1, JavaFeatureForGwt.listOf(
"NO.1",
"拥有2级AUTO_PROVIDER。",
"你完成了任务NO.1。"
));
textMap.put(DemoAchievementId.STEP_2, JavaFeatureForGwt.listOf(
"NO.2",
"拥有2级AUTO_SELLER。",
"你完成了任务NO.2。"
));
break;
default:
textMap.put(DemoAchievementId.STEP_1, JavaFeatureForGwt.listOf(
textMap.put(MushroomAchievementId.STEP_1, JavaFeatureForGwt.listOf(
"NO.1",
"Own lv.2 AUTO_PROVIDER.",
"You completed Quest NO.1."
));
textMap.put(DemoAchievementId.STEP_2, JavaFeatureForGwt.listOf(
textMap.put(MushroomAchievementId.STEP_2, JavaFeatureForGwt.listOf(
"NO.2",
"Own lv.2 AUTO_SELLER.",
"You completed Quest NO.2."
));
textMap.put(MushroomAchievementId.STEP_3, JavaFeatureForGwt.listOf(
"NO.3",
"Own lv.2 AUTO_SELLER.",
"You completed Quest NO.2."
));
textMap.put(MushroomAchievementId.STEP_4, JavaFeatureForGwt.listOf(
"NO.4",
"Own lv.2 AUTO_SELLER.",
"You completed Quest NO.2."
));
break;
}

Expand All @@ -49,17 +47,37 @@ public Map<String, AbstractAchievement> getProviderMap(Language language) {
Map<String, AbstractAchievement> map = new HashMap<>();
OwnConstructionAchievement.Companion.quickAddOwnConstructionAchievement(
map,
DemoAchievementId.STEP_1,
MushroomAchievementId.STEP_1,
textMap,
JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER, new SimpleEntry<>(1, 2)
),
DemoAchievementId.STEP_2,
JavaFeatureForGwt.listOf(MushroomAchievementId.STEP_2, MushroomAchievementId.STEP_3, MushroomAchievementId.STEP_4),
new ResourcePair(ResourceType.DNA_POINT, 1000L)
);
OwnConstructionAchievement.Companion.quickAddOwnConstructionAchievement(
map,
MushroomAchievementId.STEP_2,
textMap,
JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new SimpleEntry<>(1, 2)
),
null,
new ResourcePair(ResourceType.DNA_POINT, 1000L)
);
OwnConstructionAchievement.Companion.quickAddOwnConstructionAchievement(
map,
MushroomAchievementId.STEP_3,
textMap,
JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new SimpleEntry<>(1, 2)
),
null,
new ResourcePair(ResourceType.DNA_POINT, 1000L)
);
OwnConstructionAchievement.Companion.quickAddOwnConstructionAchievement(
map,
DemoAchievementId.STEP_2,
MushroomAchievementId.STEP_4,
textMap,
JavaFeatureForGwt.mapOf(
DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER, new SimpleEntry<>(1, 2)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package hundun.gdxgame.idledemo.logic;
package hundun.gdxgame.idlemushroom.logic;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import hundun.gdxgame.idledemo.IdleMushroomGame;
import hundun.gdxgame.idledemo.IdleMushroomGame.RootEpochConfig;
import hundun.gdxgame.idledemo.logic.prototype.*;
import hundun.gdxgame.idlemushroom.IdleMushroomGame;
import hundun.gdxgame.idlemushroom.IdleMushroomGame.RootEpochConfig;
import hundun.gdxgame.idlemushroom.logic.prototype.*;
import hundun.gdxgame.idleshare.gamelib.framework.model.construction.*;
import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.IBuiltinConstructionsLoader;
import hundun.gdxgame.idleshare.gamelib.framework.model.resource.ResourcePack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hundun.gdxgame.idledemo.logic;
package hundun.gdxgame.idlemushroom.logic;



Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hundun.gdxgame.idledemo.logic;
package hundun.gdxgame.idlemushroom.logic;

import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hundun.gdxgame.idledemo.logic;
package hundun.gdxgame.idlemushroom.logic;

import java.util.*;

Expand Down Expand Up @@ -115,7 +115,7 @@ protected RootSaveData genereateStarterRootSaveData() {
.ownResources(ownResources)
.unlockedResourceTypes(new HashSet<>())
.achievementSaveDataMap(JavaFeatureForGwt.mapOf(
DemoAchievementId.STEP_1,
MushroomAchievementId.STEP_1,
new AchievementSaveData(AchievementState.RUNNING)
))
.build())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hundun.gdxgame.idledemo.logic;
package hundun.gdxgame.idlemushroom.logic;


public class DemoScreenId {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hundun.gdxgame.idledemo.logic;
package hundun.gdxgame.idlemushroom.logic;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
Expand All @@ -23,7 +23,10 @@ public class IdleMushroomTextureManager extends AbstractTextureManager {

@Getter
Drawable tableType3Drawable;

@Getter
Drawable questionMarkTableDrawable;
@Getter
Drawable tableType5Drawable;
private Drawable quickTableNinePatchDrawable(Texture texture) {
return new NinePatchDrawable(new NinePatch(
texture,
Expand All @@ -34,6 +37,16 @@ private Drawable quickTableNinePatchDrawable(Texture texture) {
));
}

private Drawable quickTableNinePatchDrawable(Texture texture, int size) {
return new NinePatchDrawable(new NinePatch(
texture,
size,
size,
size,
size
));
}

@Override
public void lazyInitOnGameCreateStage2() {
{
Expand All @@ -48,6 +61,8 @@ public void lazyInitOnGameCreateStage2() {
tableType1Drawable = quickTableNinePatchDrawable(new Texture(Gdx.files.internal("table.9.png")));
tableType2Drawable = quickTableNinePatchDrawable(new Texture(Gdx.files.internal("table_2.png")));
tableType3Drawable = quickTableNinePatchDrawable(new Texture(Gdx.files.internal("table_3.png")));
questionMarkTableDrawable = quickTableNinePatchDrawable(new Texture(Gdx.files.internal("table_4.png")), 4);
tableType5Drawable = quickTableNinePatchDrawable(new Texture(Gdx.files.internal("table_5.png")), 4);

defaultBoardNinePatchTexture = new Texture(Gdx.files.internal("table.9.png"));
defaultBoardNinePatchDrawable = quickTableNinePatchDrawable(defaultBoardNinePatchTexture);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package hundun.gdxgame.idlemushroom.logic;

public class MushroomAchievementId {
public static final String STEP_1 = "ENUM_ACHI@STEP_1";
public static final String STEP_2 = "ENUM_ACHI@STEP_2";
public static final String STEP_3 = "ENUM_ACHI@STEP_3";
public static final String STEP_4 = "ENUM_ACHI@STEP_4";
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hundun.gdxgame.idledemo.logic;
package hundun.gdxgame.idlemushroom.logic;
/**
* @author hundun
* Created on 2021/11/05
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package hundun.gdxgame.idledemo.logic;
package hundun.gdxgame.idlemushroom.logic;


import hundun.gdxgame.gamelib.starter.save.IRootSaveExtension;
import hundun.gdxgame.idleshare.gamelib.framework.data.GameplaySaveData;
import hundun.gdxgame.idleshare.gamelib.framework.data.SystemSettingSaveData;
import hundun.gdxgame.idleshare.gamelib.framework.util.text.Language;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand Down
Loading

0 comments on commit 630ee8c

Please sign in to comment.