Deploying to gh-pages from @ VickScarlet/remake@2d53a6ca33 🚀

This commit is contained in:
VickScarlet
2026-08-16 12:06:40 +00:00
parent 7962ea5d52
commit 851e2351bc
160 changed files with 61 additions and 161133 deletions
-1
View File
@@ -1 +0,0 @@
theme: jekyll-theme-cayman
-39
View File
@@ -1,39 +0,0 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset="UTF-8">
{% seo %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
{% include head-custom.html %}
</head>
<body>
<a id="skip-to-content" href="#content">Skip to the content.</a>
<header class="page-header" role="banner">
<h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
<h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
<a href="/public/" class="btn">RESTART</a>
{% if site.github.is_project_page %}
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
{% endif %}
{% if site.show_downloads %}
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
{% endif %}
</header>
<main id="content" class="main-content" role="main">
{{ content }}
<footer class="site-footer">
{% if site.github.is_project_page %}
<span class="site-footer-owner"><a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
{% endif %}
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
</footer>
</main>
</body>
</html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+24
View File
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="description" content="人生重开模拟器 - 这垃圾人生一秒也不想待了"/>
<meta name="keywords" content="人生重开模拟器 liferestart life restart remake 人生重来"/>
<meta name="color-scheme" content="light dark" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#000000" media="(prefers-color-scheme: light)" />
<meta name="theme-color" content="#000000" media="(prefers-color-scheme: dark)" />
<title>人生重开模拟器</title>
<script type="module" crossorigin src="./assets/index-Bqqg4haL.js"></script>
<link rel="modulepreload" crossorigin href="./assets/data-achievement-BG6OaHO5.js">
<link rel="modulepreload" crossorigin href="./assets/data-age-DvyW16Y1.js">
<link rel="modulepreload" crossorigin href="./assets/data-character-DyBCJvhr.js">
<link rel="modulepreload" crossorigin href="./assets/data-event-BJK1aZyi.js">
<link rel="modulepreload" crossorigin href="./assets/data-specialthanks-Dsslz6AY.js">
<link rel="modulepreload" crossorigin href="./assets/data-talent-DYCgNa1H.js">
<link rel="stylesheet" crossorigin href="./assets/index-ITDZ88G3.css">
</head>
<body>
<div id="remake"></div>
</body>
</html>
-5
View File
@@ -1,5 +0,0 @@
# Life Restart
やり直すんだ。そして、次はうまくやる。[RESTART](view/index.html)
<iframe src="https://discord.com/widget?id=883382868427014255&theme=dark" width="350" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.DefaultTheme.AchievementUI{constructor(){super(),this.btnBack.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.MAIN)),this.btnRank.on(Laya.Event.CLICK,this,$$event,[`message`,[`M_NoRank`]]),this.listAchievements.renderHandler=new Laya.Handler(this,this.onRenderAchievement),this.listAchievements.scrollBar.elasticDistance=150}init(){let{statistics:e,achievements:t,PropertyTypes:n}=core;this.listAchievements.array=t,this.labRemakeTimes.text=$_.format($lang.F_RemakeTimes,e[n.TMS].value),this.labRemakeTimesJudge.text=e[n.TMS].judge,$_.deepMapSet(this.boxRemakeTimes,$ui.common.achievement[e[n.TMS].grade]),this.labAchievementCount.text=$_.format($lang.F_AchievementCount,e[n.CACHV].value),this.labAchievementCountJudge.text=e[n.CACHV].judge,$_.deepMapSet(this.boxAchievementCount,$ui.common.achievement[e[n.CACHV].grade]),this.labEventRate.text=parseInt(e[n.REVT].value*100)+`%`,this.prgEventRate.scaleX=e[n.REVT].value,$_.deepMapSet(this.boxEventRate,$ui.common.achievement[e[n.REVT].grade]),this.labTalentRate.text=parseInt(e[n.RTLT].value*100)+`%`,this.prgTalentRate.scaleX=e[n.RTLT].value,$_.deepMapSet(this.boxTalentRate,$ui.common.achievement[e[n.RTLT].grade])}onRenderAchievement(e){let t=e.dataSource,n=e.getChildByName(`name`),r=e.getChildByName(`description`),i=e.getChildByName(`boxMask`);$_.deepMapSet(e,$ui.common.achievement[t.grade]),n.color=r.color=$ui.common.defaultFontColor,t.isAchieved?(n.text=t.name,r.text=t.description,i.visible=!1):(n.text=t.hide?`???`:t.name,r.text=t.hide?`???`:t.description,i.visible=!0)}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.CyberTheme.CyberAchievementUI{constructor(){super(),this.btnBack.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.MAIN));let e=Math.min(this.btnAchievement.fontSize,this.btnStatistics.fontSize),t=Math.max(this.btnAchievement.fontSize,this.btnStatistics.fontSize);this.#e={min:e,max:t},this.btnStatistics.on(Laya.Event.CLICK,this,()=>this.switch(`statistics`)),this.btnAchievement.on(Laya.Event.CLICK,this,()=>this.switch(`achievement`)),this.btnRank.on(Laya.Event.CLICK,this,$$event,[`message`,[`M_NoRank`]]),this.listAchievements.renderHandler=new Laya.Handler(this,this.onRenderAchievement),this.listAchievements.scrollBar.elasticDistance=150,this.on(Laya.Event.RESIZE,this,()=>{this.boxPage.width=2*this.width,this.boxA.width=this.boxB.width=this.width,this.boxPage.x<0&&(this.boxPage.x=-this.width);let e=this.listAchievements?._itemRender?.props?.width;if(e){let t=Math.max(Math.floor((this.width-65)/e),1);this.listAchievements.width=t*e+(t-1)*(this.listAchievements.spaceY||0)+30}})}#e;#t;init(){this.switch(`statistics`,0);let{statistics:e,achievements:t,PropertyTypes:n}=core;this.listAchievements.array=t,this.labRemakeTimes.text=e[n.TMS].value,this.labRemakeTimesJudge.text=e[n.TMS].judge,this.labAchievementCountJudge.color=$ui.common.grade[e[n.TMS].grade],this.labAchievementCount.text=e[n.CACHV].value,this.labAchievementCountJudge.text=e[n.CACHV].judge,this.labAchievementCountJudge.color=$ui.common.grade[e[n.CACHV].grade],this.labEventRate.text=parseInt(e[n.REVT].value*100)+`%`,this.prgEventRate.value=e[n.REVT].value,this.labTalentRate.text=parseInt(e[n.RTLT].value*100)+`%`,this.prgTalentRate.value=e[n.RTLT].value}switch(e,t=300){switch(this.#t&&this.#t.forEach(e=>Laya.Tween.clear(e)),this.#t=[],e){case`statistics`:t=-this.boxPage.x/this.width*t,this.#t.push(Laya.Tween.to(this.boxPage,{x:0},t,Laya.Ease.backOut,Laya.Handler.create(this,()=>this.#t=null)),Laya.Tween.to(this.btnStatistics,{fontSize:this.#e.max,anchorX:.5,anchorY:1},t,Laya.Ease.backOut),Laya.Tween.to(this.btnAchievement,{fontSize:this.#e.min,anchorX:.5,anchorY:1},t,Laya.Ease.backOut));break;case`achievement`:t=(this.width+this.boxPage.x)/this.width*t,this.#t.push(Laya.Tween.to(this.boxPage,{x:-this.width},t,Laya.Ease.backOut,Laya.Handler.create(this,()=>this.#t=null)),Laya.Tween.to(this.btnStatistics,{fontSize:this.#e.min,anchorX:.5,anchorY:1},t,Laya.Ease.backOut),Laya.Tween.to(this.btnAchievement,{fontSize:this.#e.max,anchorX:.5,anchorY:1},t,Laya.Ease.backOut));break}}onRenderAchievement(e,t){let n=e.dataSource,r=e.getChildByName(`name`),i=e.getChildByName(`description`),a=e.getChildByName(`completed`),o=e.getChildByName(`uncomplete`);n.isAchieved?(r.text=n.name,i.text=n.description,a.visible=!0,o.visible=!1):(r.text=n.hide?`???`:n.name,i.text=n.hide?`???`:n.description,a.visible=!1,o.visible=!0),e.colorFilter=$ui.gradeFilter(n.grade)}};export{e as default};
@@ -1 +0,0 @@
var e=class extends ui.view.CyberTheme.CyberAchievementPopupUI{constructor(){super()}async popup({achievement:e},t){Laya.Tween.clearAll(this),Laya.Tween.clearAll(this.boxBg),this.alpha=.8,this.labName.text=e.name,this.labName.color=$ui.common.grade[e.grade],this.x=-this.width,this.boxBg.x=this.boxBg.width,await Promise.all([Laya.promises.Tween.to(this,{x:0},300,Laya.Ease.strongOut),Laya.promises.Tween.to(this.boxBg,{x:0},300,Laya.Ease.strongOut,50)]),await Laya.promises.Tween.to(this,{alpha:0},3e3,Laya.Ease.strongIn)}};export{e as default};
@@ -1 +0,0 @@
var e=class extends ui.view.DefaultTheme.AchievementPopupUI{constructor(){super()}async popup({achievement:e},t){Laya.Tween.clearAll(this),Laya.Tween.clearAll(this.boxBg),this.alpha=.8,this.labName.text=e.name,this.labName.color=$ui.common.grade[e.grade],this.x=-this.width,this.boxBg.x=this.boxBg.width,await Promise.all([Laya.promises.Tween.to(this,{x:0},300,Laya.Ease.strongOut),Laya.promises.Tween.to(this.boxBg,{x:0},300,Laya.Ease.strongOut,50)]),await Laya.promises.Tween.to(this,{alpha:0},3e3,Laya.Ease.strongIn)}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class e extends ui.view.DefaultTheme.CelebrityUI{constructor(){super(),this.btnRetry.on(Laya.Event.CLICK,this,()=>this.random()),this.btnNext.on(Laya.Event.CLICK,this,this.next),this.panelCharacter.vScrollBar.elasticDistance=150}#e;static#t=Laya.plugin.extractComponents(e.uiView,[`boxCharacter`,`boxTalent`,`boxUniqueUnGenerate`]);#n(t,n){let{name:r,property:i,talent:a}=t,o=$ui.common.characterItem,s=e.#t(`boxCharacter`),c=s.getChildByName(`vboxStates`),l=s.getChildByName(`boxName`);l.label=r;let u=$_.clone(i);for(let e in u)Math.abs(u[e]-Math.PI)<1e-7&&(u[e]=`π`);c.label=$_.format($lang.F_PropertyStr,u),$_.deepMapSet(l,o.name),$_.deepMapSet(c,o.state);for(let t of a){let n=e.#t(`boxTalent`);n.label=$_.format($lang.F_TalentSelection,t),n.y=c.height+c.space,$_.deepMapSet(n,$ui.common.card[t.grade].normal),c.addChild(n)}let d=new Laya.Box;return d.height=c.space,d.y=c.height,c.addChild(d),c.scaleY=0,s.dataSource=t,s.switch=e=>c.scaleY=+!!e,s.click=(e,t)=>{l.offAll(Laya.Event.CLICK),l.on(Laya.Event.CLICK,t||this,e)},n&&s.click(n),s}#r(t){let n=$ui.common.characterItem,r=e.#t(`boxUniqueUnGenerate`),i=r.getChildByName(`boxName`),a=r.getChildByName(`vboxStates`),o=a.getChildByName(`label`),s=a.getChildByName(`boxBtn`),c=s.getChildByName(`btn`);return $_.deepMapSet(i,n.name),$_.deepMapSet(a,n.state),$_.deepMapSet(c,n.name),s.y=o.height+a.space,o.event(Laya.Event.RESIZE),a.scaleY=0,r.dataSource=!1,r.switch=e=>a.scaleY=+!!e,r.click=(e,t)=>{i.offAll(Laya.Event.CLICK),i.on(Laya.Event.CLICK,t||this,e)},r.generate=(e,t)=>{c.offAll(Laya.Event.CLICK),c.on(Laya.Event.CLICK,t||this,e)},t&&r.generate(t),r}init(){this.random()}close(){this.#e=null,this.vboxCharacter.destroyChildren(!0)}random(e){this.#e=null,this.vboxCharacter.destroyChildren(!0);let{unique:t,normal:n}=core.characterRandom(),r=[],i=this.generateUnique(t,()=>{core.generateUnique(),this.random(n)});i&&r.push(i),(e||n).forEach(e=>r.push(this.#n(e))),r.forEach((e,t)=>{e.y=t,this.vboxCharacter.addChild(e),e.click(()=>{this.#e&&this.#e.switch(!1),this.#e=e,e.switch(!0),e.event(Laya.Event.RESIZE)})}),e&&i&&(this.#e=i,i.switch(!0),i.event(Laya.Event.RESIZE))}generateUnique(e,t){return e?e.generate?(e.name=$lang.UI_UniqueWaTaShi,this.#n(e)):this.#r(t):null}next(){if(!this.#e)return $$event(`message`,[`M_PleaseSelectOne`]);if(!this.#e.dataSource)return $$event(`message`,[`M_UnGenerate`]);let{property:e,talent:t}=this.#e.dataSource,n=core.remake(t.map(e=>e.id));n.length>0&&$$event(`message`,[n.map(e=>[`F_TalentReplace`,e])]),$ui.switchView(UI.pages.TRAJECTORY,{propertyAllocate:e,talents:t,enableExtend:!1})}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class e extends ui.view.CyberTheme.CelebrityUI{constructor(){super(),this.btnRetry.on(Laya.Event.CLICK,this,()=>this.random()),this.btnNext.on(Laya.Event.CLICK,this,this.next),this.panelCharacter.vScrollBar.elasticDistance=150}#e;static#t=Laya.plugin.extractComponents(e.uiView,[`boxCharacter`,`boxTalent`,`boxUniqueUnGenerate`]);#n(t,n){let{name:r,property:i,talent:a}=t,o=e.#t(`boxCharacter`),s=o.getChildByName(`vboxStates`),c=o.getChildByName(`boxName`);c.getChildByName(`label`).text=r;let l=$_.clone(i);for(let e in l)Math.abs(l[e]-Math.PI)<1e-7&&(l[e]=`π`);s.getChildByName(`label`).text=$_.format($lang.F_PropertyStr,l);for(let t of a){let n=e.#t(`boxTalent`);n.getChildByName(`label`).text=$_.format($lang.F_TalentSelection,t),n.y=s.height+s.space;let r=n.getChildByName(`grade${t.grade}`);r&&(r.visible=!0),s.addChild(n)}let u=new Laya.Box;return u.height=s.space,u.y=s.height,s.addChild(u),s.scaleY=0,o.dataSource=t,o.switch=e=>s.scaleY=+!!e,o.click=(e,t)=>{c.offAll(Laya.Event.CLICK),c.on(Laya.Event.CLICK,t||this,e)},n&&o.click(n),o}#r(t){let n=e.#t(`boxUniqueUnGenerate`),r=n.getChildByName(`boxName`),i=n.getChildByName(`vboxStates`),a=i.getChildByName(`label`),o=i.getChildByName(`boxBtn`).getChildByName(`btn`);return a.event(Laya.Event.RESIZE),i.scaleY=0,n.dataSource=!1,n.switch=e=>i.scaleY=+!!e,n.click=(e,t)=>{r.offAll(Laya.Event.CLICK),r.on(Laya.Event.CLICK,t||this,e)},n.generate=(e,t)=>{o.offAll(Laya.Event.CLICK),o.on(Laya.Event.CLICK,t||this,e)},t&&n.generate(t),n}init(){this.random()}close(){this.#e=null,this.vboxCharacter.destroyChildren(!0)}random(e){this.#e=null,this.vboxCharacter.destroyChildren(!0);let{unique:t,normal:n}=core.characterRandom(),r=[],i=this.generateUnique(t,()=>{core.generateUnique(),this.random(n)});i&&r.push(i),(e||n).forEach(e=>r.push(this.#n(e))),r.forEach((e,t)=>{e.y=t,this.vboxCharacter.addChild(e),e.click(()=>{this.#e&&this.#e.switch(!1),this.#e=e,e.switch(!0),e.event(Laya.Event.RESIZE)})}),e&&i&&(this.#e=i,i.switch(!0),i.event(Laya.Event.RESIZE))}generateUnique(e,t){return e?e.generate?(e.name=$lang.UI_UniqueWaTaShi,this.#n(e)):this.#r(t):null}next(){if(!this.#e)return $$event(`message`,[`M_PleaseSelectOne`]);if(!this.#e.dataSource)return $$event(`message`,[`M_UnGenerate`]);let{property:e,talent:t}=this.#e.dataSource,n=core.remake(t.map(e=>e.id));n.length>0&&$$event(`message`,[n.map(e=>[`F_TalentReplace`,e])]),$ui.switchView(UI.pages.TRAJECTORY,{propertyAllocate:e,talents:t,enableExtend:!1})}};export{e as default};
-7
View File
@@ -1,7 +0,0 @@
var e={UI_Next:`Next`,UI_Back:`Back`,UI_Skip:`Skip`,UI_Done:`Done`,UI_Cancel:`Cancel`,UI_Confirm:`Confirm`,UI_Retry:`Retry`,UI_Yes:`Yes`,UI_No:`No`,UI_OK:`OK`,UI_Close:`Close`,UI_Open:`Open`,UI_Search:`Search`,UI_Loading:`Now Loading`,UI_Error:`Error`,UI_Colon:`:`,UI_Times:`Times`,UI_Count:``,UI_Property_Charm:`CHR`,UI_Property_Intelligence:`INT`,UI_Property_Strength:`STR`,UI_Property_Money:`MNY`,UI_Property_Spirit:`SPR`,UI_Title_Remake:`Remake Simulate`,UI_Title_Subsequent:`The rubbish life doesn't want to stay for a second`,UI_Remake:`↻Remake Now`,UI_Thanks:`Thx`,UI_Achievement:`Achv`,UI_Cyber_Theme_Art_Design:`UI Design by 晰晰`,UI_Banner:`作者的新作《纸上谈亲》已上线小程序
微信/抖音搜索“纸上谈亲”即可游玩~`,UI_Title_Talent:`Talent Draw`,UI_Talent_Draw:`!10 Pulls!`,UI_Talent_Select_Uncomplete:`Choose 3 Talents, Please.`,UI_Title_Property:`Property Allocate`,UI_Left_Property_Point:`Left Property Point`,UI_Selected_Talent:`Selected Talent`,UI_Random_Allocate:`Random Allocate`,UI_Make_New_Life:`Make New Life`,UI_Manual:`Manual`,UI_Auto:`Auto`,UI_Goto_Summary:`Goto Summary`,UI_Title_Summary:`Life Summary`,UI_Talent_Extend:`Talent, You can choose one to extend`,UI_Remake_Again:`Remake Again`,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_Statistics:`Statistics`,UI_Rank:`Rank`,UI_Achievement_Achieve:`Achievement`,UI_Judge_Level_0:`Hell`,UI_Judge_Level_1:`Worse`,UI_Judge_Level_2:`Bad`,UI_Judge_Level_3:`Normal`,UI_Judge_Level_4:`Good`,UI_Judge_Level_5:`Great`,UI_Judge_Level_6:`Excellent`,UI_Judge_Level_7:`Perfect`,UI_Spirit_Judge_Level_0:`Hell`,UI_Spirit_Judge_Level_1:`Tortured`,UI_Spirit_Judge_Level_2:`Unlucky`,UI_Spirit_Judge_Level_3:`Normal`,UI_Spirit_Judge_Level_4:`Happy`,UI_Spirit_Judge_Level_5:`Blissful `,UI_Spirit_Judge_Level_6:`Paradise`,UI_AGE_Judge_Level_0:`Stillborn`,UI_AGE_Judge_Level_1:`Early`,UI_AGE_Judge_Level_2:`Young`,UI_AGE_Judge_Level_3:`Heyday`,UI_AGE_Judge_Level_4:`Middle`,UI_AGE_Judge_Level_5:`Sexagenarian`,UI_AGE_Judge_Level_6:`Septuagenarian`,UI_AGE_Judge_Level_7:`Octogenarian`,UI_AGE_Judge_Level_8:`Nonagenarian`,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_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:`Purple rate constant`,UI_Remake_Times_Judge_Level_1:`Purple rate double`,UI_Remake_Times_Judge_Level_2:`Purple rate triple`,UI_Remake_Times_Judge_Level_3:`Purple rate Quadruple`,UI_Remake_Times_Judge_Level_4:`Purple rate Quintuple`,UI_Remake_Times_Judge_Level_5:`Purple rate Sextuple`,UI_Achievement_Count_Judge_Level_0:`Orange rate constant`,UI_Achievement_Count_Judge_Level_1:`Orange rate double`,UI_Achievement_Count_Judge_Level_2:`Orange rate triple`,UI_Achievement_Count_Judge_Level_3:`Orange rate Quadruple`,UI_Achievement_Count_Judge_Level_4:`Orange rate Quintuple`,UI_Achievement_Count_Judge_Level_5:`Orange rate Sextuple`,UI_Support_Programmer:`Programmer`,UI_Support_Designer:`Designer`,UI_Save:`Save`,UI_Load:`Load`,UI_Read:`Copy`,UI_Write:`Paste`,UI_CopySuccess:`Copy to clipboard success`,UI_CopyFailed:`Copy to clipboard Failed`,UI_PasteSuccessDecodeSuccess:`Load Success!`,UI_PasteSuccessDecodeFailed:`Paste success, but load Failed!`,UI_PasteFailedDecodeSuccess:`Paste Failed, use input load success!`,UI_PasteFailedDecodeFailed:`Paste Failed, use input load Failed!`,UI_LoadSuccess:`Load Success!`,UI_LoadFailed:`Load Failed!`,UI_Title_Celebrity:`Past life was...`,UI_CustomMode:`Custom`,UI_CustomModeDescription:`10 Talent
Custom property`,UI_CelebrityMode:`Celebrity`,UI_CelebrityModeDescription:`Past life is celebrity
Rebirth to modern`,UI_AllNot:`↻All Not`,UI_UniqueWaTaShi:`Unique of mine`,UI_UniqueWaTaShiContent:`
Unique character card different from other 60 million player
All property, All talent, All random
All has only one chance`,UI_GenerateNow:`Generate Now`,M_NoRank:`There is no rank`,M_PleaseSelectOne:`Please Select One`,M_UnGenerate:`Unique Character no generate`,M_DisableExtendTalent:`Celebrity mode can't extends talent`,F_RemakeTimes:`Remake {0} Times`,F_AchievementCount:`Achievement {0}`,F_TalentSelection:`{name} ({description})`,F_TalentConflict:`Conflict with talent ({0})`,F_TalentSelectLimit:`Talent select limit {0}`,F_TalentSelectNotComplect:`Please select {0} talent`,F_PropertyPointLeft:`You have left {0} property point`,F_TalentReplace:`Talent replace [{source.name}] -> [{target.name}]`,F_PropertyStr:`CHR{CHR} INT{INT} STR{STR} MNY{MNY}`};export{e as default};
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.LoadingUI{constructor(){super()}static load(){return[`images/atlas/images/resource.atlas`]}show(){}onProgress(e){}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.CyberTheme.CyberMainUI{constructor(){super(),this.btnRemake.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.MODE)),this.btnAchievement.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.ACHIEVEMENT)),this.btnThanks.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.THANKS)),this.btnGithub.on(Laya.Event.CLICK,this,goto,[`github`]),this.btnDiscord.on(Laya.Event.CLICK,this,goto,[`discord`]),this.btnThemes.on(Laya.Event.CLICK,this,()=>$ui.showDialog(UI.pages.THEMES)),this.btnSaveLoad.on(Laya.Event.CLICK,this,()=>$ui.showDialog(UI.pages.SAVELOAD)),this.on(Laya.Event.RESIZE,this,()=>{let e=Math.max(this.width/this.imgBg.width,this.height/this.imgBg.height);this.imgBg.scale(e,e)})}static load(){return[`fonts/方正像素12.ttf`,`images/atlas/images/accessories.atlas`,`images/atlas/images/border.atlas`,`images/atlas/images/button.atlas`,`images/atlas/images/icons.atlas`,`images/atlas/images/progress.atlas`,`images/atlas/images/slider.atlas`]}init(){this.banner.visible=this.btnDiscord.visible=this.btnAchievement.visible=this.btnThanks.visible=!!core.times}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.DefaultTheme.MainUI{constructor(){super(),this.btnRemake.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.MODE)),this.btnAchievement.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.ACHIEVEMENT)),this.btnThanks.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.THANKS)),this.btnGithub.on(Laya.Event.CLICK,this,goto,[`github`]),this.btnDiscord.on(Laya.Event.CLICK,this,goto,[`discord`]),this.btnThemes.on(Laya.Event.CLICK,this,()=>$ui.showDialog(UI.pages.THEMES)),this.btnSaveLoad.on(Laya.Event.CLICK,this,()=>$ui.showDialog(UI.pages.SAVELOAD))}static load(){return[`images/atlas/images/icons.atlas`]}init(){this.banner.visible=this.btnDiscord.visible=this.btnAchievement.visible=this.btnThanks.visible=!!core.times;let e=this.labSubTitle.text;this.labSubTitle.text=` `,this.labSubTitle.text=e}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.MessagePopupUI{constructor(){super(),this.left=this.right=0,this.boxBg.defaultColor=`#000000`,this.boxBg.hoverColor=`#000000`,this.boxBg.radius=20}async popup({message:e},t){this.message.text=e,this.message.commitMeasure(),this.height=this.message.height+this.boxBg.radius*2+this.message.fontSize,Laya.Tween.clearAll(this),this.alpha=0,this.y=-2*this.height,await Laya.promises.Tween.to(this,{y:0,alpha:1},300,Laya.Ease.backOut),await Laya.promises.Tween.to(this,{alpha:0},300,Laya.Ease.strongIn,3e3)}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.CyberTheme.ModeUI{constructor(){super(),this.btnCustom.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.TALENT)),this.btnCelebrity.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.CELEBRITY))}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.DefaultTheme.ModeUI{constructor(){super(),this.btnCustom.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.TALENT)),this.btnCelebrity.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.CELEBRITY))}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.DefaultTheme.PropertyUI{constructor(){super();let e=this.#e=core.PropertyTypes;this.btnCharmIncrease.on(Laya.Event.CLICK,this,this.onPropertyAllocate,[e.CHR,1]),this.btnCharmReduce.on(Laya.Event.CLICK,this,this.onPropertyAllocate,[e.CHR,-1]),this.btnIntelligenceIncrease.on(Laya.Event.CLICK,this,this.onPropertyAllocate,[e.INT,1]),this.btnIntelligenceReduce.on(Laya.Event.CLICK,this,this.onPropertyAllocate,[e.INT,-1]),this.btnStrengthIncrease.on(Laya.Event.CLICK,this,this.onPropertyAllocate,[e.STR,1]),this.btnStrengthReduce.on(Laya.Event.CLICK,this,this.onPropertyAllocate,[e.STR,-1]),this.btnMoneyIncrease.on(Laya.Event.CLICK,this,this.onPropertyAllocate,[e.MNY,1]),this.btnMoneyReduce.on(Laya.Event.CLICK,this,this.onPropertyAllocate,[e.MNY,-1]),this.inputCharm.on(Laya.Event.INPUT,this,this.onPropertyAllocateInput,[e.CHR]),this.inputIntelligence.on(Laya.Event.INPUT,this,this.onPropertyAllocateInput,[e.INT]),this.inputStrength.on(Laya.Event.INPUT,this,this.onPropertyAllocateInput,[e.STR]),this.inputMoney.on(Laya.Event.INPUT,this,this.onPropertyAllocateInput,[e.MNY]);let t=({currentTarget:e})=>{e.text=``};this.inputCharm.on(Laya.Event.MOUSE_DOWN,this,t),this.inputIntelligence.on(Laya.Event.MOUSE_DOWN,this,t),this.inputStrength.on(Laya.Event.MOUSE_DOWN,this,t),this.inputMoney.on(Laya.Event.MOUSE_DOWN,this,t),this.btnRandomAllocate.on(Laya.Event.CLICK,this,this.random),this.btnNext.on(Laya.Event.CLICK,this,this.next),this.listSelectedTalents.renderHandler=Laya.Handler.create(this,this.renderTalent,null,!1)}#e;#t;#n;#r;init({talents:e}){this.listSelectedTalents.array=e;let t=core.remake(e.map(e=>e.id));t.length>0&&$$event(`message`,[t.map(e=>[`F_TalentReplace`,e])]),this.#t=core.getPropertyPoints(),this.#r=core.propertyAllocateLimit,this.labLeftPropertyPoint.text=this.#t,this.#n={[this.#e.CHR]:0,[this.#e.INT]:0,[this.#e.STR]:0,[this.#e.MNY]:0},this.updateAllocate()}next(){let e=this.#t-this.total;if(e>0)return $$event(`message`,[`F_PropertyPointLeft`,e]);$ui.switchView(UI.pages.TRAJECTORY,{propertyAllocate:this.#n,talents:this.listSelectedTalents.array,enableExtend:!0})}get total(){return this.#n[this.#e.CHR]+this.#n[this.#e.INT]+this.#n[this.#e.STR]+this.#n[this.#e.MNY]}updateAllocate(){let e=this.#n[this.#e.CHR],t=this.#n[this.#e.INT],n=this.#n[this.#e.STR],r=this.#n[this.#e.MNY];this.inputCharm.text=``+e,this.inputIntelligence.text=``+t,this.inputStrength.text=``+n,this.inputMoney.text=``+r,this.labLeftPropertyPoint.text=this.#t-this.total,this.btnCharmIncrease.disabled=this.btnCharmIncrease.gray=!1,this.btnCharmReduce.disabled=this.btnCharmReduce.gray=!1,this.btnIntelligenceIncrease.disabled=this.btnIntelligenceIncrease.gray=!1,this.btnIntelligenceReduce.disabled=this.btnIntelligenceReduce.gray=!1,this.btnStrengthIncrease.disabled=this.btnStrengthIncrease.gray=!1,this.btnStrengthReduce.disabled=this.btnStrengthReduce.gray=!1,this.btnMoneyIncrease.disabled=this.btnMoneyIncrease.gray=!1,this.btnMoneyReduce.disabled=this.btnMoneyReduce.gray=!1}check(e,t,n){return!(n<e||n>t)}random(){let e=this.#t,t=[,,,,].fill(this.#r[1]);for(;e>0;){let n=Math.round(Math.random()*(Math.min(e,this.#r[1])-1))+1;for(;;){let r=Math.floor(Math.random()*4)%4;if(!(t[r]-n<0)){t[r]-=n,e-=n;break}}}this.#n[this.#e.CHR]=this.#r[1]-t[0],this.#n[this.#e.INT]=this.#r[1]-t[1],this.#n[this.#e.STR]=this.#r[1]-t[2],this.#n[this.#e.MNY]=this.#r[1]-t[3],this.updateAllocate()}onPropertyAllocate(e,t){this.check(this.#r[0],this.#r[1],this.#n[e]+t)&&this.check(0,this.#t,this.total+t)&&(this.#n[e]+=t,this.updateAllocate())}onPropertyAllocateInput(e,t){let n=parseInt(t.text)||0,r=this.total;r+n<0?n=this.#r[0]*4-r:r+n>this.#t&&(n=this.#t-r),n<this.#r[0]?n=this.#r[0]:n>this.#r[1]&&(n=this.#r[1]);let i=n-this.#n[e];i?this.onPropertyAllocate(e,i):this.updateAllocate()}renderTalent(e){let t=e.dataSource;e.label=$_.format($lang.F_TalentSelection,t);let n=$ui.common.card[t.grade].normal;$_.deepMapSet(e,n)}};export{e as default};
File diff suppressed because one or more lines are too long
-36
View File
@@ -1,36 +0,0 @@
var e=class extends ui.view.SaveLoadUI{constructor(){super(),this.btnClose.on(Laya.Event.CLICK,this,async()=>{await this.close(),$ui.switchView(UI.pages.MAIN)}),this.btnRead.on(Laya.Event.CLICK,this,async()=>{let e=await $$copy(this.input.text=this.data);$$event(`message`,[e?`UI_CopySuccess`:`UI_CopyFailed`])}),this.btnWrite.on(Laya.Event.CLICK,this,async()=>{let e=await $$read();e==0?this.data=[this.input.text,`UI_PasteFailedDecodeSuccess`,`UI_PasteFailedDecodeFailed`]:(this.input.text=e,this.data=[e,`UI_PasteSuccessDecodeSuccess`,`UI_PasteSuccessDecodeFailed`])}),this.btnSave.on(Laya.Event.CLICK,this,()=>{let e=new Blob([this.data],{type:`application/json`});e=(e.slice||e.webkitSlice||e.mozSlice).call(e,0,e.size,`application/octet-stream`);let t=document.createElementNS(`http://www.w3.org/1999/xhtml`,`a`);t.href=URL.createObjectURL(e),t.download=`Remake_save_${new Date().toISOString().replace(`:`,`.`)}.json`,document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(t.href)}),this.btnLoad.on(Laya.Event.CLICK,this,()=>{let e=document.createElement(`input`);e.setAttribute(`type`,`file`),e.setAttribute(`name`,`file`),e.setAttribute(`accept`,`application/json`),e.setAttribute(`style`,`display: none;`),document.body.appendChild(e),e.click(),e.onchange=e=>{let t=e.target.files[0];if(!t)return;let n=new FileReader;n.onload=()=>this.data=[n.result],n.readAsText(t),document.body.removeChild(t)}}),this.input.on(Laya.Event.MOUSE_DOWN,this,()=>{this.input.setSelection(0,this.input.text.length)}),this.btnBackup.on(Laya.Event.CLICK,this,()=>{let e=document.createElement(`div`);document.body.appendChild(e),e.style=`
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0.95`;let t=document.createElement(`div`);t.style=`
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #fff;
opacity: 0.95`,document.body.appendChild(e),e.appendChild(t);let n=document.createElement(`textarea`);n.style=`position: absolute; width: ${window.innerWidth}px; height: ${window.innerHeight}px;`,n.value=JSON.stringify(JSON.parse(this.data),null,4),e.appendChild(n);let r=document.createElement(`div`);r.style=`
position: absolute;
top: 0;
right: 0;
width: 100px;
height: 100px;
background: red;
font-size:100px;
padding: 0;
line-height: 100px;
color: white;
opacity: 0.7`,r.innerHTML=`×`,e.appendChild(r),r.onclick=()=>e.remove();let i=document.createElement(`div`);i.style=`
position: absolute;
bottom: 0;
right: 0;
width: 100px;
height: 100px;
background: limegreen;
font-size: 35px;
padding: 0;
line-height: 50px;
color: white;
opacity: 0.7`,i.innerHTML=`LOAD<br>读取`,e.appendChild(i),i.onclick=()=>this.data=[n.value,`成功/success`,`失败/failed`,!0]})}static load(){return[`images/atlas/images/radio.atlas`]}init(){this.input.text=this.data}get data(){let e={};return Object.keys(localStorage).filter(e=>e.substr(0,4)!=`goog`).forEach(t=>e[t]=localStorage[t]),JSON.stringify(e)}set data([e,t=`UI_LoadSuccess`,n=`UI_LoadFailed`,r]){try{let n=JSON.parse(e);for(let e in n)localStorage.setItem(e,n[e]);r?alert(t):$$event(`message`,[t]),$ui.theme=$ui.theme,this.btnClose.event(Laya.Event.CLICK)}catch(e){console.error(e),r?alert(`${n}\n${e}`):$$event(`message`,[n])}}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.CyberTheme.CyberSummaryUI{constructor(){super(),this.listSelectedTalents.renderHandler=Laya.Handler.create(this,this.renderTalent,null,!1),this.btnAgain.on(Laya.Event.CLICK,this,this.onAgain)}#e;#t;onAgain(){core.talentExtend(this.#e),core.times++,$ui.switchView(UI.pages.MAIN)}init({talents:e,enableExtend:t}){let{summary:n,lastExtendTalent:r}=core;this.#t=t;let i=$ui.common.filter,a=$ui.common.grade,o=n[core.PropertyTypes.HAGE];this.labAge.text=``+o.value,this.labAgeJudge.text=o.judge,this.labAgeJudge.color=a[o.grade];let s=n[core.PropertyTypes.SUM];this.labTotal.text=``+s.value,this.labTotalJudge.text=s.judge,this.labTotalJudge.color=a[s.grade];let c=n[core.PropertyTypes.HCHR];this.labCharm.text=``+c.value,this.prgCharm.value=c.progress,this.labCharmJudge.text=c.judge,this.labCharmJudge.color=a[c.grade],this.boxCharmGrade.colorFilter=i[c.grade];let l=n[core.PropertyTypes.HINT];this.labIntelligence.text=``+l.value,this.prgIntelligence.value=l.progress,this.labIntelligenceJudge.text=l.judge,this.labIntelligenceJudge.color=a[l.grade],this.boxIntelligenceGrade.colorFilter=i[l.grade];let u=n[core.PropertyTypes.HSTR];this.labStrength.text=``+u.value,this.prgStrength.value=u.progress,this.labStrengthJudge.text=u.judge,this.labStrengthJudge.color=a[u.grade],this.boxStrengthGrade.colorFilter=i[u.grade];let d=n[core.PropertyTypes.HMNY];this.labMoney.text=``+d.value,this.prgMoney.value=d.progress,this.labMoneyJudge.text=d.judge,this.labMoneyJudge.color=a[d.grade],this.boxMoneyGrade.colorFilter=i[d.grade];let f=n[core.PropertyTypes.HSPR];this.labSpirit.text=``+f.value,this.prgSpirit.value=f.progress,this.labSpiritJudge.text=f.judge,this.labSpiritJudge.color=a[f.grade],this.boxSpiritGrade.colorFilter=i[f.grade],e.sort(({id:e,grade:t},{id:n,grade:i})=>e==r?-1:n==r?1:i-t),this.#t?this.#e=e[0].id:this.#e=r,this.listSelectedTalents.array=e}renderTalent(e){let t=e.dataSource,n=e.getChildByName(`labTitle`),r=e.getChildByName(`grade1`),i=e.getChildByName(`grade2`),a=e.getChildByName(`grade3`),o=e.getChildByName(`labDescription`),s=e.getChildByName(`selected`),c=e.getChildByName(`unselected`);switch(n.text=t.name,o.text=t.description,t.grade){case 1:r.visible=!0,i.visible=!1,a.visible=!1;break;case 2:r.visible=!1,i.visible=!0,a.visible=!1;break;case 3:r.visible=!1,i.visible=!1,a.visible=!0;break;default:r.visible=!1,i.visible=!1,a.visible=!1;break}s.visible=t.id==this.#e,c.visible=!s.visible,e.off(Laya.Event.CLICK,this,this.onSelectTalent),e.on(Laya.Event.CLICK,this,this.onSelectTalent,[t.id])}onSelectTalent(e){if(!this.#t)return $$event(`message`,[`M_DisableExtendTalent`]);e==this.#e?this.#e=null:this.#e=e,this.listSelectedTalents.refresh()}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.DefaultTheme.SummaryUI{constructor(){super(),this.listSummary.renderHandler=Laya.Handler.create(this,this.renderSummary,null,!1),this.listSelectedTalents.renderHandler=Laya.Handler.create(this,this.renderTalent,null,!1),this.btnAgain.on(Laya.Event.CLICK,this,this.onAgain)}#e;#t;onAgain(){core.talentExtend(this.#e),core.times++,$ui.switchView(UI.pages.MAIN)}init({talents:e,enableExtend:t}){let{summary:n,lastExtendTalent:r}=core;this.#t=t,this.listSummary.array=[[core.PropertyTypes.HCHR,$lang.UI_Property_Charm],[core.PropertyTypes.HINT,$lang.UI_Property_Intelligence],[core.PropertyTypes.HSTR,$lang.UI_Property_Strength],[core.PropertyTypes.HMNY,$lang.UI_Property_Money],[core.PropertyTypes.HSPR,$lang.UI_Property_Spirit],[core.PropertyTypes.HAGE,$lang.UI_Final_Age],[core.PropertyTypes.SUM,$lang.UI_Total_Judge]].map(([e,t])=>{let r=n[e];return{label:`${t}${$lang.UI_Colon} ${r.value} ${$lang[r.judge]}`,grade:r.grade}}),e.sort(({id:e,grade:t},{id:n,grade:i})=>e==r?-1:n==r?1:i-t),this.#t?this.#e=e[0].id:this.#e=r,this.listSelectedTalents.array=e}renderSummary(e){let{label:t,grade:n}=e.dataSource;e.label=t,$_.deepMapSet(e,$ui.common.summary[n])}renderTalent(e){let t=e.dataSource;e.label=$_.format($lang.F_TalentSelection,t);let n=$ui.common.card[t.grade];$_.deepMapSet(e,t.id==this.#e?n.selected:n.normal),e.getChildByName(`blank`).pause=t.id!=this.#e,e.off(Laya.Event.CLICK,this,this.onSelectTalent),e.on(Laya.Event.CLICK,this,this.onSelectTalent,[t.id])}onSelectTalent(e){if(!this.#t)return $$event(`message`,[`M_DisableExtendTalent`]);e==this.#e?this.#e=null:this.#e=e,this.listSelectedTalents.refresh()}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.CyberTheme.CyberTalentUI{constructor(){super(),this.btnDrawCard.on(Laya.Event.CLICK,this,this.onClickDrawCard),this.btnNext.on(Laya.Event.CLICK,this,this.onClickNext),this.listTalents.renderHandler=Laya.Handler.create(this,this.renderTalent,null,!1),this.listTalents.scrollBar.elasticDistance=150,this.on(Laya.Event.RESIZE,this,()=>{let e=this.listTalents?._itemRender?.props?.width;if(e){let t=Math.max(Math.floor((this.width-40)/e),1);this.listTalents.width=t*e+(t-1)*(this.listTalents.spaceY||0)}})}#e=new Set;static load(){return[`images/background/background_2@3x.png`]}init(){this.pageDrawCard.visible=!0,this.pageResult.visible=!1,this.btnNext.label=`UI_Talent_Select_Uncomplete`,this.#e.clear()}close(){}onClickDrawCard(){this.pageDrawCard.visible=!1,this.pageResult.visible=!0,this.listTalents.array=core.talentRandom()}onClickNext(){if(this.#e.size<core.talentSelectLimit)return $$event(`message`,[`F_TalentSelectNotComplect`,core.talentSelectLimit]);let e=[...this.#e].map(e=>this.listTalents.array[e]);$ui.switchView(UI.pages.PROPERTY,{talents:e,enableExtend:!0})}renderTalent(e,t){let n=e.dataSource,r=e.getChildByName(`hboxTitle`),i=r.getChildByName(`labTitle`),a=r.getChildByName(`grades`),o=a.getChildByName(`grade1`),s=a.getChildByName(`grade2`),c=a.getChildByName(`grade3`),l=e.getChildByName(`labDescription`),u=e.getChildByName(`unselected`),d=e.getChildByName(`selected`);switch(n.grade){case 1:a.x=0,i.x=1,o.visible=!0,s.visible=!1,c.visible=!1;break;case 2:a.x=0,i.x=1,o.visible=!1,s.visible=!0,c.visible=!1;break;case 3:a.x=0,i.x=1,o.visible=!1,s.visible=!1,c.visible=!0;break;default:a.x=1,i.x=0,o.visible=!1,s.visible=!1,c.visible=!1;break}i.text=n.name,i.event(Laya.Event.RESIZE),l.text=n.description,u.visible=!(d.visible=this.#e.has(t)),e.offAll(Laya.Event.CLICK),e.on(Laya.Event.CLICK,this,()=>{if(this.#e.has(t))this.#e.delete(t);else{if(this.#e.size>=core.talentSelectLimit)return $$event(`message`,[`F_TalentSelectLimit`,core.talentSelectLimit]);let e=core.exclude([...this.#e].map(e=>this.listTalents.array[e].id),this.listTalents.array[t].id);if(e!=null){for(let{name:t,id:n}of this.listTalents.array)if(e==n)return $$event(`message`,[`F_TalentConflict`,t]);return}this.#e.add(t)}this.btnNext.label=this.#e.size===core.talentSelectLimit?`UI_Next`:`UI_Talent_Select_Uncomplete`,u.visible=!(d.visible=this.#e.has(t))})}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.DefaultTheme.TalentUI{constructor(){super(),this.btnDrawCard.on(Laya.Event.CLICK,this,this.onClickDrawCard),this.btnNext.on(Laya.Event.CLICK,this,this.onClickNext),this.listTalents.renderHandler=Laya.Handler.create(this,this.renderTalent,null,!1),this.listTalents.scrollBar.elasticDistance=150}#e=new Set;init(){this.pageDrawCard.visible=!0,this.pageResult.visible=!1,this.btnNext.label=`UI_Talent_Select_Uncomplete`,this.#e.clear()}close(){}onClickDrawCard(){this.pageDrawCard.visible=!1,this.pageResult.visible=!0,this.listTalents.array=core.talentRandom()}onClickNext(){if(this.#e.size<core.talentSelectLimit)return $$event(`message`,[`F_TalentSelectNotComplect`,core.talentSelectLimit]);let e=[...this.#e].map(e=>this.listTalents.array[e]);$ui.switchView(UI.pages.PROPERTY,{talents:e,enableExtend:!0})}renderTalent(e,t){let n=e.dataSource,r=e.getChildByName(`blank`);e.label=$_.format($lang.F_TalentSelection,n);let i=$ui.common.card[n.grade],a=()=>{let n=this.#e.has(t);r.pause=!n,$_.deepMapSet(e,n?i.selected:i.normal)};a(),e.offAll(Laya.Event.CLICK),e.on(Laya.Event.CLICK,this,()=>{if(this.#e.has(t))this.#e.delete(t);else{if(this.#e.size>=core.talentSelectLimit)return $$event(`message`,[`F_TalentSelectLimit`,core.talentSelectLimit]);let e=core.exclude([...this.#e].map(e=>this.listTalents.array[e].id),this.listTalents.array[t].id);if(e!=null){for(let{name:t,id:n}of this.listTalents.array)if(e==n)return $$event(`message`,[`F_TalentConflict`,t]);return}this.#e.add(t)}this.btnNext.label=this.#e.size===core.talentSelectLimit?`UI_Next`:`UI_Talent_Select_Uncomplete`,a()})}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class e extends ui.view.DefaultTheme.ThanksUI{constructor(){super(),this.btnBack.on(Laya.Event.CLICK,this,()=>$ui.switchView(UI.pages.MAIN)),this.listSupports.renderHandler=Laya.Handler.create(this,this.renderSupport,null,!1),this.panelTopSupports.vScrollBar.elasticDistance=150,this.listSupports.scrollBar.elasticDistance=150,this.btnAFD.on(Laya.Event.CLICK,this,goto,[`sponsor_afd`]),this.btnDDF.on(Laya.Event.CLICK,this,goto,[`sponsor_ddf`])}static#e=Laya.plugin.extractComponents(e.uiView,[`boxTopSupport`]);#t(){let t=e.#e(`boxTopSupport`);return t.name=t.getChildByName(`name`),t.comment=t.getChildByName(`comment`),$_.deepMapSet(t,$ui.common.topSupportItem),t}#n;init(){let e=[];this.#n=[],core.specialThanks.sort(()=>.5-Math.random()).forEach(({group:t,name:n,comment:r,color:i})=>t==2?e.push({name:n,color:i}):this.renderTopSupport(n,r,i)),this.listSupports.array=e}renderTopSupport(e,t,n){let r=this.#t();r.name.text=e,r.comment.text=t,r.name.color=n||`#000000`,this.vboxTopSupports.addChild(r),this.#n.push(r),this.#n.forEach((e,t)=>e.y=t)}renderSupport(e){let{name:t,color:n}=e.dataSource;e.text=t,e.color=n||$ui.common.defaultFontColor}close(){this.#n.forEach(e=>{e.removeSelf(),e.destroy()}),this.#n=null}};export{e as default};
-1
View File
@@ -1 +0,0 @@
var e=class extends ui.view.ThemesUI{constructor(){super(),this.btnClose.on(Laya.Event.CLICK,this,()=>this.close()),this.btnOK.on(Laya.Event.CLICK,this,async()=>{let e=this.selected;if(!e==$ui.theme)return this.close();$ui.theme=e,await this.close(),$ui.switchView(UI.pages.MAIN)})}static load(){return[`images/atlas/images/radio.atlas`]}init(){this.selected=localStorage.getItem(`theme`)}get selected(){switch(this.radioTheme.selectedIndex){case 0:return`cyber`;case 1:return`dark`;case 2:return`light`;default:return`default`}}set selected(e){let t;switch(e){case`cyber`:t=0;break;case`dark`:t=1;break;case`light`:t=2;break;default:t=-1;break}this.radioTheme.selectedIndex=t}};export{e as default};
-2
View File
@@ -1,2 +0,0 @@
var e=class e extends ui.view.CyberTheme.CyberTrajectoryUI{constructor(){super();let e=[0,0];this.panelTrajectory.on(Laya.Event.MOUSE_DOWN,this,t=>e=[t.stageX,t.stageY]),this.panelTrajectory.on(Laya.Event.MOUSE_UP,this,t=>{let n=t.stageX-e[0],r=t.stageY-e[1];Math.sqrt(Math.abs(n)+Math.abs(r))>10||this.onNext()}),this.btnSummary.on(Laya.Event.CLICK,this,this.onSummary),this.panelTrajectory.vScrollBar.elasticDistance=150;let t=null,n=null,r=e=>{let t=this.panelTrajectory.vScrollBar.value+e;t<0&&(t=0),t>this.panelTrajectory.vScrollBar.max&&(t=this.panelTrajectory.vScrollBar.max),this.panelTrajectory.scrollTo(0,t)},i=(e,i)=>{e.off(Laya.Event.CLICK,this,r),e.on(Laya.Event.CLICK,this,r,[100*i]),n=setTimeout(()=>{e.off(Laya.Event.CLICK,this,r),t=setInterval(()=>r(10*i),10)},100)},a=()=>{t&&=(clearInterval(t),null),n&&=(clearTimeout(n),null)};this.btnUp.on(Laya.Event.MOUSE_DOWN,this,i,[this.btnUp,-1]),this.btnDown.on(Laya.Event.MOUSE_DOWN,this,i,[this.btnDown,1]),this.btnUp.on(Laya.Event.MOUSE_UP,this,a),this.btnUp.on(Laya.Event.MOUSE_OUT,this,a),this.btnDown.on(Laya.Event.MOUSE_UP,this,a),this.btnDown.on(Laya.Event.MOUSE_OUT,this,a),this.scbSpeed.on(Laya.Event.CHANGE,this,()=>this.speed=this.scbSpeed.value),this.scbSpeed.on(Laya.Event.MOUSE_UP,this,()=>this.onNext())}#e;#t;static#n=Laya.plugin.extractComponents(e.uiView,[`boxTrajectoryItem`]);#r(){let t=e.#n(`boxTrajectoryItem`);return t.labContent=t.getChildByName(`labContent`),t.labAge=t.getChildByName(`hboxAge`).getChildByName(`labAge`),t.boxGrade=t.getChildByName(`boxGrade`),t}#i;#a;#o;#s;init({propertyAllocate:e,talents:t,enableExtend:n}){this.#s=n,this.boxParticle.visible=!1,this.boxSpeed.visible=!0,this.btnSummary.visible=!1,this.#a=[],this.#i=!1,this.#o=t,core.start(e),this.updateProperty(),this.onNext()}close(){this.scbSpeed.value=0,this.speed=0,this.#a.forEach(e=>{e.removeSelf(),e.destroy()}),this.#a=null}updateProperty(){let e=core.PropertyTypes,t=core.propertys;this.labCharm.text=t[e.CHR],this.labIntelligence.text=t[e.INT],this.labStrength.text=t[e.STR],this.labMoney.text=t[e.MNY],this.labSpirit.text=t[e.SPR]}onNext(){if(this.#i)return;let{age:e,content:t,isEnd:n}=core.next();this.#i=n,n&&(this.boxSpeed.visible=!1,this.btnSummary.visible=!0,Laya.timer.frameOnce(1,this,()=>{this.panelTrajectory.scrollTo(0,this.panelTrajectory.contentHeight)})),this.panelTrajectory.scrollTo(0,this.panelTrajectory.contentHeight),this.renderTrajectory(e,t),e>=100&&(this.boxParticle.visible=!0),this.updateProperty()}renderTrajectory(e,t){let n=this.#r();n.labAge.text=``+e,n.labContent.text=t.map(({type:e,description:t,grade:n,name:r,postEvent:i})=>{switch(e){case`TLT`:return`天赋【${r}】发动:${t}`;case`EVT`:return t+(i?`\n${i}`:``)}}).join(`
`),$_.deepMapSet(n.boxGrade,$ui.common.gradeBlk[t[t.length-1].grade||0]),this.vboxTrajectory.addChild(n),this.#a.push(n),n.y=this.vboxTrajectory.height}onSummary(){let e=this.#o;$ui.switchView(UI.pages.SUMMARY,{talents:e,enableExtend:this.#s})}get speed(){return this.#e}set speed(e){this.#e=e,this.prgSpeed.value=e/this.scbSpeed.max,clearInterval(this.#t),this.#t=null,e&&(this.#t=setInterval(()=>this.onNext(),3e3*(1-this.prgSpeed.value)+300))}};export{e as default};
-2
View File
@@ -1,2 +0,0 @@
var e=class e extends ui.view.DefaultTheme.TrajectoryUI{constructor(){super();let e=[0,0];this.panelTrajectory.on(Laya.Event.MOUSE_DOWN,this,t=>e=[t.stageX,t.stageY]),this.panelTrajectory.on(Laya.Event.MOUSE_UP,this,t=>{let n=t.stageX-e[0],r=t.stageY-e[1];Math.sqrt(Math.abs(n)+Math.abs(r))>10||this.onNext()}),this.btnSummary.on(Laya.Event.CLICK,this,this.onSummary),this.panelTrajectory.vScrollBar.elasticDistance=150,this.scbSpeed.on(Laya.Event.CHANGE,this,()=>this.speed=this.scbSpeed.value),this.scbSpeed.on(Laya.Event.MOUSE_UP,this,()=>this.onNext())}#e;#t;static load(){return[`images/atlas/images/progress.atlas`,`images/atlas/images/slider.atlas`]}static#n=Laya.plugin.extractComponents(e.uiView,[`boxTrajectoryItem`]);#r(){let t=e.#n(`boxTrajectoryItem`);t.labContent=t.getChildByName(`labContent`),t.labAge=t.getChildByName(`hboxAge`).getChildByName(`labAge`);let n=$ui.common.trajectoryItem;return $_.deepMapSet(t,n.box),t.grade=e=>{$_.deepMapSet(t,n.grade[e||0])},t.getChildByName(`hboxAge`)._childs.forEach(e=>e.color=n.ageColor),t.labContent.color=n.contentColor,t}#i;#a;#o;#s;init({propertyAllocate:e,talents:t,enableExtend:n}){this.#s=n,this.boxParticle.visible=!1,this.boxSpeed.visible=!0,this.btnSummary.visible=!1,this.#a=[],this.#i=!1,this.#o=t,core.start(e),this.updateProperty(),this.onNext()}close(){this.scbSpeed.value=0,this.speed=0,this.#a.forEach(e=>{e.removeSelf(),e.destroy()}),this.#a=null}updateProperty(){let e=core.PropertyTypes,t=core.propertys;this.labCharm.text=t[e.CHR],this.labIntelligence.text=t[e.INT],this.labStrength.text=t[e.STR],this.labMoney.text=t[e.MNY],this.labSpirit.text=t[e.SPR]}onNext(){if(this.#i)return;let{age:e,content:t,isEnd:n}=core.next();this.#i=n,n&&(this.boxSpeed.visible=!1,this.btnSummary.visible=!0,Laya.timer.frameOnce(1,this,()=>{this.panelTrajectory.scrollTo(0,this.panelTrajectory.contentHeight)})),this.panelTrajectory.scrollTo(0,this.panelTrajectory.contentHeight),this.renderTrajectory(e,t),e>=100&&(this.boxParticle.visible=!0),this.updateProperty()}renderTrajectory(e,t){let n=this.#r();n.labAge.text=``+e,n.labContent.text=t.map(({type:e,description:t,grade:n,name:r,postEvent:i})=>{switch(e){case`TLT`:return`天赋【${r}】发动:${t}`;case`EVT`:return t+(i?`\n${i}`:``)}}).join(`
`),n.grade(t[t.length-1].grade),this.vboxTrajectory.addChild(n),this.#a.push(n),n.y=this.vboxTrajectory.height}onSummary(){let e=this.#o;$ui.switchView(UI.pages.SUMMARY,{talents:e,enableExtend:this.#s})}get speed(){return this.#e}set speed(e){this.#e=e,this.prgSpeed.value=e/this.scbSpeed.max,clearInterval(this.#t),this.#t=null,e&&(this.#t=setInterval(()=>this.onNext(),3e3*(1-this.prgSpeed.value)+300))}};export{e as default};
-7
View File
@@ -1,7 +0,0 @@
var e={UI_Next:`下一步`,UI_Back:`返回`,UI_Skip:`跳过`,UI_Done:`完成`,UI_Cancel:`取消`,UI_Confirm:`确认`,UI_Retry:`重试`,UI_Yes:``,UI_No:``,UI_OK:`确定`,UI_Close:`关闭`,UI_Open:`打开`,UI_Search:`搜索`,UI_Loading:`加载中...`,UI_Error:`错误`,UI_BackupBtn:`上面没有效果就试试这个吧`,UI_Colon:``,UI_Times:``,UI_Count:``,UI_Property_Charm:`颜值`,UI_Property_Intelligence:`智力`,UI_Property_Strength:`体质`,UI_Property_Money:`家境`,UI_Property_Spirit:`快乐`,UI_Title_Remake:`人生重开模拟器`,UI_Title_Subsequent:`这垃圾人生一秒也不想待了`,UI_Remake:`↻立即重开`,UI_Thanks:`感谢`,UI_Achievement:`成就`,UI_Cyber_Theme_Art_Design:`UI 设计 by 晰晰`,UI_Banner:`作者的新作《纸上谈亲》已上线小程序
微信/抖音搜索纸上谈亲即可游玩`,UI_Title_Talent:`天赋抽卡`,UI_Talent_Draw:`10连抽`,UI_Talent_Select_Uncomplete:`请选取 3 个天赋`,UI_Title_Property:`调整初始属性`,UI_Left_Property_Point:`剩余属性点`,UI_Selected_Talent:`已选天赋`,UI_Random_Allocate:`随机分配`,UI_Make_New_Life:`开始新人生`,UI_Manual:`手动`,UI_Auto:`自动`,UI_Goto_Summary:`人生总结`,UI_Title_Summary:`人生总结`,UI_Talent_Extend:`天赋你可以选择一个下辈子还能抽到`,UI_Remake_Again:`再次重开`,UI_Final_Age:`享年`,UI_Total_Judge:`总评`,UI_Achievement_Count:`获得成就`,UI_Remake_Times:`重开次数`,UI_Event_Collection_Rate:`事件收集率`,UI_Talent_Collection_Rate:`天赋收集率`,UI_Statistics:`统计`,UI_Rank:`排行榜`,UI_Achievement_Achieve:`获得成就`,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_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_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_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_Support_Programmer:`打赏程序(顿顿饭)`,UI_Support_Designer:`打赏策划(爱发电)`,UI_Save:`存档`,UI_Load:`读档`,UI_Read:`复制`,UI_Write:`粘贴`,UI_LoadSuccess:`读档成功`,UI_LoadFailed:`读档失败`,UI_CopySuccess:`成功复制存档到剪贴板`,UI_CopyFailed:`复制存档到剪贴板失败请手动复制存档内容`,UI_PasteSuccessDecodeSuccess:`读档成功`,UI_PasteSuccessDecodeFailed:`粘贴剪贴板存档内容成功但剪贴板内容读档失败`,UI_PasteFailedDecodeSuccess:`粘贴剪贴板存档内容失败使用输入的内容读档成功`,UI_PasteFailedDecodeFailed:`粘贴剪贴板存档内容失败使用输入的内容读档失败`,UI_Title_Celebrity:`你的前世是...`,UI_CustomMode:`经典模式`,UI_CustomModeDescription:`10连抽天赋
自由分配属性`,UI_CelebrityMode:`名人模式`,UI_CelebrityModeDescription:`前世是古代名人
重开到了现代`,UI_AllNot:`都不是`,UI_UniqueWaTaShi:`独一无二的我`,UI_UniqueWaTaShiContent:`
6000万玩家中独一无二的角色卡
所有属性 所有天赋 随机生成
每人只能生成一次`,UI_GenerateNow:`立即生成`,M_NoRank:`别卷了没有排行榜`,M_PleaseSelectOne:`请选择一个名人`,M_UnGenerate:`独一无二的我还没有生成`,M_DisableExtendTalent:`名人模式不能继承天赋`,F_RemakeTimes:`已重开{0}`,F_AchievementCount:`成就达成{0}`,F_TalentSelection:`{name}{description}`,F_TalentConflict:`与已选的{0}天赋冲突`,F_TalentSelectLimit:`只能选 {0} 个天赋`,F_TalentSelectNotComplect:`要选满{0}个天赋`,F_PropertyPointLeft:`你还有 {0} 属性点没有分配完`,F_TalentReplace:`天赋替换{source.name}->{target.name}`,F_PropertyStr:`颜值{CHR} 智力{INT} 体质{STR} 家境{MNY}`};export{e as default};
-180
View File
@@ -1,180 +0,0 @@
颜值: <input class="prop" name="CHR" style="width:300px;" value="5" >(CHR)<br/>
智力: <input class="prop" name="INT" style="width:300px;" value="5" >(INT)<br/>
体质: <input class="prop" name="STR" style="width:300px;" value="5" >(STR)<br/>
家境: <input class="prop" name="MNY" style="width:300px;" value="5" >(MNY)<br/>
快乐: <input class="prop" name="SPR" style="width:300px;" value="5" >(SPR)<br/>
生命: <input class="prop" name="LIF" style="width:300px;" value="5" >(LIF)<br/>
天赋: <input class="prop" name="TLT" style="width:300px;" value="[5]" >(TLT)<br/>
事件: <input class="prop" name="EVT" style="width:300px;" value="[5]" >(EVT)<br/>
<br/><br/>
表达式:<input id="conditions" style="width:500px;"><br/><br/>
结果:<span id="result" style="color:red;"></span><br/><br/>
<button id="submit">&nbsp;&nbsp;&nbsp;&nbsp;</button><br/>
<script>
const DEFAULT_PROP = {
CHR: 5, // 颜值 charm CHR
INT: 5, // 智力 intelligence INT
STR: 5, // 体质 strength STR
MNY: 5, // 家境 money MNY
SPR: 5, // 快乐 spirit SPR
LIF: 5, // 生命 life LIF
TLT: [5], // 天赋 talent TLT
EVT: [5], // 事件 event EVT
};
document.querySelector("#submit").onclick = function() {
document.querySelectorAll('.prop').forEach(({name, value})=>DEFAULT_PROP[name] = JSON.parse(value));
conditions = document.querySelector("#conditions").value;
const result = check(conditions);
document.querySelector("#result").textContent = result;
}
function getProp(prop) {
switch(prop) {
case 'CHR':
case 'INT':
case 'STR':
case 'MNY':
case 'SPR':
case 'LIF':
case 'TLT':
case 'EVT': return DEFAULT_PROP[prop];
default: return null;
}
}
function check(condition) {
const conditions = parseCondition(condition);
return checkParsedCondition(conditions);
}
function checkParsedCondition(conditions) {
if(!Array.isArray(conditions)) return checkLogic(conditions);
if(conditions.length == 0) return true;
if(conditions.length == 1) return checkParsedCondition(conditions[0]);
let ret = checkParsedCondition(conditions[0]);
for(let i=1; i<conditions.length; i+=2) {
switch(conditions[i]) {
case '&':
if(ret) ret = checkParsedCondition(conditions[i+1]);
break;
case '|':
if(ret) return true;
ret = checkParsedCondition(conditions[i+1]);
break;
default: return false;
}
}
return ret;
}
function checkLogic(condition) {
const length = condition.length;
let i = condition.search(/[><\!\?=]/);
const prop = condition.substring(0,i);
const symbol = condition.substring(i, i+=(condition[i+1]=='='?2:1));
const d = condition.substring(i, length);
const propData = getProp(prop);
const conditionData = d[0]=='['? JSON.parse(d): Number(d);
switch(symbol) {
case '>': return propData > conditionData;
case '<': return propData < conditionData;
case '>=': return propData >= conditionData;
case '<=': return propData <= conditionData;
case '=':
if(Array.isArray(propData))
return propData.includes(conditionData);
return propData == conditionData;
case '!=':
if(Array.isArray(propData))
return !propData.includes(conditionData);
return propData == conditionData;
case '?':
if(Array.isArray(propData)) {
for(const p of propData)
if(conditionData.includes(p)) return true;
return false;
}
return conditionData.includes(propData);
case '!':
if(Array.isArray(propData)) {
for(const p of propData)
if(conditionData.includes(p)) return false;
return true;
}
return !conditionData.includes(propData);
default: return false;
}
}
function parseCondition(condition) {
const conditions = [];
const length = condition.length;
const stack = [];
stack.unshift(conditions);
let cursor = 0;
const catchString = i => {
const str = condition.substring(cursor, i).trim();
cursor = i;
if(str) stack[0].push(str);
};
for(let i=0; i<length; i++) {
switch(condition[i]) {
case ' ': continue;
case '(':
catchString(i);
cursor ++;
const sub = [];
stack[0].push(sub);
stack.unshift(sub);
break;
case ')':
catchString(i);
cursor ++;
stack.shift();
break;
case '|':
case '&':
catchString(i);
catchString(i+1);
break;
default: continue;
}
}
catchString(length);
return conditions;
}
// function debug(...conditions) {
// for(const condition of conditions)
// console.debug(check(condition), '\t', condition);
// }
//
// debug(
// '(STR<2&MNY>3)|(MNY<2&CHR<2)',
// '(STR<2&MNY>3)',
// '(STR>2&MNY>3)',
// '((((STR>2&MNY>2))))',
// '((((STR>2&MNY>2)|(MNY<2&CHR<2))))',
// '((((STR>2&MNY>2)|(MNY<2&CHR<2)&(STR>2&MNY>3))))',
// '((((STR>2&MNY>2)|(MNY<2&CHR<2))&(STR>2&MNY>3)))',
// 'EVT![1,2,3]',
// 'EVT![1,2]',
// 'EVT?[1,2,3]',
// 'EVT?[1,2]',
// );
</script>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

-69
View File
@@ -1,69 +0,0 @@
D .
D fonts
R 39B4F491 方正像素12.ttf
D images
D images/accessories
P ADDDCB66 cardicon@3x.png
R 0E2F6E7F insert_coin@3x.png
R B45325FC title@3x.png
P 074FEF52 title_left@3x.png
R 97E72B92 title_neon@3x.png
P 2BA0101A title_right@3x.png
R E1602E15 titlebar@3x.png
D images/background
R 9343F3BB background_1@3x.png
R 0B49B27D background_2@3x.png
D images/border
P A2B33396 achievement@3x.png
R 45A1A604 achievement_complete@3x.png
R 6CF3EE8E border_1@3x.png
R AAEA6308 border_2@3x.png
R A57A026E card@3x.png
P C1EDDBED property@3x.png
R A8C7A5A5 talent_item@3x.png
R DCE4E73A talent_item_selected@3x.png
R 373CDF45 up@3x.png
D images/button
P 69FF5572 button_back@3x.png
R 441BFE78 button_main@3x.png
P F2B85B54 button_small@3x.png
D images/icons
P C677F3AE icon_achievement@3x.png
P 3D072134 icon_chr@3x.png
P C663FAF5 icon_discord.png
P 3FA91C13 icon_github.png
P AB934AEA icon_int@3x.png
P F1A0724B icon_mny@3x.png
P D5AADAC9 icon_rank@3x.png
P 0806E5F3 icon_save.png
P 2DB0325D icon_spr@3x.png
P 2EFA541B icon_str@3x.png
P 804842C9 icon_thanks@3x.png
P 96DD5D94 icon_themes.png
P 6ECB5FEC icon_up@3x.png
D images/progress
P E2BF0C93 progress_1@3x$bar.png
P B86E1D0F progress_1@3x.png
P E7F15BA7 progress_2$bar.png
P 641A22BF progress_2.png
P AF80A9AF progress_s$bar.png
P 41417E8D progress_s.png
D images/radio
P CCF63014 radio_cyber.png
P 040DE73C radio_dark.png
P BA975F5A radio_light.png
D images/resource
P F3659301 bottombreath.png
P 496D6FB9 circle.png
P B5087365 circleflash.png
D images/slider
P 9682C590 hslider_s$bar.png
P F6238BD4 hslider_s$down.png
P F4198287 hslider_s$up.png
P 2A785866 hslider_s.png
R 8B95E6D3 vslider_1@3x$bar.png
P 6581FBA8 vslider_1@3x$down.png
P 6581FBA8 vslider_1@3x$up.png
R C9587878 vslider_1@3x.png
D images/texture
P FD231754 texture_1.png
@@ -1 +0,0 @@
{"frames":{"cardicon@3x.png":{"frame":{"h":466,"idx":0,"w":455,"x":0,"y":0},"sourceSize":{"h":466,"w":455},"spriteSourceSize":{"x":0,"y":0}},"title_left@3x.png":{"frame":{"h":27,"idx":0,"w":48,"x":456,"y":0},"sourceSize":{"h":27,"w":48},"spriteSourceSize":{"x":0,"y":0}},"title_right@3x.png":{"frame":{"h":27,"idx":0,"w":48,"x":456,"y":28},"sourceSize":{"h":27,"w":48},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"accessories.png","prefix":"images/accessories/"}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

-1
View File
@@ -1 +0,0 @@
{"frames":{"achievement@3x.png":{"frame":{"h":412,"idx":0,"w":486,"x":0,"y":0},"sourceSize":{"h":412,"w":486},"spriteSourceSize":{"x":0,"y":0}},"property@3x.png":{"frame":{"h":84,"idx":0,"w":257,"x":0,"y":413},"sourceSize":{"h":84,"w":257},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"border.png","prefix":"images/border/"}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

-1
View File
@@ -1 +0,0 @@
{"frames":{"button_back@3x.png":{"frame":{"h":114,"idx":0,"w":147,"x":0,"y":91},"sourceSize":{"h":114,"w":147},"spriteSourceSize":{"x":0,"y":0}},"button_small@3x.png":{"frame":{"h":90,"idx":0,"w":225,"x":0,"y":0},"sourceSize":{"h":90,"w":225},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"button.png","prefix":"images/button/"}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

-1
View File
@@ -1 +0,0 @@
{"frames":{"icon_achievement@3x.png":{"frame":{"h":69,"idx":0,"w":65,"x":188,"y":385},"sourceSize":{"h":69,"w":65},"spriteSourceSize":{"x":0,"y":0}},"icon_chr@3x.png":{"frame":{"h":61,"idx":0,"w":57,"x":320,"y":448},"sourceSize":{"h":61,"w":57},"spriteSourceSize":{"x":0,"y":0}},"icon_discord.png":{"frame":{"h":384,"idx":0,"w":384,"x":0,"y":0},"sourceSize":{"h":384,"w":384},"spriteSourceSize":{"x":0,"y":0}},"icon_github.png":{"frame":{"h":384,"idx":0,"w":384,"x":385,"y":0},"sourceSize":{"h":384,"w":384},"spriteSourceSize":{"x":0,"y":0}},"icon_int@3x.png":{"frame":{"h":57,"idx":0,"w":54,"x":188,"y":455},"sourceSize":{"h":57,"w":54},"spriteSourceSize":{"x":0,"y":0}},"icon_mny@3x.png":{"frame":{"h":57,"idx":0,"w":54,"x":243,"y":455},"sourceSize":{"h":57,"w":54},"spriteSourceSize":{"x":0,"y":0}},"icon_rank@3x.png":{"frame":{"h":62,"idx":0,"w":72,"x":320,"y":385},"sourceSize":{"h":62,"w":72},"spriteSourceSize":{"x":0,"y":0}},"icon_save.png":{"frame":{"h":90,"idx":0,"w":90,"x":97,"y":385},"sourceSize":{"h":90,"w":90},"spriteSourceSize":{"x":0,"y":0}},"icon_spr@3x.png":{"frame":{"h":60,"idx":0,"w":57,"x":378,"y":448},"sourceSize":{"h":60,"w":57},"spriteSourceSize":{"x":0,"y":0}},"icon_str@3x.png":{"frame":{"h":57,"idx":0,"w":54,"x":393,"y":385},"sourceSize":{"h":57,"w":54},"spriteSourceSize":{"x":0,"y":0}},"icon_thanks@3x.png":{"frame":{"h":69,"idx":0,"w":65,"x":254,"y":385},"sourceSize":{"h":69,"w":65},"spriteSourceSize":{"x":0,"y":0}},"icon_themes.png":{"frame":{"h":96,"idx":0,"w":96,"x":0,"y":385},"sourceSize":{"h":96,"w":96},"spriteSourceSize":{"x":0,"y":0}},"icon_up@3x.png":{"frame":{"h":18,"idx":0,"w":33,"x":97,"y":476},"sourceSize":{"h":18,"w":33},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"icons.png","prefix":"images/icons/"}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

@@ -1 +0,0 @@
{"frames":{"progress_1@3x$bar.png":{"frame":{"h":36,"idx":0,"w":203,"x":0,"y":262},"sourceSize":{"h":36,"w":203},"spriteSourceSize":{"x":0,"y":0}},"progress_1@3x.png":{"frame":{"h":36,"idx":0,"w":203,"x":204,"y":262},"sourceSize":{"h":36,"w":203},"spriteSourceSize":{"x":0,"y":0}},"progress_2$bar.png":{"frame":{"h":200,"idx":0,"w":200,"x":0,"y":0},"sourceSize":{"h":200,"w":200},"spriteSourceSize":{"x":0,"y":0}},"progress_2.png":{"frame":{"h":200,"idx":0,"w":200,"x":201,"y":0},"sourceSize":{"h":200,"w":200},"spriteSourceSize":{"x":0,"y":0}},"progress_s$bar.png":{"frame":{"h":60,"idx":0,"w":226,"x":0,"y":201},"sourceSize":{"h":60,"w":226},"spriteSourceSize":{"x":0,"y":0}},"progress_s.png":{"frame":{"h":60,"idx":0,"w":226,"x":227,"y":201},"sourceSize":{"h":60,"w":226},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"progress.png","prefix":"images/progress/"}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

-1
View File
@@ -1 +0,0 @@
{"frames":{"radio_cyber.png":{"frame":{"h":300,"idx":0,"w":300,"x":0,"y":0},"sourceSize":{"h":300,"w":300},"spriteSourceSize":{"x":0,"y":0}},"radio_dark.png":{"frame":{"h":300,"idx":0,"w":300,"x":0,"y":301},"sourceSize":{"h":300,"w":300},"spriteSourceSize":{"x":0,"y":0}},"radio_light.png":{"frame":{"h":300,"idx":0,"w":300,"x":301,"y":0},"sourceSize":{"h":300,"w":300},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"radio.png","prefix":"images/radio/"}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

@@ -1 +0,0 @@
{"frames":{"bottombreath.png":{"frame":{"h":200,"idx":0,"w":200,"x":0,"y":0},"sourceSize":{"h":200,"w":200},"spriteSourceSize":{"x":0,"y":0}},"circle.png":{"frame":{"h":200,"idx":0,"w":200,"x":0,"y":201},"sourceSize":{"h":200,"w":200},"spriteSourceSize":{"x":0,"y":0}},"circleflash.png":{"frame":{"h":200,"idx":0,"w":200,"x":201,"y":0},"sourceSize":{"h":200,"w":200},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"resource.png","prefix":"images/resource/"}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

-1
View File
@@ -1 +0,0 @@
{"frames":{"hslider_s$bar.png":{"frame":{"h":180,"idx":0,"w":47,"x":0,"y":61},"sourceSize":{"h":180,"w":47},"spriteSourceSize":{"x":0,"y":0}},"hslider_s$down.png":{"frame":{"h":1,"idx":0,"w":1,"x":0,"y":242},"sourceSize":{"h":1,"w":1},"spriteSourceSize":{"x":0,"y":0}},"hslider_s$up.png":{"frame":{"h":1,"idx":0,"w":1,"x":0,"y":244},"sourceSize":{"h":1,"w":1},"spriteSourceSize":{"x":0,"y":0}},"hslider_s.png":{"frame":{"h":60,"idx":0,"w":226,"x":0,"y":0},"sourceSize":{"h":60,"w":226},"spriteSourceSize":{"x":0,"y":0}},"vslider_1@3x$down.png":{"frame":{"h":1,"idx":0,"w":1,"x":0,"y":246},"sourceSize":{"h":1,"w":1},"spriteSourceSize":{"x":0,"y":0}},"vslider_1@3x$up.png":{"frame":{"h":1,"idx":0,"w":1,"x":0,"y":248},"sourceSize":{"h":1,"w":1},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"slider.png","prefix":"images/slider/"}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

-1
View File
@@ -1 +0,0 @@
{"frames":{"texture_1.png":{"frame":{"h":400,"idx":0,"w":400,"x":0,"y":0},"sourceSize":{"h":400,"w":400},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"texture.png","prefix":"images/texture/"}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

-36
View File
@@ -1,36 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta name="description" content="やり直すんだ。そして、次はうまくやる。"/>
<meta name="keywords" content="人生重开模拟器 liferestart life restart remake 人生重来"/>
<meta name="renderer" content="webkit"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="full-screen" content="true"/>
<meta name="x5-fullscreen" content="true"/>
<meta name="360-fullscreen" content="true"/>
<meta name="theme-color" content="#157878"/>
<meta name="laya" screenorientation ="landscape"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<font-face font-family="方正像素12" src="fonts/方正像素12.ttf"/>
<title>Life Restart</title>
<!--
<script type="text/javascript" src="libs/laya/laya.core.js"></script>
<script type="text/javascript" src="libs/laya/laya.webgl.js"></script>
<script type="text/javascript" src="libs/laya/laya.filter.js"></script>
<script type="text/javascript" src="libs/laya/laya.html.js"></script>
<script type="text/javascript" src="libs/laya/laya.particle.js"></script>
<script type="text/javascript" src="libs/laya/laya.ui.js"></script>
-->
<script type="text/javascript" src="libs/laya/min/laya.core.min.js"></script>
<script type="text/javascript" src="libs/laya/min/laya.webgl.min.js"></script>
<script type="text/javascript" src="libs/laya/min/laya.filter.min.js"></script>
<script type="text/javascript" src="libs/laya/min/laya.particle.min.js"></script>
<script type="text/javascript" src="libs/laya/min/laya.ui.min.js"></script>
<script type="module" crossorigin src="./assets/index-BdVYj6Of.js"></script>
</head>
<body style="background:black"></body>
</html>
-425
View File
@@ -1,425 +0,0 @@
/**
* Matter.js 渲染器在 LayaAir 的实现
*/
(function()
{
var LayaRender = {};
var Common = Matter.Common;
var Composite = Matter.Composite;
var Bounds = Matter.Bounds;
var Events = Matter.Events;
var Grid = Matter.Grid;
var Vector = Matter.Vector;
/**
* 创建新的渲染器
* @param {object} options 所有属性都有默认值options中的属性会覆盖默认属性
* @return {render} 返回创建的旋绕器
*/
LayaRender.create = function(options)
{
var defaults = {
controller: LayaRender,
engine: null,
element: null,
canvas: null,
mouse: null,
frameRequestId: null,
options:
{
width: 800,
height: 600,
pixelRatio: 1,
background: '#fafafa',
wireframeBackground: '#222222',
hasBounds: !!options.bounds,
enabled: true,
wireframes: true,
showSleeping: true,
showDebug: false,
showBroadphase: false,
showBounds: false,
showVelocity: false,
showCollisions: false,
showSeparations: false,
showAxes: false,
showPositions: false,
showAngleIndicator: false,
showIds: false,
showShadows: false,
showVertexNumbers: false,
showConvexHulls: false,
showInternalEdges: false,
showMousePosition: false
}
};
var render = Common.extend(defaults, options);
render.mouse = options.mouse;
render.engine = options.engine;
// 如果用户没有指定contaienr,默认使用stage
render.container = render.container || Laya.stage;
render.bounds = render.bounds ||
{
min:
{
x: 0,
y: 0
},
max:
{
x: render.width,
y: render.height
}
};
return render;
}
/**
* 运行渲染器
* @param {render} render 渲染的目标是LayaRender.create()返回的对象
* @return {void}
*/
LayaRender.run = function(render)
{
Laya.timer.frameLoop(1, this, LayaRender.world, [render]);
Events.on(render.engine.world, 'afterRemove', LayaRender.onRemoveSprite);
};
/**
* 停止渲染器
* @param {render} LayaRender.create()返回的对象
* @return {void}
*/
LayaRender.stop = function(render)
{
Laya.timer.clear(this, LayaRender.world);
Events.off(render.engine.world, 'afterRemove', LayaRender.onRemoveSprite);
}
LayaRender.onRemoveSprite = function(args)
{
var sprite = args.object.layaSprite;
if (sprite && sprite.parent)
sprite.parent.removeChild(sprite);
}
/**
* 渲染给定的 engine Matter.World 对象
* 这是渲染的入口每次场景改变时都应该被调用
* @param {render} render
* @return {void}
*/
LayaRender.world = function(render)
{
var engine = render.engine,
world = engine.world,
renderer = render.renderer,
container = render.container,
options = render.options,
bodies = Composite.allBodies(world),
allConstraints = Composite.allConstraints(world),
constraints = [],
i;
if (options.wireframes)
{
LayaRender.setBackground(render, options.wireframeBackground);
}
else
{
LayaRender.setBackground(render, options.background);
}
// 处理 bounds
var boundsWidth = render.bounds.max.x - render.bounds.min.x,
boundsHeight = render.bounds.max.y - render.bounds.min.y,
boundsScaleX = boundsWidth / render.options.width,
boundsScaleY = boundsHeight / render.options.height;
if (options.hasBounds)
{
// 隐藏不在视口内的bodies
for (i = 0; i < bodies.length; i++)
{
var body = bodies[i];
body.render.sprite.visible = Bounds.overlaps(body.bounds, render.bounds);
}
// 过滤掉不在视口内的 constraints
for (i = 0; i < allConstraints.length; i++)
{
var constraint = allConstraints[i],
bodyA = constraint.bodyA,
bodyB = constraint.bodyB,
pointAWorld = constraint.pointA,
pointBWorld = constraint.pointB;
if (bodyA) pointAWorld = Vector.add(bodyA.position, constraint.pointA);
if (bodyB) pointBWorld = Vector.add(bodyB.position, constraint.pointB);
if (!pointAWorld || !pointBWorld)
continue;
if (Bounds.contains(render.bounds, pointAWorld) || Bounds.contains(render.bounds, pointBWorld))
constraints.push(constraint);
}
// 改变视口
container.scale(1 / boundsScaleX, 1 / boundsScaleY);
container.pos(-render.bounds.min.x * (1 / boundsScaleX), -render.bounds.min.y * (1 / boundsScaleY));
}
else
{
constraints = allConstraints;
}
for (i = 0; i < bodies.length; i++)
LayaRender.body(render, bodies[i]);
for (i = 0; i < constraints.length; i++)
LayaRender.constraint(render, constraints[i]);
};
/**
* 设置背景色或者背景图片
* @param {render} render
* @param {string} background 16进制颜色字符串或者图片路径
*/
LayaRender.setBackground = function(render, background)
{
if (render.currentBackground !== background)
{
var isColor = background.indexOf && background.indexOf('#') !== -1;
render.container.graphics.clear();
if (isColor)
{
// 使用纯色背景
render.container.bgColor = background;
}
else
{
render.container.loadImage(background);
// 使用背景图片时把背景色设置为白色
render.container.bgColor = "#FFFFFF";
}
render.currentBackground = background;
}
}
/**
* 渲染 body
* @param {render} render
* @param {body} body
* @return {void}
*/
LayaRender.body = function(render, body)
{
var engine = render.engine,
bodyRender = body.render;
if (!bodyRender.visible)
return;
// 有纹理的body
if (bodyRender.sprite && bodyRender.sprite.texture)
{
var spriteId = 'b-' + body.id,
sprite = body.layaSprite,
container = render.container;
// 如果sprite不存在,则初始化一个
if (!sprite)
sprite = body.layaSprite = _createBodySprite(render, body);
// 如果sprite未在显示列表,则添加至显示列表
if (!container.contains(sprite))
container.addChild(sprite);
// 更新sprite位置
sprite.x = body.position.x;
sprite.y = body.position.y;
sprite.rotation = body.angle * 180 / Math.PI;
sprite.scaleX = bodyRender.sprite.xScale || 1;
sprite.scaleY = bodyRender.sprite.yScale || 1;
}
else // 没有纹理的body
{
var primitiveId = 'b-' + body.id,
sprite = body.layaSprite,
container = render.container;
// 如果sprite不存在,则初始化一个
if (!sprite)
{
sprite = body.layaSprite = _createBodyPrimitive(render, body);
sprite.initialAngle = body.angle;
}
// 如果sprite未在显示列表,则添加至显示列表
if (!container.contains(sprite))
container.addChild(sprite);
// 更新sprite位置
sprite.x = body.position.x;
sprite.y = body.position.y;
sprite.rotation = (body.angle - sprite.initialAngle) * 180 / Math.PI;
}
};
/**
* 创建使用纹理的Sprite对象
* @param {render} render
* @param {body} body
* @return {void}
*/
var _createBodySprite = function(render, body)
{
var bodyRender = body.render,
texturePath = bodyRender.sprite.texture,
sprite = new Laya.Sprite();
sprite.loadImage(texturePath);
sprite.pivotX = body.render.sprite.xOffset;
sprite.pivotY = body.render.sprite.yOffset;
return sprite;
};
/**
* 创建使用矢量绘图的Sprite对象
* @param {render} render
* @param {body} body
* @return {void}
*/
var _createBodyPrimitive = function(render, body)
{
var bodyRender = body.render,
options = render.options,
sprite = new Laya.Sprite(),
fillStyle, strokeStyle, lineWidth,
part, points = [];
var primitive = sprite.graphics;
primitive.clear();
// 处理 compound parts
for (var k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++)
{
part = body.parts[k];
if (!options.wireframes)
{
fillStyle = bodyRender.fillStyle;
strokeStyle = bodyRender.strokeStyle;
lineWidth = bodyRender.lineWidth;
}
else
{
fillStyle = null;
strokeStyle = '#bbbbbb';
lineWidth = 1;
}
points.push(part.vertices[0].x - body.position.x, part.vertices[0].y - body.position.y);
for (var j = 1; j < part.vertices.length; j++)
{
points.push(part.vertices[j].x - body.position.x, part.vertices[j].y - body.position.y);
}
points.push(part.vertices[0].x - body.position.x, part.vertices[0].y - body.position.y);
primitive.drawPoly(0, 0, points, fillStyle, strokeStyle, lineWidth);
// 角度指示器
if (options.showAngleIndicator || options.showAxes)
{
lineWidth = 1;
if (options.wireframes)
{
strokeStyle = '#CD5C5C';
}
else
{
strokeStyle = bodyRender.strokeStyle;
}
primitive.drawLine(part.position.x - body.position.x, part.position.y - body.position.y,
((part.vertices[0].x + part.vertices[part.vertices.length - 1].x) / 2 - body.position.x),
((part.vertices[0].y + part.vertices[part.vertices.length - 1].y) / 2 - body.position.y));
}
}
return sprite;
};
/**
* 绘制 constraint
* @param {render} render
* @param {constraint} constraint
* @return {void}
*/
LayaRender.constraint = function(render, constraint)
{
var engine = render.engine,
bodyA = constraint.bodyA,
bodyB = constraint.bodyB,
pointA = constraint.pointA,
pointB = constraint.pointB,
container = render.container,
constraintRender = constraint.render,
primitiveId = 'c-' + constraint.id,
sprite = constraint.layaSprite;
// 如果sprite不存在,则初始化一个
if (!sprite)
sprite = constraint.layaSprite = new Laya.Sprite();
var primitive = sprite.graphics;
// constraint 没有两个终点时不渲染
if (!constraintRender.visible || !constraint.pointA || !constraint.pointB)
{
primitive.clear();
return;
}
// 如果sprite未在显示列表,则添加至显示列表
if (!container.contains(sprite))
container.addChild(sprite);
// 渲染 constraint
primitive.clear();
var fromX, fromY, toX, toY;
if (bodyA)
{
fromX = bodyA.position.x + pointA.x;
fromY = bodyA.position.y + pointA.y;
}
else
{
fromX = pointA.x;
fromY = pointA.y;
}
if (bodyB)
{
toX = bodyB.position.x + pointB.x;
toY = bodyB.position.y + pointB.y;
}
else
{
toX = pointB.x;
toY = pointB.y;
}
primitive.drawLine(fromX, fromY, toX, toY, constraintRender.strokeStyle, constraintRender.lineWidth);
};
window.LayaRender = LayaRender;
})();
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More