Deploying to gh-pages from @ VickScarlet/lifeRestart@f12a147093 🚀

This commit is contained in:
VickScarlet
2026-03-30 09:50:02 +00:00
parent cbe5a5a8ca
commit 3b37b960fa
53 changed files with 77 additions and 80 deletions
+1
View File
@@ -0,0 +1 @@
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?1:0,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?1:0,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};