-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update UI; add DemoConstructionPrototypeId.EPOCH_COUNTER
- Loading branch information
Showing
16 changed files
with
568 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...ame/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/EpochCounterPrototype.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package hundun.gdxgame.idledemo.logic.prototype; | ||
|
||
import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; | ||
import hundun.gdxgame.idledemo.logic.DemoBuiltinConstructionsLoader; | ||
import hundun.gdxgame.idledemo.logic.DemoConstructionPrototypeId; | ||
import hundun.gdxgame.idledemo.logic.construction.BaseIdleDemoConstruction; | ||
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; | ||
import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.DescriptionPackageFactory; | ||
import hundun.gdxgame.idleshare.gamelib.framework.model.construction.starter.ConstProficiencyComponent; | ||
import hundun.gdxgame.idleshare.gamelib.framework.model.construction.starter.SimpleAutoOutputComponent; | ||
import hundun.gdxgame.idleshare.gamelib.framework.model.grid.GridPosition; | ||
import hundun.gdxgame.idleshare.gamelib.framework.util.text.Language; | ||
|
||
import java.util.UUID; | ||
|
||
public class EpochCounterPrototype extends AbstractConstructionPrototype { | ||
public static DescriptionPackage descriptionPackageEN = DescriptionPackage.builder() | ||
.levelDescriptionProvider(DescriptionPackageFactory.NO_LEVEL_IMP) | ||
.proficiencyDescriptionProvider(DescriptionPackageFactory.EN_PROFICIENCY_IMP) | ||
.build(); | ||
|
||
|
||
public static DescriptionPackage descriptionPackageCN = DescriptionPackage.builder() | ||
.levelDescriptionProvider(DescriptionPackageFactory.CN_NO_LEVEL_IMP) | ||
.proficiencyDescriptionProvider(DescriptionPackageFactory.CN_PROFICIENCY_IMP) | ||
.build(); | ||
|
||
public EpochCounterPrototype(Language language) { | ||
super( | ||
DemoConstructionPrototypeId.EPOCH_COUNTER, | ||
language, | ||
DemoBuiltinConstructionsLoader.toPack(JavaFeatureForGwt.mapOf()) | ||
); | ||
switch (language) | ||
{ | ||
case CN: | ||
this.descriptionPackage = descriptionPackageCN; | ||
break; | ||
default: | ||
this.descriptionPackage = descriptionPackageEN; | ||
break; | ||
} | ||
|
||
} | ||
|
||
@Override | ||
public BaseConstruction getInstance(GridPosition position) { | ||
String id = prototypeId + "_" + UUID.randomUUID().toString(); | ||
|
||
BaseIdleDemoConstruction thiz = new BaseIdleDemoConstruction(prototypeId, id, position, descriptionPackage); | ||
|
||
ConstProficiencyComponent proficiencyComponent = new ConstProficiencyComponent(thiz); | ||
thiz.setProficiencyComponent(proficiencyComponent); | ||
|
||
SimpleAutoOutputComponent outputComponent = new SimpleAutoOutputComponent(thiz); | ||
thiz.setOutputComponent(outputComponent); | ||
|
||
return thiz; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.