diff --git a/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoGameDictionary.java b/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoGameDictionary.java index 21cc7c2..15052cb 100644 --- a/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoGameDictionary.java +++ b/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/logic/DemoGameDictionary.java @@ -115,17 +115,6 @@ public List getAchievementTexts(Language language) } } - @Override - public List getPlayScreenTexts(Language language) - { - switch (language) - { - case CN: - return JavaFeatureForGwt.arraysAsList("购买", "购买费用"); - default: - return JavaFeatureForGwt.arraysAsList("Build", "Build cost"); - } - } @Override public List getStageSelectMaskBoardTexts(Language language) diff --git a/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/CookieComplexAutoProviderPrototype.java b/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/CookieComplexAutoProviderPrototype.java index 7abd307..b7f6a5d 100644 --- a/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/CookieComplexAutoProviderPrototype.java +++ b/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/logic/prototype/CookieComplexAutoProviderPrototype.java @@ -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; diff --git a/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/ui/achievement/AllAchievementBoardVM.java b/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/ui/achievement/AllAchievementBoardVM.java index 920223a..7a455b8 100644 --- a/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/ui/achievement/AllAchievementBoardVM.java +++ b/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/ui/achievement/AllAchievementBoardVM.java @@ -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 constructionView = new OneAchievementNodeVM<>(parent, it); nodes.add(constructionView); diff --git a/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/HexAreaVM.java b/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/HexAreaVM.java index f27d883..a1c5d68 100644 --- a/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/HexAreaVM.java +++ b/IdleDemo-game/core/src/main/java/hundun/gdxgame/idledemo/ui/world/HexAreaVM.java @@ -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(); } diff --git a/IdleMushroom-game/core/assets/bg_shroom.png b/IdleMushroom-game/core/assets/bg_shroom.png new file mode 100644 index 0000000..886aac6 Binary files /dev/null and b/IdleMushroom-game/core/assets/bg_shroom.png differ diff --git a/IdleMushroom-game/core/assets/main.png b/IdleMushroom-game/core/assets/main.png new file mode 100644 index 0000000..ff7b158 Binary files /dev/null and b/IdleMushroom-game/core/assets/main.png differ diff --git a/IdleMushroom-game/core/assets/mainCokie.png b/IdleMushroom-game/core/assets/mainCokie.png deleted file mode 100644 index 73c552d..0000000 Binary files a/IdleMushroom-game/core/assets/mainCokie.png and /dev/null differ diff --git a/IdleMushroom-game/core/assets/raw/main.psd b/IdleMushroom-game/core/assets/raw/main.psd new file mode 100644 index 0000000..7dd6f05 Binary files /dev/null and b/IdleMushroom-game/core/assets/raw/main.psd differ 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/tiles.psd similarity index 100% rename from "IdleMushroom-game/core/assets/raw/\346\234\252\346\240\207\351\242\230-1.psd" rename to IdleMushroom-game/core/assets/raw/tiles.psd diff --git a/IdleMushroom-game/core/assets/skins/IdleMushroom/IdleMushroom.json b/IdleMushroom-game/core/assets/skins/IdleMushroom/IdleMushroom.json index bea9a73..44517b8 100644 --- a/IdleMushroom-game/core/assets/skins/IdleMushroom/IdleMushroom.json +++ b/IdleMushroom-game/core/assets/skins/IdleMushroom/IdleMushroom.json @@ -64,7 +64,7 @@ "hinting": "AutoMedium", "minFilter": "Nearest", "magFilter": "Nearest", - "characters": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\"!`?'.,;:()[]{}<>|/@\\^$€-%+=#_&~*啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利僳例俐痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃汀廷停亭庭艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座\r\n" + "characters": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\"!`?'.,;:()[]{}<>|/@\\^$€-%+=#_&~*█▓▁•◎○●()。,:“”【】?!啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱拣捡简俭剪减荐槛鉴践贱见键箭件健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利僳例俐痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃汀廷停亭庭艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座\r\n" } }, "com.badlogic.gdx.scenes.scene2d.ui.Skin$TintedDrawable": { diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/IdleMushroomChildGameConfig.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/IdleMushroomChildGameConfig.java index 4a57fcd..67842cb 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/IdleMushroomChildGameConfig.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/IdleMushroomChildGameConfig.java @@ -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; @@ -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() ); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/IdleMushroomGame.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/IdleMushroomGame.java index 605e3e8..222eaa3 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/IdleMushroomGame.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/IdleMushroomGame.java @@ -26,7 +26,10 @@ public class IdleMushroomGame extends BaseIdleGame { protected AbstractIdleScreenContext screenContext; @Getter - protected IdleMushroomTextureManager idleMushroomTextureManager; + private final IdleMushroomTextureManager idleMushroomTextureManager; + private final IdleMushroomScreenContext idleMushroomScreenContext; + @Getter + private final IdleMushroomGameDictionary idleMushroomGameDictionary; public static Map epochConfigMap; static { @@ -37,34 +40,34 @@ public class IdleMushroomGame extends BaseIdleGame { 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() @@ -74,7 +77,7 @@ public class IdleMushroomGame extends BaseIdleGame { public IdleMushroomGame(ISaveTool saveTool) { super(960, 640); - this.debugMode = true; + this.debugMode = false; this.sharedViewport = new ScreenViewport(); this.textFormatTool = new TextFormatTool(); @@ -82,10 +85,11 @@ public IdleMushroomGame(ISaveTool 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, @@ -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, @@ -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()); + } } }); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoAchievementLoader.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoAchievementLoader.java index 0fe3617..53fa00f 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoAchievementLoader.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoAchievementLoader.java @@ -50,7 +50,7 @@ public Map 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) @@ -60,7 +60,7 @@ public Map 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) @@ -70,7 +70,7 @@ public Map 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) @@ -80,7 +80,7 @@ public Map 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) diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoBuiltinConstructionsLoader.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoBuiltinConstructionsLoader.java index aaebd52..2e75a25 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoBuiltinConstructionsLoader.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoBuiltinConstructionsLoader.java @@ -23,48 +23,48 @@ public Map getProviderMap(Language langua RootEpochConfig epochConfig2 = IdleMushroomGame.epochConfigMap.get(2); RootEpochConfig epochConfig3 = IdleMushroomGame.epochConfigMap.get(3); Map 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; } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoGameDictionary.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoGameDictionary.java deleted file mode 100644 index 06e34c0..0000000 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoGameDictionary.java +++ /dev/null @@ -1,132 +0,0 @@ -package hundun.gdxgame.idlemushroom.logic; - -import java.util.List; -import java.util.Map; - -import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; -import hundun.gdxgame.idleshare.gamelib.framework.util.text.IGameDictionary; -import hundun.gdxgame.idleshare.gamelib.framework.util.text.Language; - -/** - * @author hundun - * Created on 2021/11/22 - */ -public class DemoGameDictionary implements IGameDictionary { - - - public String constructionPrototypeIdToShowName(Language language, String constructionId) { - switch (language) { - default: - switch (constructionId) { - - 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 "[dic lost]"; - } - } - - - } - - @Override - public String constructionPrototypeIdToDetailDescriptionConstPart(Language language, String constructionId) { - switch (language) { - default: - switch (constructionId) { - 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: - return "空位置"; - case DemoConstructionPrototypeId.EPOCH_COUNTER: - return "the EPOCH_COUNTER"; - default: - return "[dic lost]"; - } - } - - - } - - @Override - public List getMenuScreenTexts(Language language) { - switch (language) { - case CN: - return JavaFeatureForGwt.arraysAsList("Idle样例", "新游戏", "继续游戏", "语言", "重启后生效"); - default: - return JavaFeatureForGwt.arraysAsList("IdleDemo", "New Game", "Continue", "Language", "Take effect after restart"); - } - } - - @Override - public Map getLanguageShowNameMap() { - return JavaFeatureForGwt.mapOf( - Language.CN, "中文", - Language.EN, "English" - ); - } - - @Override - public List getAchievementTexts(Language language) - { - switch (language) - { - case CN: - return JavaFeatureForGwt.listOf( - "当前任务:", "已完成:", "回到游戏", "奖励内容:", "领取", - "无" - ); - default: - return JavaFeatureForGwt.listOf( - "Quest: ", "Completed: ", "back", "reward: ", "Get it", - "None" - ); - } - } - - @Override - public List getPlayScreenTexts(Language language) - { - switch (language) - { - case CN: - return JavaFeatureForGwt.arraysAsList("购买", "购买费用"); - default: - return JavaFeatureForGwt.arraysAsList("Build", "Build cost"); - } - } - - @Override - public List getStageSelectMaskBoardTexts(Language language) - { - switch (language) - { - case CN: - return JavaFeatureForGwt.arraysAsList("返回", "关卡1", "关卡2", "关卡3"); - default: - return JavaFeatureForGwt.arraysAsList("Back", "Stage1", "Stage2", "Stage3"); - } - } -} diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoSaveHandler.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoSaveHandler.java index b8c5dfe..04d71fa 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoSaveHandler.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoSaveHandler.java @@ -32,9 +32,9 @@ protected RootSaveData genereateStarterRootSaveData() { GridPosition uselessPosition = new GridPosition(0, 0); GridPosition providerPosition = new GridPosition(1, 1); List worldGridPositions = new ArrayList<>(); - int size = 5; - for (int i = 0; i < size; i++) { - for (int j = 0; j < size; j++) { + int size = 6; + for (int i = - size / 2 ; i < size / 2; i++) { + for (int j = - size / 2; j < size / 2; j++) { GridPosition emptyPosition = new GridPosition(i, j); if (!emptyPosition.equals(providerPosition)) { worldGridPositions.add(emptyPosition); @@ -42,36 +42,36 @@ protected RootSaveData genereateStarterRootSaveData() { } } map.put( - DemoConstructionPrototypeId.MAIN_MUSHROOM + "_" + SINGLETON, + IdleMushroomConstructionPrototypeId.MAIN_MUSHROOM + "_" + SINGLETON, ConstructionSaveData.builder() - .prototypeId(DemoConstructionPrototypeId.MAIN_MUSHROOM) - .level(0) - .workingLevel(0) + .prototypeId(IdleMushroomConstructionPrototypeId.MAIN_MUSHROOM) + .level(1) + .workingLevel(1) .position(uselessPosition) .build() ); map.put( - DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER + "_" + SINGLETON, + IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER + "_" + SINGLETON, ConstructionSaveData.builder() - .prototypeId(DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER) + .prototypeId(IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER) .level(1) .workingLevel(0) .position(uselessPosition) .build() ); map.put( - DemoConstructionPrototypeId.EPOCH_COUNTER + "_" + SINGLETON, + IdleMushroomConstructionPrototypeId.EPOCH_COUNTER + "_" + SINGLETON, ConstructionSaveData.builder() - .prototypeId(DemoConstructionPrototypeId.EPOCH_COUNTER) + .prototypeId(IdleMushroomConstructionPrototypeId.EPOCH_COUNTER) .level(1) .workingLevel(1) .position(uselessPosition) .build() ); map.put( - DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER + "_" + UUID.randomUUID(), + IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER + "_" + UUID.randomUUID(), ConstructionSaveData.builder() - .prototypeId(DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER) + .prototypeId(IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER) .level(1) .workingLevel(1) .position(providerPosition) @@ -83,9 +83,9 @@ protected RootSaveData genereateStarterRootSaveData() { double rand = Math.random(); if (rand > 0.3) { map.put( - DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL + "_" + UUID.randomUUID(), + IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL + "_" + UUID.randomUUID(), ConstructionSaveData.builder() - .prototypeId(DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL) + .prototypeId(IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL) .level(0) .workingLevel(0) .position(it) @@ -93,9 +93,9 @@ protected RootSaveData genereateStarterRootSaveData() { ); } else { map.put( - DemoConstructionPrototypeId.EPOCH_1_TREE + "_" + UUID.randomUUID(), + IdleMushroomConstructionPrototypeId.EPOCH_1_TREE + "_" + UUID.randomUUID(), ConstructionSaveData.builder() - .prototypeId(DemoConstructionPrototypeId.EPOCH_1_TREE) + .prototypeId(IdleMushroomConstructionPrototypeId.EPOCH_1_TREE) .level(0) .workingLevel(0) .position(it) @@ -106,8 +106,8 @@ protected RootSaveData genereateStarterRootSaveData() { }); Map ownResources = new HashMap<>(); - ownResources.put(ResourceType.MUSHROOM, 500L); - ownResources.put(ResourceType.DNA_POINT, 500L); + ownResources.put(ResourceType.MUSHROOM, 5000L); + ownResources.put(ResourceType.DNA_POINT, 5000L); return RootSaveData.builder() .gameplaySave(GameplaySaveData.builder() diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoConstructionPrototypeId.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomConstructionPrototypeId.java similarity index 95% rename from IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoConstructionPrototypeId.java rename to IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomConstructionPrototypeId.java index 166197f..4114947 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/DemoConstructionPrototypeId.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomConstructionPrototypeId.java @@ -3,7 +3,7 @@ -public class DemoConstructionPrototypeId { +public class IdleMushroomConstructionPrototypeId { public static final String EPOCH_1_MUSHROOM_AUTO_PROVIDER = "ENUM_CSTR@EPOCH_1_MUSHROOM_AUTO_PROVIDER"; public static final String EPOCH_2_MUSHROOM_AUTO_PROVIDER = "ENUM_CSTR@EPOCH_2_MUSHROOM_AUTO_PROVIDER"; diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomGameDictionary.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomGameDictionary.java new file mode 100644 index 0000000..d66c214 --- /dev/null +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomGameDictionary.java @@ -0,0 +1,140 @@ +package hundun.gdxgame.idlemushroom.logic; + +import java.util.List; +import java.util.Map; + +import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; +import hundun.gdxgame.idleshare.gamelib.framework.model.manager.AchievementManager.AchievementState; +import hundun.gdxgame.idleshare.gamelib.framework.util.text.IGameDictionary; +import hundun.gdxgame.idleshare.gamelib.framework.util.text.Language; + +/** + * @author hundun + * Created on 2021/11/22 + */ +public class IdleMushroomGameDictionary implements IGameDictionary { + + + public String constructionPrototypeIdToShowName(Language language, String constructionId) { + switch (language) { + default: + switch (constructionId) { + + case IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: + case IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: + case IdleMushroomConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER: + return "蘑菇地块"; + case IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL: + case IdleMushroomConstructionPrototypeId.EPOCH_2_EMPTY_CELL: + case IdleMushroomConstructionPrototypeId.EPOCH_3_EMPTY_CELL: + return "空地块"; + case IdleMushroomConstructionPrototypeId.EPOCH_1_TREE: + case IdleMushroomConstructionPrototypeId.EPOCH_2_TREE: + case IdleMushroomConstructionPrototypeId.EPOCH_3_TREE: + return "树木地块"; + case IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER: + return "科研中心"; + case IdleMushroomConstructionPrototypeId.EPOCH_COUNTER: + return "巨大化"; + default: + return "[dic lost]"; + } + } + + + } + + @Override + public String constructionPrototypeIdToDetailDescriptionConstPart(Language language, String constructionId) { + switch (language) { + default: + switch (constructionId) { + case IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: + case IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: + case IdleMushroomConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER: + return constructionPrototypeIdToShowName(language, constructionId) + ":\n" + + "•定时生产蘑菇资源。\n" + + "•成长度满时可以升级,升级后成长度重置。\n" + + "•成长速度与周围地块有关,树木有利于成长,存在其他蘑菇地块不利于成长。"; + case IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL: + return constructionPrototypeIdToShowName(language, constructionId) + ":\n" + + "•可转变为其他地块。"; + case IdleMushroomConstructionPrototypeId.EPOCH_1_TREE: + case IdleMushroomConstructionPrototypeId.EPOCH_2_TREE: + case IdleMushroomConstructionPrototypeId.EPOCH_3_TREE: + return constructionPrototypeIdToShowName(language, constructionId) + ":\n" + + "•利于周围蘑菇地块的成长。"; + case IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER: + return constructionPrototypeIdToShowName(language, constructionId) + ":\n" + + "•定时消耗蘑菇资源,生产基因点数。\n" + + "•可以调整启用的等级。"; + case IdleMushroomConstructionPrototypeId.EPOCH_COUNTER: + return constructionPrototypeIdToShowName(language, constructionId) + ":\n" + + "•可消耗基因点数,进行一次巨大化。\n" + + "•巨大化时你将失去所有原有蘑菇地块(因为他们相对而言已经太小了)。"; + default: + return "[dic lost]"; + } + } + + + } + + @Override + public List getMenuScreenTexts(Language language) { + switch (language) { + case CN: + return JavaFeatureForGwt.arraysAsList("Idle样例", "新游戏", "继续游戏", "语言", "重启后生效"); + default: + return JavaFeatureForGwt.arraysAsList("IdleDemo", "New Game", "Continue", "Language", "Take effect after restart"); + } + } + + @Override + public Map getLanguageShowNameMap() { + return JavaFeatureForGwt.mapOf( + Language.CN, "中文", + Language.EN, "English" + ); + } + + @Override + public List getAchievementTexts(Language language) + { + switch (language) + { + case CN: + return JavaFeatureForGwt.listOf( + "当前任务:", "状态:", "回到游戏", "奖励内容:", "领取", + "无" + ); + default: + return JavaFeatureForGwt.listOf( + "Quest: ", "status: ", "back", "reward: ", "Get it", + "None" + ); + } + } + + @Override + public List getStageSelectMaskBoardTexts(Language language) + { + return null; + } + + public String achievementStatus(Language language, AchievementState state) { + switch (language) { + default: + switch (state) { + case LOCKED: + return "未解锁"; + case RUNNING: + return "进行中"; + case COMPLETED: + return "已完成"; + default: + return "[dic lost]"; + } + } + } +} diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomTextureManager.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomTextureManager.java index 2ac933c..f7a7aea 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomTextureManager.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/IdleMushroomTextureManager.java @@ -68,8 +68,8 @@ public void lazyInitOnGameCreateStage2() { defaultBoardNinePatchDrawable = quickTableNinePatchDrawable(defaultBoardNinePatchTexture); { - Texture texture = new Texture(Gdx.files.internal("mainCokie.png")); - mainClickAnimationTextureAtlas = TextureRegion.split(texture, 256, 256); + Texture texture = new Texture(Gdx.files.internal("main.png")); + mainClickAnimationTextureAtlas = TextureRegion.split(texture, 128, 128); } defaultBoardNinePatchEdgeSize = 4; defaultBoardNinePatchMiddle = new TextureRegion( @@ -111,11 +111,11 @@ public void lazyInitOnGameCreateStage2() { //gameAreaRightPartRegionMap.put(GameArea.AREA_WIN, regions[2][1]); } { - Texture texture = new Texture(Gdx.files.internal("areas.png")); - TextureRegion[][] regions = TextureRegion.split(texture, 640, 480); - defaultAreaBack = regions[0][0]; - gameAreaBackMap.put(DemoScreenId.SCREEN_MAIN, regions[0][1]); - gameAreaBackMap.put(DemoScreenId.SCREEN_WORLD, regions[0][2]); + Texture texture = new Texture(Gdx.files.internal("bg_shroom.png")); + //TextureRegion[][] regions = TextureRegion.split(texture, 640, 480); + defaultAreaBack = new TextureRegion(texture); + gameAreaBackMap.put(DemoScreenId.SCREEN_MAIN, defaultAreaBack); + gameAreaBackMap.put(DemoScreenId.SCREEN_WORLD, defaultAreaBack); //gameAreaBackMap.put(GameArea.AREA_WIN, regions[0][3]); } { @@ -123,15 +123,15 @@ public void lazyInitOnGameCreateStage2() { TextureRegion[][] regions = TextureRegion.split(texture, 32, 48); constructionHexHighLightImage1 = regions[0][0]; constructionHexHighLightImage2 = regions[0][1]; - constructionHexImageMap.put(DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL, regions[0][2]); - constructionHexImageMap.put(DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL, regions[0][2]); - constructionHexImageMap.put(DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL, regions[0][3]); - constructionHexImageMap.put(DemoConstructionPrototypeId.EPOCH_1_TREE, regions[0][4]); - constructionHexImageMap.put(DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER, regions[0][5]); - constructionHexImageMap.put(DemoConstructionPrototypeId.EPOCH_2_TREE, regions[0][6]); - constructionHexImageMap.put(DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER, regions[0][7]); - constructionHexImageMap.put(DemoConstructionPrototypeId.EPOCH_3_TREE, regions[0][8]); - constructionHexImageMap.put(DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER, regions[0][9]); + constructionHexImageMap.put(IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL, regions[0][2]); + constructionHexImageMap.put(IdleMushroomConstructionPrototypeId.EPOCH_2_EMPTY_CELL, regions[0][2]); + constructionHexImageMap.put(IdleMushroomConstructionPrototypeId.EPOCH_3_EMPTY_CELL, regions[0][3]); + constructionHexImageMap.put(IdleMushroomConstructionPrototypeId.EPOCH_1_TREE, regions[0][4]); + constructionHexImageMap.put(IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER, regions[0][5]); + constructionHexImageMap.put(IdleMushroomConstructionPrototypeId.EPOCH_2_TREE, regions[0][6]); + constructionHexImageMap.put(IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER, regions[0][7]); + constructionHexImageMap.put(IdleMushroomConstructionPrototypeId.EPOCH_3_TREE, regions[0][8]); + constructionHexImageMap.put(IdleMushroomConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER, regions[0][9]); //gameAreaBackMap.put(GameArea.AREA_WIN, regions[0][3]); } } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/AutoProviderPrototype.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/AutoProviderPrototype.java index 7ff5a30..484f1e5 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/AutoProviderPrototype.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/AutoProviderPrototype.java @@ -2,7 +2,7 @@ import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; import hundun.gdxgame.idlemushroom.IdleMushroomGame.RootEpochConfig; -import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.logic.DemoBuiltinConstructionsLoader; import hundun.gdxgame.idlemushroom.logic.ResourceType; import hundun.gdxgame.idlemushroom.logic.construction.BaseIdleDemoConstruction; @@ -10,6 +10,7 @@ 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.DescriptionPackage.IProficiencyDescroptionProvider; 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.grid.GridPosition; @@ -19,6 +20,14 @@ import java.util.UUID; public class AutoProviderPrototype extends AbstractConstructionPrototype { + + public static IProficiencyDescroptionProvider CN_PROFICIENCY_IMP = (proficiency, reachMaxProficiency) -> { + return "成长度:" + proficiency; + }; + + public static IProficiencyDescroptionProvider EN_PROFICIENCY_IMP = (proficiency, reachMaxProficiency) -> { + return "Growth: " + proficiency; + }; public static DescriptionPackage descriptionPackageEN = DescriptionPackage.builder() .upgradeButtonText("Upgrade") .outputCostDescriptionStart("Consume") @@ -26,18 +35,18 @@ public class AutoProviderPrototype extends AbstractConstructionPrototype { .upgradeCostDescriptionStart("Upgrade cost") .upgradeMaxLevelDescription("(max)") .levelDescriptionProvider(DescriptionPackageFactory.ONLY_LEVEL_IMP) - .proficiencyDescriptionProvider(DescriptionPackageFactory.EN_PROFICIENCY_IMP) + .proficiencyDescriptionProvider(AutoProviderPrototype.EN_PROFICIENCY_IMP) .build(); public static DescriptionPackage descriptionPackageCN = DescriptionPackage.builder() .upgradeButtonText("升级") - .outputCostDescriptionStart("自动消耗") - .outputGainDescriptionStart("自动产出") + .outputCostDescriptionStart("消耗") + .outputGainDescriptionStart("产出") .upgradeCostDescriptionStart("升级费用") .upgradeMaxLevelDescription("(已达到最大等级)") .levelDescriptionProvider(DescriptionPackageFactory.ONLY_LEVEL_IMP) - .proficiencyDescriptionProvider(DescriptionPackageFactory.CN_PROFICIENCY_IMP) + .proficiencyDescriptionProvider(AutoProviderPrototype.CN_PROFICIENCY_IMP) .build(); @@ -91,7 +100,7 @@ public static class AutoProviderProficiencyComponent extends BaseAutoProficiency public AutoProviderProficiencyComponent( BaseConstruction construction ) { - super(construction, 1, 0); + super(construction, 1, 100); } @Override @@ -100,8 +109,8 @@ protected void tryProficiencyOnce() { .map(it -> (BaseConstruction)it) .filter(it -> it != null && ( - it.getSaveData().prototypeId.equals(DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER) - || it.getSaveData().prototypeId.equals(DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER) + it.getSaveData().prototypeId.equals(IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER) + || it.getSaveData().prototypeId.equals(IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER) ) ) .count(); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/AutoSellerPrototype.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/AutoSellerPrototype.java index 0f92d54..66f5350 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/AutoSellerPrototype.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/AutoSellerPrototype.java @@ -1,7 +1,7 @@ package hundun.gdxgame.idlemushroom.logic.prototype; import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; -import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.logic.DemoBuiltinConstructionsLoader; import hundun.gdxgame.idlemushroom.logic.ResourceType; import hundun.gdxgame.idlemushroom.logic.construction.BaseIdleDemoConstruction; @@ -41,7 +41,7 @@ public class AutoSellerPrototype extends AbstractConstructionPrototype { public AutoSellerPrototype(Language language) { super( - DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER, + IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER, language ); switch (language) @@ -71,11 +71,11 @@ public BaseConstruction getInstance(GridPosition position) { ResourceType.MUSHROOM, 1 ))); construction.getOutputComponent().setOutputGainPack(DemoBuiltinConstructionsLoader.toPack(JavaFeatureForGwt.mapOf( - ResourceType.DNA_POINT, 5 + ResourceType.DNA_POINT, 2 ))); construction.getUpgradeComponent().setUpgradeCostPack(DemoBuiltinConstructionsLoader.toPack(JavaFeatureForGwt.mapOf( - ResourceType.DNA_POINT, 50 + ResourceType.MUSHROOM, 50 ))); construction.getLevelComponent().setTypeWorkingLevelChangeable(true); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/DirtPrototype.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/DirtPrototype.java index 789aa3e..619d192 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/DirtPrototype.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/DirtPrototype.java @@ -1,7 +1,7 @@ package hundun.gdxgame.idlemushroom.logic.prototype; import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; -import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.logic.DemoBuiltinConstructionsLoader; import hundun.gdxgame.idlemushroom.logic.ResourceType; import hundun.gdxgame.idlemushroom.logic.construction.BaseIdleDemoConstruction; @@ -20,14 +20,18 @@ public class DirtPrototype extends AbstractConstructionPrototype { public static DescriptionPackage descriptionPackageEN = DescriptionPackage.builder() .levelDescriptionProvider(DescriptionPackageFactory.NO_LEVEL_IMP) - .transformCostDescriptionStart("buy candidate: ") + .transformButtonText("Transform") + .transformCostDescriptionStart("Transform Cost: ") + .extraTexts(JavaFeatureForGwt.listOf("Transform Candidate: ")) .proficiencyDescriptionProvider(DescriptionPackageFactory.EN_PROFICIENCY_IMP) .build(); public static DescriptionPackage descriptionPackageCN = DescriptionPackage.builder() .levelDescriptionProvider(DescriptionPackageFactory.CN_NO_LEVEL_IMP) - .transformCostDescriptionStart("可购买:") + .transformButtonText("转变") + .transformCostDescriptionStart("转变费用: ") + .extraTexts(JavaFeatureForGwt.listOf("可转变:")) .proficiencyDescriptionProvider(DescriptionPackageFactory.CN_PROFICIENCY_IMP) .build(); @@ -62,30 +66,30 @@ public BaseConstruction getInstance(GridPosition position) { switch (prototypeId) { - case DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL: + case IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL: thiz.getExistenceComponent().setBuyCandidateConfigs(JavaFeatureForGwt.listOf( ConstructionBuyCandidateConfig.builder() - .prototypeId(DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER) + .prototypeId(IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER) .buyCostPack(DemoBuiltinConstructionsLoader.toPack(JavaFeatureForGwt.mapOf( ResourceType.MUSHROOM, 50 ))) .build() )); break; - case DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL: + case IdleMushroomConstructionPrototypeId.EPOCH_2_EMPTY_CELL: thiz.getExistenceComponent().setBuyCandidateConfigs(JavaFeatureForGwt.listOf( ConstructionBuyCandidateConfig.builder() - .prototypeId(DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER) + .prototypeId(IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER) .buyCostPack(DemoBuiltinConstructionsLoader.toPack(JavaFeatureForGwt.mapOf( ResourceType.MUSHROOM, 50 ))) .build() )); break; - case DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL: + case IdleMushroomConstructionPrototypeId.EPOCH_3_EMPTY_CELL: thiz.getExistenceComponent().setBuyCandidateConfigs(JavaFeatureForGwt.listOf( ConstructionBuyCandidateConfig.builder() - .prototypeId(DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER) + .prototypeId(IdleMushroomConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER) .buyCostPack(DemoBuiltinConstructionsLoader.toPack(JavaFeatureForGwt.mapOf( ResourceType.MUSHROOM, 50 ))) diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/EpochCounterPrototype.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/EpochCounterPrototype.java index abd1140..24c70ee 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/EpochCounterPrototype.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/EpochCounterPrototype.java @@ -2,7 +2,7 @@ import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; import hundun.gdxgame.idlemushroom.logic.DemoBuiltinConstructionsLoader; -import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.logic.ResourceType; import hundun.gdxgame.idlemushroom.logic.construction.BaseIdleDemoConstruction; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.AbstractConstructionPrototype; @@ -21,7 +21,7 @@ public class EpochCounterPrototype extends AbstractConstructionPrototype { .upgradeButtonText("Upgrade") .upgradeCostDescriptionStart("Upgrade cost") .upgradeMaxLevelDescription("(max)") - .levelDescriptionProvider(DescriptionPackageFactory.WORKING_LEVEL_IMP) + .levelDescriptionProvider(DescriptionPackageFactory.ONLY_LEVEL_IMP) .proficiencyDescriptionProvider(DescriptionPackageFactory.EN_PROFICIENCY_IMP) .build(); @@ -30,13 +30,13 @@ public class EpochCounterPrototype extends AbstractConstructionPrototype { .upgradeButtonText("升级") .upgradeCostDescriptionStart("升级费用") .upgradeMaxLevelDescription("(已达到最大等级)") - .levelDescriptionProvider(DescriptionPackageFactory.CN_WORKING_LEVEL_IMP) + .levelDescriptionProvider(DescriptionPackageFactory.ONLY_LEVEL_IMP) .proficiencyDescriptionProvider(DescriptionPackageFactory.CN_PROFICIENCY_IMP) .build(); public EpochCounterPrototype(Language language) { super( - DemoConstructionPrototypeId.EPOCH_COUNTER, + IdleMushroomConstructionPrototypeId.EPOCH_COUNTER, language ); switch (language) diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/MainMushroomPrototype.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/MainMushroomPrototype.java index 60e33cd..77f0591 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/MainMushroomPrototype.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/logic/prototype/MainMushroomPrototype.java @@ -1,7 +1,7 @@ package hundun.gdxgame.idlemushroom.logic.prototype; import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; -import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.logic.DemoBuiltinConstructionsLoader; import hundun.gdxgame.idlemushroom.logic.ResourceType; import hundun.gdxgame.idlemushroom.logic.construction.BaseIdleDemoConstruction; @@ -19,19 +19,21 @@ public class MainMushroomPrototype extends AbstractConstructionPrototype { public static DescriptionPackage descriptionPackageEN = DescriptionPackage.builder() + .outputGainDescriptionStart("click gain: ") .levelDescriptionProvider(DescriptionPackageFactory.NO_LEVEL_IMP) .proficiencyDescriptionProvider(DescriptionPackageFactory.EN_PROFICIENCY_IMP) .build(); public static DescriptionPackage descriptionPackageCN = DescriptionPackage.builder() + .outputGainDescriptionStart("点击获得:") .levelDescriptionProvider(DescriptionPackageFactory.CN_NO_LEVEL_IMP) .proficiencyDescriptionProvider(DescriptionPackageFactory.CN_PROFICIENCY_IMP) .build(); public MainMushroomPrototype(Language language) { super( - DemoConstructionPrototypeId.MAIN_MUSHROOM, + IdleMushroomConstructionPrototypeId.MAIN_MUSHROOM, language ); switch (language) @@ -63,6 +65,9 @@ public BaseConstruction getInstance(GridPosition position) { ResourceType.MUSHROOM, 1 ))); + construction.getUpgradeComponent().setUpgradeCostPack(DemoBuiltinConstructionsLoader.toPack(new HashMap<>())); + construction.getLevelComponent().maxLevel = 3; + return construction; } } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/achievement/AllAchievementBoardVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/achievement/AllAchievementBoardVM.java index c4ac45e..8e8c99e 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/achievement/AllAchievementBoardVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/achievement/AllAchievementBoardVM.java @@ -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 constructionView = new OneAchievementNodeVM(parent, it, true); nodes.add(constructionView); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/achievement/OneAchievementNodeVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/achievement/OneAchievementNodeVM.java index 6d2bcd9..d890a28 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/achievement/OneAchievementNodeVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/achievement/OneAchievementNodeVM.java @@ -83,10 +83,12 @@ public void updateData() { { nameValueLabel.setText(achievementAndStatus.getAchievement().getName()); descriptionLabel.setText(achievementAndStatus.getAchievement().getDescription()); - countValueLabel.setText(JavaFeatureForGwt.stringFormat( - "state:%s", - achievementAndStatus.getSaveData().getState() - )); + countValueLabel.setText( + parent.getGame().getIdleMushroomGameDictionary().achievementStatus( + parent.getGame().getIdleGameplayExport().getLanguage(), + achievementAndStatus.getSaveData().getState() + ) + ); } else { diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/FirstRunningAchievementBoardVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/FirstRunningAchievementBoardVM.java index 7120c13..5caa043 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/FirstRunningAchievementBoardVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/FirstRunningAchievementBoardVM.java @@ -37,7 +37,7 @@ public FirstRunningAchievementBoardVM(BaseIdleMushroomScreen parent) this.node = new OneAchievementNodeVM(parent, null, false); - this.add(node); + this.add(node).grow(); updateData(); } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/GameEntityFactory.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/GameEntityFactory.java index a2edee1..89b296e 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/GameEntityFactory.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/GameEntityFactory.java @@ -1,6 +1,6 @@ package hundun.gdxgame.idlemushroom.ui.main; -import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.logic.ResourceType; import hundun.gdxgame.idlemushroom.ui.screen.MainPlayScreen; import hundun.gdxgame.idleshare.core.framework.model.entity.BaseGameEntityFactory; @@ -25,7 +25,7 @@ public GameEntityFactory(PlayScreenLayoutConst layoutConst, MainPlayScreen paren public GameEntity newConstructionEntity(String id, int index) { switch (id) { - case DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: + case IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: return this.rowStableConstructionEntity(id, index, 1); default: // no need GameEntity diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/MainScreenConstructionControlBoard.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/MainScreenConstructionControlBoard.java index 48cc357..5e97b2c 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/MainScreenConstructionControlBoard.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/MainScreenConstructionControlBoard.java @@ -9,17 +9,15 @@ import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.utils.Align; -import hundun.gdxgame.corelib.base.util.DrawableFactory; import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; import hundun.gdxgame.gamelib.starter.listerner.IGameAreaChangeListener; import hundun.gdxgame.gamelib.starter.listerner.ILogicFrameListener; -import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.ui.screen.IdleMushroomScreenContext.IdleMushroomPlayScreenLayoutConst; import hundun.gdxgame.idlemushroom.ui.screen.MainPlayScreen; import hundun.gdxgame.idlemushroom.ui.shared.BaseCellDetailNodeVM; import hundun.gdxgame.idlemushroom.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.callback.IConstructionCollectionListener; import hundun.gdxgame.idleshare.gamelib.framework.callback.ISecondaryInfoBoardCallback; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; @@ -87,13 +85,13 @@ public void onConstructionCollectionChange() { this.add(epochPart).spaceRight(10).grow(); BaseConstruction sellerConstruction = singletonConstructions.stream() - .filter(it -> it.getPrototypeId().equals(DemoConstructionPrototypeId.MUSHROOM_AUTO_SELLER)) + .filter(it -> it.getPrototypeId().equals(IdleMushroomConstructionPrototypeId.MUSHROOM_AUTO_SELLER)) .findAny() .orElse(null); this.sellerPart.updateForNewConstruction(sellerConstruction, null); BaseConstruction epochConstruction = singletonConstructions.stream() - .filter(it -> it.getPrototypeId().equals(DemoConstructionPrototypeId.EPOCH_COUNTER)) + .filter(it -> it.getPrototypeId().equals(IdleMushroomConstructionPrototypeId.EPOCH_COUNTER)) .findAny() .orElse(null); this.epochPart.updateForNewConstruction(epochConstruction, null); @@ -327,6 +325,11 @@ private void update() { if (model.getUpgradeComponent().getUpgradeState() == UpgradeState.HAS_NEXT_UPGRADE) { ConstructionDetailPartVM.resourcePackAsActor(model.getUpgradeComponent().getUpgradeCostPack(), detailGroup, parent); + } else if (model.getUpgradeComponent().getUpgradeState() == UpgradeState.REACHED_MAX_UPGRADE_NO_TRANSFER + || model.getUpgradeComponent().getUpgradeState() == UpgradeState.REACHED_MAX_UPGRADE_HAS_TRANSFER + ) { + detailGroup.add(new Label(model.getDescriptionPackage().getUpgradeMaxLevelDescription(), parent.getGame().getMainSkin())) + .colspan(2); } // ------ update text ------ @@ -335,7 +338,7 @@ private void update() { model.getName() )); upgradeButton.setText(model.getDescriptionPackage().getUpgradeButtonText()); - workingLevelLabel.setText(model.getLevelComponent().getWorkingLevelDescription() + "; max: " + model.getLevelComponent().maxLevel); + workingLevelLabel.setText(model.getLevelComponent().getWorkingLevelDescription()); // ------ update clickable-state ------ diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/MainScreenPopupInfoBoard.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/MainScreenPopupInfoBoard.java index 98af498..55ddac3 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/MainScreenPopupInfoBoard.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/MainScreenPopupInfoBoard.java @@ -2,7 +2,7 @@ import com.badlogic.gdx.scenes.scene2d.Touchable; import com.badlogic.gdx.scenes.scene2d.ui.Table; -import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.ui.screen.MainPlayScreen; import hundun.gdxgame.idlemushroom.ui.shared.ConstructionWikiVM; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; @@ -17,7 +17,7 @@ public MainScreenPopupInfoBoard(MainPlayScreen parent) { this.parent = parent; //this.setBounds(5, GameAreaControlBoard.Y, GameAreaControlBoard.X - 10, 120); this.setTouchable(Touchable.disabled); - this.setBackground(parent.getLayoutConst().simpleBoardBackground); + this.setBackground(parent.getGame().getIdleMushroomTextureManager().getTableType1Drawable()); this.setVisible(false); this.twoEpochInfoAreaVM = new TwoEpochInfoAreaVM(parent); @@ -26,7 +26,7 @@ public MainScreenPopupInfoBoard(MainPlayScreen parent) { public void update(BaseConstruction construction) { this.clearChildren(); - if (construction.getPrototypeId().equals(DemoConstructionPrototypeId.EPOCH_COUNTER)) { + if (construction.getPrototypeId().equals(IdleMushroomConstructionPrototypeId.EPOCH_COUNTER)) { this.add(twoEpochInfoAreaVM) .size(parent.getLayoutConst().popupInfoBoardWidth, parent.getLayoutConst().popupInfoBoardHeight); twoEpochInfoAreaVM.rebuildCells(construction); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/OneEpochInfoAreaVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/OneEpochInfoAreaVM.java index c302bf8..eaa4795 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/OneEpochInfoAreaVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/OneEpochInfoAreaVM.java @@ -3,23 +3,24 @@ 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.idlemushroom.IdleMushroomGame.RootEpochConfig; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.ui.screen.IdleMushroomScreenContext.IdleMushroomPlayScreenLayoutConst; import hundun.gdxgame.idlemushroom.ui.screen.MainPlayScreen; -import hundun.gdxgame.idleshare.core.starter.ui.screen.play.PlayScreenLayoutConst; +import hundun.gdxgame.idlemushroom.ui.shared.ConstructionDetailPartVM; import hundun.gdxgame.idleshare.gamelib.framework.model.construction.base.BaseConstruction; public class OneEpochInfoAreaVM extends Table { MainPlayScreen parent; BaseConstruction epochCounterConstruction; + BaseConstruction mainClickerConstruction; @Null RootEpochConfig epochConfig; int epochLevel; Label epochInfoLabel; Label maxLevelLabel; - + Table mainClickerPart; public OneEpochInfoAreaVM( MainPlayScreen parent @@ -39,12 +40,14 @@ public OneEpochInfoAreaVM( epochInfoLabel.setAlignment(Align.center); this.maxLevelLabel = new Label("", parent.getGame().getMainSkin()); maxLevelLabel.setAlignment(Align.center); + this.mainClickerPart = new Table(parent.getGame().getMainSkin()); // ------ this ------ this.add(epochInfoLabel).row(); this.add(maxLevelLabel).row(); + this.add(mainClickerPart).row(); - this.setBackground(DrawableFactory.createBorderBoard(30, 10, 0.8f, 1)); + this.setBackground(parent.getGame().getIdleMushroomTextureManager().getTableType3Drawable()); } private void update() { @@ -63,11 +66,13 @@ private void update() { // ------ update text ------ + mainClickerPart.clearChildren(); if (epochConfig != null) { epochInfoLabel.setText("时期:" + epochLevel); maxLevelLabel.setText("蘑菇等级上限:" + epochConfig.getMaxLevel()); + ConstructionDetailPartVM.resourcePackAsActor(mainClickerConstruction.getOutputComponent().getOutputGainPack(), mainClickerPart, parent); } else { - epochInfoLabel.setText("时期:max"); + epochInfoLabel.setText(""); maxLevelLabel.setText(""); } @@ -75,8 +80,18 @@ private void update() { } - public void updateAsConstruction(@Null RootEpochConfig epochConfig, BaseConstruction epochCounterConstruction, int epochLevel) { + public void updateAsConstruction( + @Null RootEpochConfig epochConfig, + BaseConstruction epochCounterConstruction, + int epochLevel + ) { this.epochCounterConstruction = epochCounterConstruction; + this.mainClickerConstruction = parent.getGame().getIdleGameplayExport().getGameplayContext().getConstructionManager() + .getSingletonConstructionInstancesOrEmpty() + .stream() + .filter(it -> it.getPrototypeId().equals(IdleMushroomConstructionPrototypeId.MAIN_MUSHROOM)) + .findAny() + .orElse(null); this.epochConfig = epochConfig; this.epochLevel = epochLevel; update(); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/TwoEpochInfoAreaVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/TwoEpochInfoAreaVM.java index 21c8d1d..4733b58 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/TwoEpochInfoAreaVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/main/TwoEpochInfoAreaVM.java @@ -22,15 +22,17 @@ public TwoEpochInfoAreaVM(MainPlayScreen parent) { //this.setBounds(5, GameAreaControlBoard.Y, GameAreaControlBoard.X - 10, 120); this.titleLabel = new Label("", parent.getGame().getMainSkin()); - this.add(titleLabel).colspan(3).row(); + titleLabel.setWrap(true); + this.add(titleLabel).grow().colspan(3).row(); this.currentLevelInfoAreaVM = new OneEpochInfoAreaVM(parent); this.add(currentLevelInfoAreaVM); this.midPart = new VerticalGroup(); - this.add(midPart).padLeft(50).padRight(50); + this.add(midPart).padLeft(25).padRight(25); this.nextLevelInfoAreaVM = new OneEpochInfoAreaVM(parent); this.add(nextLevelInfoAreaVM); + this.pad(parent.getIdleMushroomPlayScreenLayoutConst().WorldConstructionCellTablePad); } public void rebuildCells(BaseConstruction epochCounterConstruction) { diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/IdleMushroomScreenContext.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/IdleMushroomScreenContext.java index c5d633d..5e1f82d 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/IdleMushroomScreenContext.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/IdleMushroomScreenContext.java @@ -8,6 +8,7 @@ import hundun.gdxgame.idlemushroom.logic.RootSaveData; import hundun.gdxgame.idleshare.core.framework.model.manager.AbstractIdleScreenContext; import hundun.gdxgame.idleshare.core.starter.ui.screen.play.PlayScreenLayoutConst; +import lombok.Getter; /** * @author hundun @@ -16,6 +17,7 @@ public class IdleMushroomScreenContext extends AbstractIdleScreenContext { DemoMenuScreen menuScreen; + @Getter MainPlayScreen mainPlayScreen; WorldPlayScreen worldPlayScreen; DemoAchievementScreen achievementScreen; diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/MainPlayScreen.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/MainPlayScreen.java index f5a3556..4a389a4 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/MainPlayScreen.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/MainPlayScreen.java @@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch; import hundun.gdxgame.idlemushroom.IdleMushroomGame; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.logic.DemoScreenId; import hundun.gdxgame.idlemushroom.logic.ResourceType; import hundun.gdxgame.idlemushroom.logic.RootSaveData; @@ -41,7 +42,7 @@ protected void lazyInitUiRootContext() { this, game.getTextureManager().getMainClickAnimationTextureAtlas() ); - middleGroup.add(mainClickerAnimationVM); + setMainClickerWithScale(); constructionControlBoard = new MainScreenConstructionControlBoard(this, this); uiRootTable.add(constructionControlBoard) @@ -51,6 +52,30 @@ protected void lazyInitUiRootContext() { ; } + public void setMainClickerWithScale() { + BaseConstruction epochCounterConstruction = game.getIdleGameplayExport().getGameplayContext() + .getConstructionManager() + .getSingletonConstructionInstancesOrEmpty() + .stream() + .filter(it -> it.getPrototypeId().equals(IdleMushroomConstructionPrototypeId.EPOCH_COUNTER)) + .findAny() + .orElse(null); + BaseConstruction mainClickerConstruction = game.getIdleGameplayExport().getGameplayContext().getConstructionManager() + .getSingletonConstructionInstancesOrEmpty() + .stream() + .filter(it -> it.getPrototypeId().equals(IdleMushroomConstructionPrototypeId.MAIN_MUSHROOM)) + .findAny() + .orElse(null); + if (epochCounterConstruction != null && mainClickerConstruction != null) { + int currentEpochLevel = epochCounterConstruction.getSaveData().getLevel(); + middleGroup.clearChildren(); + middleGroup.add(mainClickerAnimationVM).size(64 * currentEpochLevel, 64 * currentEpochLevel); + while (mainClickerConstruction.getSaveData().getLevel() < currentEpochLevel) { + mainClickerConstruction.getUpgradeComponent().doUpgrade(); + } + } + } + protected void lazyInitLogicContext() { super.lazyInitLogicContext(); diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/WorldPlayScreen.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/WorldPlayScreen.java index a0c4e6b..31593c0 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/WorldPlayScreen.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/screen/WorldPlayScreen.java @@ -97,7 +97,7 @@ protected void updateUIForShow() { List constructions = game.getIdleGameplayExport().getGameplayContext().getConstructionManager() .getWorldConstructionInstances(); hexAreaVM.updateUIForShow(constructions); - worldDetailBoardVM.selectCell(null); + onCellClicked(null); } @Override diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/shared/ConstructionDetailPartVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/shared/ConstructionDetailPartVM.java index 08c031c..5057ee1 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/shared/ConstructionDetailPartVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/shared/ConstructionDetailPartVM.java @@ -50,8 +50,9 @@ public void rebuildCells(@Null BaseConstruction newModel) { if (model.getUpgradeComponent().getUpgradeState() == UpgradeState.HAS_NEXT_UPGRADE) { resourcePackAsActor(model.getUpgradeComponent().getUpgradeCostPack(), this, parent); - } else if (model.getUpgradeComponent().getUpgradeState() == UpgradeState.REACHED_MAX_UPGRADE_HAS_TRANSFER) { - this.add(wapperContainer(new Label(model.getUpgradeComponent().getUpgradeCostPack().getDescriptionStart(), parent.getGame().getMainSkin()))); + } else if (model.getUpgradeComponent().getUpgradeState() == UpgradeState.REACHED_MAX_UPGRADE_HAS_TRANSFER + || model.getUpgradeComponent().getUpgradeState() == UpgradeState.REACHED_MAX_UPGRADE_NO_TRANSFER + ) { this.add(wapperContainer(new Label(model.getDescriptionPackage().getUpgradeMaxLevelDescription(), parent.getGame().getMainSkin()))); this.row(); } @@ -69,7 +70,7 @@ public static void resourcePackAsActor(ResourcePack pack, Table target, BaseIdle public static void resourcePackAsActor(ResourcePack pack, Table target, BaseIdleMushroomPlayScreen parent, boolean isPreviewNextLevel) { if (pack != null) { List targetValue = isPreviewNextLevel ? pack.getPreviewNextLevelModifiedValues() : pack.getModifiedValues(); - if (targetValue != null) { + if (targetValue != null && !targetValue.isEmpty()) { List pairsToActors = pairsToActors(targetValue, parent.getGame()); target.add(wapperContainer(new Label(pack.getDescriptionStart(), parent.getGame().getMainSkin()))); for (Actor actor : pairsToActors) { diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/shared/ConstructionWikiVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/shared/ConstructionWikiVM.java index 80f5d98..ea28d75 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/shared/ConstructionWikiVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/shared/ConstructionWikiVM.java @@ -16,7 +16,8 @@ public ConstructionWikiVM(BaseIdleMushroomPlayScreen parent) { //super("GUIDE_TEXT", parent.game.getButtonSkin()); this.parent = parent; this.label = new Label("", parent.getGame().getMainSkin()); - this.add(label); + label.setWrap(true); + this.add(label).grow(); } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/HexAreaVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/HexAreaVM.java index 5c74ae4..4c926a6 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/HexAreaVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/HexAreaVM.java @@ -21,8 +21,8 @@ public class HexAreaVM extends Table { - public static final int roomWidth = 5000; - public static final int roomHeight = 5000; + public static final int roomWidth = 1000; + public static final int roomHeight = 1000; public WorldPlayScreen screen; @Getter diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/HexCellVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/HexCellVM.java index e14cbf2..097e8d2 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/HexCellVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/HexCellVM.java @@ -125,10 +125,12 @@ public void updateMaskMode(@Null MaskMode maskMode) { } else { this.hightLightImage.setDrawable(null); } - this.mainLabel.setText(String.format( - "(%s, %s)", - deskData.getSaveData().getPosition().getX(), - deskData.getSaveData().getPosition().getY() - ) ); + if (game.debugMode) { + this.mainLabel.setText(String.format( + "(%s, %s)", + deskData.getSaveData().getPosition().getX(), + deskData.getSaveData().getPosition().getY() + ) ); + } } } diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldDetailBoardVM.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldDetailBoardVM.java index 68a6fed..4eee02d 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldDetailBoardVM.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldDetailBoardVM.java @@ -3,7 +3,7 @@ import com.badlogic.gdx.scenes.scene2d.Touchable; import com.badlogic.gdx.scenes.scene2d.ui.Table; import hundun.gdxgame.gamelib.starter.listerner.ILogicFrameListener; -import hundun.gdxgame.idlemushroom.logic.DemoConstructionPrototypeId; +import hundun.gdxgame.idlemushroom.logic.IdleMushroomConstructionPrototypeId; import hundun.gdxgame.idlemushroom.ui.screen.WorldPlayScreen; import hundun.gdxgame.idlemushroom.ui.shared.BaseCellDetailNodeVM; import hundun.gdxgame.idleshare.gamelib.framework.callback.IConstructionCollectionListener; @@ -45,23 +45,23 @@ public void selectCell(BaseConstruction construction) switch (construction.getPrototypeId()) { - case DemoConstructionPrototypeId.EPOCH_1_EMPTY_CELL: - case DemoConstructionPrototypeId.EPOCH_2_EMPTY_CELL: - case DemoConstructionPrototypeId.EPOCH_3_EMPTY_CELL: { + case IdleMushroomConstructionPrototypeId.EPOCH_1_EMPTY_CELL: + case IdleMushroomConstructionPrototypeId.EPOCH_2_EMPTY_CELL: + case IdleMushroomConstructionPrototypeId.EPOCH_3_EMPTY_CELL: { WorldEmptyDetailNode innerBoardVM = new WorldEmptyDetailNode(screen); content = innerBoardVM; break; } - case DemoConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: - case DemoConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: - case DemoConstructionPrototypeId.EPOCH_3_MUSHROOM_AUTO_PROVIDER: { + case IdleMushroomConstructionPrototypeId.EPOCH_1_MUSHROOM_AUTO_PROVIDER: + case IdleMushroomConstructionPrototypeId.EPOCH_2_MUSHROOM_AUTO_PROVIDER: + case IdleMushroomConstructionPrototypeId.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: { + case IdleMushroomConstructionPrototypeId.EPOCH_1_TREE: + case IdleMushroomConstructionPrototypeId.EPOCH_2_TREE: + case IdleMushroomConstructionPrototypeId.EPOCH_3_TREE: { WorldTreeDetailNode innerBoardVM = new WorldTreeDetailNode(screen); content = innerBoardVM; break; diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldEmptyDetailNode.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldEmptyDetailNode.java index a2a9b36..a4d5a9d 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldEmptyDetailNode.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldEmptyDetailNode.java @@ -5,11 +5,11 @@ import com.badlogic.gdx.scenes.scene2d.Touchable; import com.badlogic.gdx.scenes.scene2d.ui.*; import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener; -import hundun.gdxgame.corelib.base.util.DrawableFactory; import hundun.gdxgame.gamelib.base.util.JavaFeatureForGwt; import hundun.gdxgame.idlemushroom.ui.screen.WorldPlayScreen; import hundun.gdxgame.idlemushroom.ui.shared.BaseIdleMushroomPlayScreen; import hundun.gdxgame.idlemushroom.ui.shared.BaseCellDetailNodeVM; +import hundun.gdxgame.idlemushroom.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.data.ChildGameConfig.ConstructionBuyCandidateConfig; @@ -72,19 +72,10 @@ private void update() { // ------ update text ------ constructionNameLabel.setText(JavaFeatureForGwt.stringFormat( - "%s (%s, %s)", - screen.getGame() - .getIdleGameplayExport() - .getGameplayContext() - .getGameDictionary() - .constructionPrototypeIdToDetailDescriptionConstPart( - screen.getGame().getIdleGameplayExport().getLanguage(), - construction.getPrototypeId() - ), - position.getX(), - position.getY() + "%s", + construction.getName() )); - buyCandidateKeyLabel.setText(construction.getDescriptionPackage().getTransformCostDescriptionStart()); + buyCandidateKeyLabel.setText(construction.getDescriptionPackage().getExtraTexts().get(0)); } @@ -131,7 +122,7 @@ public void updateForNewConstruction( constructionBuyCandidateConfig ); vm.update(); - this.add(vm); + this.add(vm).grow(); children.add(vm); }); @@ -144,7 +135,7 @@ public static class WorldBuyConstructionInfoNodeVM extends Table { Label constructionNameLabel; TextButton buyButton; ConstructionBuyCandidateConfig constructionBuyCandidateConfig; - + Table costPart; public WorldBuyConstructionInfoNodeVM( BaseIdleMushroomPlayScreen parent, BaseConstruction model, @@ -163,7 +154,7 @@ public WorldBuyConstructionInfoNodeVM( this.constructionNameLabel = new Label(constructionBuyCandidateConfig.getPrototypeId(), parent.getGame().getMainSkin()); constructionNameLabel.setWrap(true); - this.buyButton = new TextButton("buy", parent.getGame().getMainSkin()); + this.buyButton = new TextButton(model.getDescriptionPackage().getTransformButtonText(), parent.getGame().getMainSkin()); buyButton.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { @@ -173,9 +164,11 @@ public void changed(ChangeEvent event, Actor actor) { } }); + this.costPart = new Table(parent.getGame().getMainSkin()); // ------ this ------ - this.add(constructionNameLabel).size(CHILD_WIDTH, NAME_CHILD_HEIGHT).row(); + this.add(constructionNameLabel).size(CHILD_WIDTH, CHILD_HEIGHT).row(); + this.add(costPart).row(); this.add(buyButton).size(CHILD_WIDTH, CHILD_HEIGHT).row(); this.setBackground(parent.getGame().getIdleMushroomTextureManager().getTableType5Drawable()); } @@ -203,7 +196,8 @@ public void update() { constructionBuyCandidateConfig.getPrototypeId() ) ); - + costPart.clearChildren(); + ConstructionDetailPartVM.resourcePackAsActor(constructionBuyCandidateConfig.getBuyCostPack(), costPart, parent); // ------ update clickable-state ------ boolean canBuyInstanceOfPrototype = parent.getGame().getIdleGameplayExport().getGameplayContext() .getConstructionManager() diff --git a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldScreenPopupInfoBoard.java b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldScreenPopupInfoBoard.java index 2da00aa..1d6e478 100644 --- a/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldScreenPopupInfoBoard.java +++ b/IdleMushroom-game/core/src/main/java/hundun/gdxgame/idlemushroom/ui/world/WorldScreenPopupInfoBoard.java @@ -15,7 +15,7 @@ public WorldScreenPopupInfoBoard(WorldPlayScreen parent) { this.parent = parent; //this.setBounds(5, GameAreaControlBoard.Y, GameAreaControlBoard.X - 10, 120); this.setTouchable(Touchable.disabled); - this.setBackground(parent.getLayoutConst().simpleBoardBackground); + this.setBackground(parent.getGame().getIdleMushroomTextureManager().getTableType1Drawable()); this.setVisible(false); this.constructionWikiVM = new ConstructionWikiVM(parent); diff --git a/idleshare/core/src/hundun/gdxgame/idleshare/core/framework/model/CameraDataPackage.java b/idleshare/core/src/hundun/gdxgame/idleshare/core/framework/model/CameraDataPackage.java index cf080c9..fb6a046 100644 --- a/idleshare/core/src/hundun/gdxgame/idleshare/core/framework/model/CameraDataPackage.java +++ b/idleshare/core/src/hundun/gdxgame/idleshare/core/framework/model/CameraDataPackage.java @@ -9,6 +9,14 @@ public class CameraDataPackage { private float currentCameraX; @Getter private float currentCameraY; + @Setter + private Float boundLeft; + @Setter + private Float boundRight; + @Setter + private Float boundUp; + @Setter + private Float boundDown; @Getter private float currentCameraZoomWeight; @Getter @@ -27,12 +35,28 @@ public static float cameraZoomWeightToZoomValue(float weight){ public void modifyCurrentCamera(Float deltaX, Float deltaY) { + float totalDeltaX = 0; + float totalDeltaY = 0; if (deltaX != null) { - currentCameraX += deltaX; + totalDeltaX += deltaX; } if (deltaY != null) { - currentCameraY += deltaY; + totalDeltaY += deltaY; + } + if (boundLeft != null && currentCameraX + totalDeltaX < boundLeft) { + totalDeltaX = 0; + } + if (boundRight != null && currentCameraX + totalDeltaX > boundRight) { + totalDeltaX = 0; + } + if (boundDown != null && currentCameraY + totalDeltaY < boundDown) { + totalDeltaY = 0; + } + if (boundUp != null && currentCameraY + totalDeltaY > boundUp) { + totalDeltaY = 0; } + currentCameraX += totalDeltaX; + currentCameraY += totalDeltaY; } public void modifyCurrentCameraZoomWeight(Float delta) { diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/DescriptionPackage.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/DescriptionPackage.java index 4b5410d..95c0584 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/DescriptionPackage.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/DescriptionPackage.java @@ -6,6 +6,8 @@ import lombok.Builder; import lombok.Data; +import java.util.List; + /** * @author hundun * Created on 2021/11/29 @@ -36,6 +38,8 @@ public class DescriptionPackage { private IProficiencyDescroptionProvider proficiencyDescriptionProvider; + List extraTexts; + public static interface ILevelDescriptionProvider { String provide(int level, int workingLevel, boolean reachMaxLevel); } diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/DescriptionPackageFactory.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/DescriptionPackageFactory.java index cf3b4bf..62cb3af 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/DescriptionPackageFactory.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/base/DescriptionPackageFactory.java @@ -11,10 +11,10 @@ public class DescriptionPackageFactory { public static ILevelDescriptionProvider NO_LEVEL_IMP = (level, workingLevel, reachMaxLevel) -> ""; public static ILevelDescriptionProvider ONLY_LEVEL_IMP = (level, workingLevel, reachMaxLevel) -> { - return "lv." + level; + return "lv." + level + (reachMaxLevel ? "(max)" : ""); }; public static ILevelDescriptionProvider WORKING_LEVEL_IMP = (level, workingLevel, reachMaxLevel) -> { - return "lv." + workingLevel + "/" + level + (reachMaxLevel ? "(max)" : ""); + return "lv." + level + (reachMaxLevel ? "(max)" : "") + " active: " + workingLevel; }; public static ILevelDescriptionProvider LOCK_IMP = (level, workingLevel, reachMaxLevel) -> { return (reachMaxLevel ? "Unlocked" : ""); 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 d724948..08be7e9 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 @@ -46,7 +46,7 @@ public void lazyInitDescription(IdleGameplayContext gameContext, Language langua } if (buyCandidateConfigs != null) { - buyCandidateConfigs.forEach(it -> it.getBuyCostPack().setDescriptionStart(gameContext.getGameDictionary().getPlayScreenTexts(language).get(1))); + buyCandidateConfigs.forEach(it -> it.getBuyCostPack().setDescriptionStart(construction.getDescriptionPackage().getTransformCostDescriptionStart())); } } diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/starter/SimpleAutoOutputComponent.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/starter/SimpleAutoOutputComponent.java index d340ba3..d808deb 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/starter/SimpleAutoOutputComponent.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/construction/starter/SimpleAutoOutputComponent.java @@ -16,11 +16,11 @@ public void onSubLogicFrame() { @Override public long calculateModifiedOutputGain(long baseValue, int level, int proficiency) { - return baseValue; + return baseValue * level; } @Override public long calculateModifiedOutputCost(long baseValue, int level, int proficiency) { - return baseValue; + return baseValue * level; } } diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/manager/AchievementManager.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/manager/AchievementManager.java index 602c988..0f14a06 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/manager/AchievementManager.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/model/manager/AchievementManager.java @@ -18,7 +18,6 @@ public class AchievementManager implements IBuffChangeListener, IOneFrameResourceChangeListener, IGameStartListener { IdleGameplayContext gameContext; - @Getter Map models = new HashMap<>(); @@ -32,7 +31,7 @@ public static class AchievementInfoPackage int total; int completedSize; int lockedSize; - List allAchievementList; + List sortedAchievementList; } @Data @@ -52,8 +51,8 @@ public static class AchievementSaveData { } public enum AchievementState { - LOCKED, RUNNING, + LOCKED, COMPLETED, ; @@ -66,8 +65,8 @@ public AchievementManager(IdleGameplayContext gameContext) { public AchievementInfoPackage getAchievementInfoPackage() { - List allAchievementList = models.values().stream() - .map(it -> it.getAchievement()) + List allAchievementList = models.values().stream() + .sorted((o1, o2) -> -1 * Integer.compare(o2.getSaveData().getState().ordinal(), o1.getSaveData().getState().ordinal())) .collect(Collectors.toList()); ; AchievementAndStatus firstRunningAchievement = models.values().stream() diff --git a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/util/text/IGameDictionary.java b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/util/text/IGameDictionary.java index 3695693..f3935e3 100644 --- a/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/util/text/IGameDictionary.java +++ b/idleshare/gamelib/src/hundun/gdxgame/idleshare/gamelib/framework/util/text/IGameDictionary.java @@ -14,7 +14,6 @@ public interface IGameDictionary { String constructionPrototypeIdToShowName(Language language, String prototypeId); String constructionPrototypeIdToDetailDescriptionConstPart(Language language, String prototypeId); List getMenuScreenTexts(Language language); - List getPlayScreenTexts(Language language); List getAchievementTexts(Language language); Map getLanguageShowNameMap(); List getStageSelectMaskBoardTexts(Language language);