mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-03-30 05:58:03 +08:00
add trajectory auto mode
This commit is contained in:
@@ -43,6 +43,9 @@ export default ({
|
||||
UI_Random_Allocate: 'Random Allocate',
|
||||
UI_Make_New_Life: 'Make New Life',
|
||||
|
||||
UI_Manual: 'Manual',
|
||||
UI_Auto: 'Auto',
|
||||
|
||||
UI_Title_Summary: 'Life Summary',
|
||||
UI_Talent_Extend: 'Talent, You can choose one to extend',
|
||||
UI_Remake_Again: 'Remake Again',
|
||||
@@ -50,48 +53,48 @@ export default ({
|
||||
UI_Final_Age: 'Age',
|
||||
UI_Total_Judge: 'Judge',
|
||||
|
||||
'UI_Achievement_Count': 'Achievement',
|
||||
'UI_Remake_Times': 'Remake Times',
|
||||
'UI_Event_Collection_Rate': 'Event Collection',
|
||||
'UI_Talent_Collection_Rate': 'Talent Collection',
|
||||
UI_Achievement_Count: 'Achievement',
|
||||
UI_Remake_Times: 'Remake Times',
|
||||
UI_Event_Collection_Rate: 'Event Collection',
|
||||
UI_Talent_Collection_Rate: 'Talent Collection',
|
||||
|
||||
'UI_Judge_Level_0': '地狱',
|
||||
'UI_Judge_Level_1': '折磨',
|
||||
'UI_Judge_Level_2': '不佳',
|
||||
'UI_Judge_Level_3': '普通',
|
||||
'UI_Judge_Level_4': '优秀',
|
||||
'UI_Judge_Level_5': '罕见',
|
||||
'UI_Judge_Level_6': '逆天',
|
||||
'UI_Judge_Level_7': '传说',
|
||||
UI_Judge_Level_0: '地狱',
|
||||
UI_Judge_Level_1: '折磨',
|
||||
UI_Judge_Level_2: '不佳',
|
||||
UI_Judge_Level_3: '普通',
|
||||
UI_Judge_Level_4: '优秀',
|
||||
UI_Judge_Level_5: '罕见',
|
||||
UI_Judge_Level_6: '逆天',
|
||||
UI_Judge_Level_7: '传说',
|
||||
|
||||
'UI_Spirit_Judge_Level_0': '地狱',
|
||||
'UI_Spirit_Judge_Level_1': '折磨',
|
||||
'UI_Spirit_Judge_Level_2': '不幸',
|
||||
'UI_Spirit_Judge_Level_3': '普通',
|
||||
'UI_Spirit_Judge_Level_4': '幸福',
|
||||
'UI_Spirit_Judge_Level_5': '极乐',
|
||||
'UI_Spirit_Judge_Level_6': '天命',
|
||||
UI_Spirit_Judge_Level_0: '地狱',
|
||||
UI_Spirit_Judge_Level_1: '折磨',
|
||||
UI_Spirit_Judge_Level_2: '不幸',
|
||||
UI_Spirit_Judge_Level_3: '普通',
|
||||
UI_Spirit_Judge_Level_4: '幸福',
|
||||
UI_Spirit_Judge_Level_5: '极乐',
|
||||
UI_Spirit_Judge_Level_6: '天命',
|
||||
|
||||
'UI_AGE_Judge_Level_0': '胎死腹中',
|
||||
'UI_AGE_Judge_Level_1': '早夭',
|
||||
'UI_AGE_Judge_Level_2': '少年',
|
||||
'UI_AGE_Judge_Level_3': '盛年',
|
||||
'UI_AGE_Judge_Level_4': '中年',
|
||||
'UI_AGE_Judge_Level_5': '花甲',
|
||||
'UI_AGE_Judge_Level_6': '古稀',
|
||||
'UI_AGE_Judge_Level_7': '杖朝',
|
||||
'UI_AGE_Judge_Level_8': '南山',
|
||||
'UI_AGE_Judge_Level_9': '不老',
|
||||
'UI_AGE_Judge_Level_10': '修仙',
|
||||
'UI_AGE_Judge_Level_11': '仙寿',
|
||||
UI_AGE_Judge_Level_0: '胎死腹中',
|
||||
UI_AGE_Judge_Level_1: '早夭',
|
||||
UI_AGE_Judge_Level_2: '少年',
|
||||
UI_AGE_Judge_Level_3: '盛年',
|
||||
UI_AGE_Judge_Level_4: '中年',
|
||||
UI_AGE_Judge_Level_5: '花甲',
|
||||
UI_AGE_Judge_Level_6: '古稀',
|
||||
UI_AGE_Judge_Level_7: '杖朝',
|
||||
UI_AGE_Judge_Level_8: '南山',
|
||||
UI_AGE_Judge_Level_9: '不老',
|
||||
UI_AGE_Judge_Level_10: '修仙',
|
||||
UI_AGE_Judge_Level_11: '仙寿',
|
||||
|
||||
'UI_Intelligence_Judge_Level_7': '识海',
|
||||
'UI_Intelligence_Judge_Level_8': '元神',
|
||||
'UI_Intelligence_Judge_Level_9': '仙魂',
|
||||
UI_Intelligence_Judge_Level_7: '识海',
|
||||
UI_Intelligence_Judge_Level_8: '元神',
|
||||
UI_Intelligence_Judge_Level_9: '仙魂',
|
||||
|
||||
'UI_Strength_Judge_Level_7': '凝气',
|
||||
'UI_Strength_Judge_Level_8': '筑基',
|
||||
'UI_Strength_Judge_Level_9': '金丹',
|
||||
'UI_Strength_Judge_Level_10': '元婴',
|
||||
'UI_Strength_Judge_Level_11': '仙体',
|
||||
UI_Strength_Judge_Level_7: '凝气',
|
||||
UI_Strength_Judge_Level_8: '筑基',
|
||||
UI_Strength_Judge_Level_9: '金丹',
|
||||
UI_Strength_Judge_Level_10: '元婴',
|
||||
UI_Strength_Judge_Level_11: '仙体',
|
||||
});
|
||||
@@ -42,6 +42,9 @@ export default ({
|
||||
UI_Random_Allocate: '随机分配',
|
||||
UI_Make_New_Life: '开始新人生',
|
||||
|
||||
UI_Manual: '手动',
|
||||
UI_Auto: '自动',
|
||||
|
||||
UI_Title_Summary: '人生总结',
|
||||
UI_Talent_Extend: '天赋:你可以选择一个,下辈子还能抽到',
|
||||
UI_Remake_Again: '再次重开',
|
||||
@@ -49,63 +52,63 @@ export default ({
|
||||
UI_Final_Age: '享年',
|
||||
UI_Total_Judge: '总评',
|
||||
|
||||
'UI_Achievement_Count': '获得成就',
|
||||
'UI_Remake_Times': '重开次数',
|
||||
'UI_Event_Collection_Rate': '事件收集率',
|
||||
'UI_Talent_Collection_Rate': '天赋收集率',
|
||||
'UI_Statistics': '统计',
|
||||
UI_Achievement_Count: '获得成就',
|
||||
UI_Remake_Times: '重开次数',
|
||||
UI_Event_Collection_Rate: '事件收集率',
|
||||
UI_Talent_Collection_Rate: '天赋收集率',
|
||||
UI_Statistics: '统计',
|
||||
|
||||
'UI_Judge_Level_0': '地狱',
|
||||
'UI_Judge_Level_1': '折磨',
|
||||
'UI_Judge_Level_2': '不佳',
|
||||
'UI_Judge_Level_3': '普通',
|
||||
'UI_Judge_Level_4': '优秀',
|
||||
'UI_Judge_Level_5': '罕见',
|
||||
'UI_Judge_Level_6': '逆天',
|
||||
'UI_Judge_Level_7': '传说',
|
||||
UI_Judge_Level_0: '地狱',
|
||||
UI_Judge_Level_1: '折磨',
|
||||
UI_Judge_Level_2: '不佳',
|
||||
UI_Judge_Level_3: '普通',
|
||||
UI_Judge_Level_4: '优秀',
|
||||
UI_Judge_Level_5: '罕见',
|
||||
UI_Judge_Level_6: '逆天',
|
||||
UI_Judge_Level_7: '传说',
|
||||
|
||||
'UI_Spirit_Judge_Level_0': '地狱',
|
||||
'UI_Spirit_Judge_Level_1': '折磨',
|
||||
'UI_Spirit_Judge_Level_2': '不幸',
|
||||
'UI_Spirit_Judge_Level_3': '普通',
|
||||
'UI_Spirit_Judge_Level_4': '幸福',
|
||||
'UI_Spirit_Judge_Level_5': '极乐',
|
||||
'UI_Spirit_Judge_Level_6': '天命',
|
||||
UI_Spirit_Judge_Level_0: '地狱',
|
||||
UI_Spirit_Judge_Level_1: '折磨',
|
||||
UI_Spirit_Judge_Level_2: '不幸',
|
||||
UI_Spirit_Judge_Level_3: '普通',
|
||||
UI_Spirit_Judge_Level_4: '幸福',
|
||||
UI_Spirit_Judge_Level_5: '极乐',
|
||||
UI_Spirit_Judge_Level_6: '天命',
|
||||
|
||||
'UI_AGE_Judge_Level_0': '胎死腹中',
|
||||
'UI_AGE_Judge_Level_1': '早夭',
|
||||
'UI_AGE_Judge_Level_2': '少年',
|
||||
'UI_AGE_Judge_Level_3': '盛年',
|
||||
'UI_AGE_Judge_Level_4': '中年',
|
||||
'UI_AGE_Judge_Level_5': '花甲',
|
||||
'UI_AGE_Judge_Level_6': '古稀',
|
||||
'UI_AGE_Judge_Level_7': '杖朝',
|
||||
'UI_AGE_Judge_Level_8': '南山',
|
||||
'UI_AGE_Judge_Level_9': '不老',
|
||||
'UI_AGE_Judge_Level_10': '修仙',
|
||||
'UI_AGE_Judge_Level_11': '仙寿',
|
||||
UI_AGE_Judge_Level_0: '胎死腹中',
|
||||
UI_AGE_Judge_Level_1: '早夭',
|
||||
UI_AGE_Judge_Level_2: '少年',
|
||||
UI_AGE_Judge_Level_3: '盛年',
|
||||
UI_AGE_Judge_Level_4: '中年',
|
||||
UI_AGE_Judge_Level_5: '花甲',
|
||||
UI_AGE_Judge_Level_6: '古稀',
|
||||
UI_AGE_Judge_Level_7: '杖朝',
|
||||
UI_AGE_Judge_Level_8: '南山',
|
||||
UI_AGE_Judge_Level_9: '不老',
|
||||
UI_AGE_Judge_Level_10: '修仙',
|
||||
UI_AGE_Judge_Level_11: '仙寿',
|
||||
|
||||
'UI_Intelligence_Judge_Level_7': '识海',
|
||||
'UI_Intelligence_Judge_Level_8': '元神',
|
||||
'UI_Intelligence_Judge_Level_9': '仙魂',
|
||||
UI_Intelligence_Judge_Level_7: '识海',
|
||||
UI_Intelligence_Judge_Level_8: '元神',
|
||||
UI_Intelligence_Judge_Level_9: '仙魂',
|
||||
|
||||
'UI_Strength_Judge_Level_7': '凝气',
|
||||
'UI_Strength_Judge_Level_8': '筑基',
|
||||
'UI_Strength_Judge_Level_9': '金丹',
|
||||
'UI_Strength_Judge_Level_10': '元婴',
|
||||
'UI_Strength_Judge_Level_11': '仙体',
|
||||
UI_Strength_Judge_Level_7: '凝气',
|
||||
UI_Strength_Judge_Level_8: '筑基',
|
||||
UI_Strength_Judge_Level_9: '金丹',
|
||||
UI_Strength_Judge_Level_10: '元婴',
|
||||
UI_Strength_Judge_Level_11: '仙体',
|
||||
|
||||
'UI_Remake_Times_Judge_Level_0': '抽到紫色概率不变',
|
||||
'UI_Remake_Times_Judge_Level_1': '抽到紫色概率翻倍',
|
||||
'UI_Remake_Times_Judge_Level_2': '抽到紫色概率三倍',
|
||||
'UI_Remake_Times_Judge_Level_3': '抽到紫色概率四倍',
|
||||
'UI_Remake_Times_Judge_Level_4': '抽到紫色概率五倍',
|
||||
'UI_Remake_Times_Judge_Level_5': '抽到紫色概率六倍',
|
||||
UI_Remake_Times_Judge_Level_0: '抽到紫色概率不变',
|
||||
UI_Remake_Times_Judge_Level_1: '抽到紫色概率翻倍',
|
||||
UI_Remake_Times_Judge_Level_2: '抽到紫色概率三倍',
|
||||
UI_Remake_Times_Judge_Level_3: '抽到紫色概率四倍',
|
||||
UI_Remake_Times_Judge_Level_4: '抽到紫色概率五倍',
|
||||
UI_Remake_Times_Judge_Level_5: '抽到紫色概率六倍',
|
||||
|
||||
'UI_Achievement_Count_Judge_Level_0': '抽到橙色概率不变',
|
||||
'UI_Achievement_Count_Judge_Level_1': '抽到橙色概率翻倍',
|
||||
'UI_Achievement_Count_Judge_Level_2': '抽到橙色概率三倍',
|
||||
'UI_Achievement_Count_Judge_Level_3': '抽到橙色概率四倍',
|
||||
'UI_Achievement_Count_Judge_Level_4': '抽到橙色概率五倍',
|
||||
'UI_Achievement_Count_Judge_Level_5': '抽到橙色概率六倍',
|
||||
UI_Achievement_Count_Judge_Level_0: '抽到橙色概率不变',
|
||||
UI_Achievement_Count_Judge_Level_1: '抽到橙色概率翻倍',
|
||||
UI_Achievement_Count_Judge_Level_2: '抽到橙色概率三倍',
|
||||
UI_Achievement_Count_Judge_Level_3: '抽到橙色概率四倍',
|
||||
UI_Achievement_Count_Judge_Level_4: '抽到橙色概率五倍',
|
||||
UI_Achievement_Count_Judge_Level_5: '抽到橙色概率六倍',
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@@ -48,9 +48,13 @@ export default class CyberTrajectory extends CyberTrajectoryUI {
|
||||
this.btnUp.on(Laya.Event.MOUSE_OUT, this, clear);
|
||||
this.btnDown.on(Laya.Event.MOUSE_UP, this, clear);
|
||||
this.btnDown.on(Laya.Event.MOUSE_OUT, this, clear);
|
||||
|
||||
this.scbSpeed.on(Laya.Event.CHANGE, this, () => this.speed = this.scbSpeed.value);
|
||||
this.scbSpeed.on(Laya.Event.MOUSE_UP, this, () => this.onNext());
|
||||
}
|
||||
|
||||
#speed;
|
||||
#auto;
|
||||
|
||||
static load() {
|
||||
return ['images/slider/vslider_1@3x$bar.png'];
|
||||
}
|
||||
@@ -67,6 +71,7 @@ export default class CyberTrajectory extends CyberTrajectoryUI {
|
||||
#talents;
|
||||
|
||||
init({propertyAllocate, talents}) {
|
||||
this.boxSpeed.visible = true;
|
||||
this.btnSummary.visible = false;
|
||||
this.#trajectoryItems = [];
|
||||
this.#isEnd = false;
|
||||
@@ -76,6 +81,8 @@ export default class CyberTrajectory extends CyberTrajectoryUI {
|
||||
}
|
||||
|
||||
close() {
|
||||
this.scbSpeed.value = 0;
|
||||
this.speed = 0;
|
||||
this.#trajectoryItems.forEach(item => {
|
||||
item.removeSelf();
|
||||
item.destroy();
|
||||
@@ -101,6 +108,7 @@ export default class CyberTrajectory extends CyberTrajectoryUI {
|
||||
this.#isEnd = isEnd;
|
||||
|
||||
if(isEnd) {
|
||||
this.boxSpeed.visible = false;
|
||||
this.btnSummary.visible = true;
|
||||
}
|
||||
|
||||
@@ -130,4 +138,19 @@ export default class CyberTrajectory extends CyberTrajectoryUI {
|
||||
UIManager.getInstance().switchView(UIManager.getInstance().themes.SUMMARY, {talents});
|
||||
}
|
||||
|
||||
get speed() {
|
||||
return this.#speed;
|
||||
}
|
||||
|
||||
set speed(speed) {
|
||||
this.#speed = speed;
|
||||
this.prgSpeed.value = speed / this.scbSpeed.max;
|
||||
clearInterval(this.#auto);
|
||||
this.#auto = null;
|
||||
if(!speed) return;
|
||||
this.#auto = setInterval(
|
||||
() => this.onNext(),
|
||||
3000 * (1 - this.prgSpeed.value) + 300
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,7 @@ class UIManager {
|
||||
|
||||
// close current view
|
||||
this.clearAllDialog();
|
||||
await this.#currentView?.__close?.(view);
|
||||
await this.#currentView?.close?.(view);
|
||||
this.#viewLayer.removeChildren();
|
||||
|
||||
@@ -54,7 +55,7 @@ class UIManager {
|
||||
this.#currentView = view;
|
||||
this.#viewLayer.addChild(view);
|
||||
|
||||
view.close = actions?.close;
|
||||
view.__close = actions?.close;
|
||||
await actions?.open?.(view);
|
||||
await view.show?.();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user