daily update

This commit is contained in:
Vick Scarlet
2021-11-24 19:08:13 +08:00
parent d088c1a862
commit f8dd720d4d
37 changed files with 8440 additions and 365 deletions

View File

@@ -2,7 +2,7 @@
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":3,
"selecteID":61,
"props":{"width":1125,"sceneColor":"#000000","sceneBg":"laya/views/view/CyberTheme/CyberAchievement.png","runtime":"ViewBase","height":2436},
"nodeParent":-1,
"label":"View",
@@ -568,71 +568,6 @@
}]
}],
"$HIDDEN":false
},
{
"x":15,
"type":"VBox",
"props":{"visible":false,"name":"colorBox"},
"nodeParent":1,
"label":"VBox(colorBox)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":61,
"child":[
{
"x":30,
"type":"Label",
"props":{"y":0,"var":"colorGrade0","text":"#ccccccff","fontSize":40,"font":"方正像素12","color":"#cccccc"},
"nodeParent":61,
"label":"Label(colorGrade0)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":62,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"y":10,"var":"colorGrade1","text":"#55fffeff","fontSize":40,"font":"方正像素12","color":"#55fffe"},
"nodeParent":61,
"label":"Label(colorGrade1)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":63,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"y":20,"var":"colorGrade2","text":"#b17cffff","fontSize":40,"font":"方正像素12","color":"#b17cff"},
"nodeParent":61,
"label":"Label(colorGrade2)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":64,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"y":30,"var":"colorGrade3","text":"#ffce45ff","fontSize":40,"font":"方正像素12","color":"#ffce45"},
"nodeParent":61,
"label":"Label(colorGrade3)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":65,
"child":[
]
}]
}],
"animations":[
{

View File

@@ -2,7 +2,7 @@
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":1,
"selecteID":10,
"props":{"y":50,"width":570,"sceneColor":"#000000","mouseThrough":true,"mouseEnabled":false,"height":150,"alpha":0.75},
"nodeParent":-1,
"label":"View",
@@ -100,72 +100,6 @@
"child":[
]
}]
},
{
"x":15,
"type":"VBox",
"props":{"y":0,"x":0,"visible":false,"name":"colorBox"},
"nodeParent":1,
"label":"VBox(colorBox)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":10,
"child":[
{
"x":30,
"type":"Label",
"props":{"y":0,"var":"colorGrade0","text":"#ccccccff","fontSize":40,"font":"方正像素12","color":"#cccccc"},
"nodeParent":10,
"label":"Label(colorGrade0)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":11,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"y":10,"var":"colorGrade1","text":"#55fffeff","fontSize":40,"font":"方正像素12","color":"#55fffe"},
"nodeParent":10,
"label":"Label(colorGrade1)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":12,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"y":20,"var":"colorGrade2","text":"#b17cffff","fontSize":40,"font":"方正像素12","color":"#b17cff"},
"nodeParent":10,
"label":"Label(colorGrade2)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":13,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"y":30,"var":"colorGrade3","text":"#ffce45ff","fontSize":40,"font":"方正像素12","color":"#ffce45"},
"nodeParent":10,
"label":"Label(colorGrade3)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":14,
"child":[
]
}],
"$HIDDEN":true
}],
"animations":[
{

View File

@@ -2,7 +2,7 @@
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":21,
"selecteID":83,
"props":{"y":1218,"x":562,"width":1125,"sceneColor":"#000000","sceneBg":"laya/views/view/CyberTheme/CyberMain.png","runtime":"ViewBase","height":2436,"anchorY":0.5,"anchorX":0.5},
"nodeParent":-1,
"label":"View",
@@ -547,51 +547,64 @@
{
"x":15,
"type":"Box",
"props":{"y":2080,"x":100,"width":160,"var":"btnDiscord","runtime":"ScaleButton","name":"btnDiscord","height":160,"anchorY":0.5,"anchorX":0.5},
"props":{"width":1,"left":0,"height":1,"bottom":0},
"nodeParent":1,
"label":"Box(btnDiscord)",
"isOpen":false,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":83,
"compId":85,
"child":[
{
"type":"Image",
"props":{"top":0,"skin":"images/icons/icon_discord.png","right":0,"left":0,"bottom":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":83,
"label":"Image",
"isDirectory":false,
"x":30,
"type":"Box",
"props":{"y":-175,"x":100,"width":160,"var":"btnGithub","runtime":"ScaleButton","name":"btnGithub","height":160,"anchorY":0.5,"anchorX":0.5},
"nodeParent":85,
"label":"Box(btnGithub)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":false,
"compId":79,
"hasChild":true,
"compId":82,
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"y":2260,"x":100,"width":160,"var":"btnGithub","runtime":"ScaleButton","name":"btnGithub","height":160,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnGithub)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":82,
"child":[
{
"type":"Image",
"props":{"top":0,"skin":"images/icons/icon_github.png","right":0,"left":0,"bottom":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":82,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":78,
"child":[
]
}]
},
{
"type":"Image",
"props":{"top":0,"skin":"images/icons/icon_github.png","right":0,"left":0,"bottom":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":82,
"label":"Image",
"isDirectory":false,
"x":30,
"type":"Box",
"props":{"y":-355,"x":100,"width":160,"var":"btnDiscord","runtime":"ScaleButton","name":"btnDiscord","height":160,"anchorY":0.5,"anchorX":0.5},
"nodeParent":85,
"label":"Box(btnDiscord)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":false,
"compId":78,
"hasChild":true,
"compId":83,
"child":[
]
{
"type":"Image",
"props":{"top":0,"skin":"images/icons/icon_discord.png","right":0,"left":0,"bottom":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":83,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":79,
"child":[
]
}]
}]
}],
"animations":[

View File

@@ -2,7 +2,7 @@
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":201,
"selecteID":210,
"props":{"width":1125,"sceneColor":"#000000","sceneBg":"laya/views/view/CyberTheme/CyberSummary.png","runtime":"ViewBase","height":2436},
"nodeParent":-1,
"label":"View",
@@ -1344,71 +1344,6 @@
}]
}],
"$LOCKED":true
},
{
"x":15,
"type":"VBox",
"props":{"visible":false,"name":"colorBox"},
"nodeParent":1,
"label":"VBox(colorBox)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":210,
"child":[
{
"x":30,
"type":"Label",
"props":{"y":0,"var":"colorGrade0","text":"#ccccccff","fontSize":40,"font":"方正像素12","color":"#cccccc"},
"nodeParent":210,
"label":"Label(colorGrade0)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":203,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"y":10,"var":"colorGrade1","text":"#55fffeff","fontSize":40,"font":"方正像素12","color":"#55fffe"},
"nodeParent":210,
"label":"Label(colorGrade1)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":205,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"y":20,"var":"colorGrade2","text":"#b17cffff","fontSize":40,"font":"方正像素12","color":"#b17cff"},
"nodeParent":210,
"label":"Label(colorGrade2)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":208,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"y":30,"var":"colorGrade3","text":"#ffce45ff","fontSize":40,"font":"方正像素12","color":"#ffce45"},
"nodeParent":210,
"label":"Label(colorGrade3)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":209,
"child":[
]
}]
}],
"animations":[
{

View File

@@ -0,0 +1,582 @@
{
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":61,
"props":{"width":1125,"sceneColor":"#000000","sceneBg":"laya/views/view/CyberTheme/CyberAchievement.png","runtime":"ViewBase","height":2436},
"nodeParent":-1,
"label":"View",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":1,
"child":[
{
"x":15,
"type":"Button",
"props":{"y":200,"var":"btnBack","skin":"images/button/button_back@3x.png","name":"btnBack","left":30},
"nodeParent":1,
"label":"Button(btnBack)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":2,
"child":[
]
},
{
"x":15,
"type":"Box",
"props":{"width":1,"top":0,"right":0,"height":1},
"nodeParent":1,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":68,
"child":[
{
"x":30,
"type":"Box",
"props":{"y":200,"x":-170,"width":260,"var":"btnRank","runtime":"ScaleButton","height":90,"anchorY":0.5,"anchorX":0.5},
"nodeParent":68,
"label":"Box(btnRank)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":3,
"child":[
{
"x":45,
"type":"Image",
"props":{"top":0,"skin":"images/button/button_small@3x.png","right":0,"left":0,"bottom":0},
"nodeParent":3,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":4,
"child":[
],
"$HIDDEN":false
},
{
"x":45,
"type":"Box",
"props":{"width":90,"left":8,"height":90},
"nodeParent":3,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":5,
"child":[
{
"x":60,
"type":"Image",
"props":{"skin":"images/icons/icon_rank@3x.png","centerY":0,"centerX":0},
"nodeParent":5,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":6,
"child":[
]
}]
},
{
"x":45,
"type":"Label",
"props":{"text":"排行榜","fontSize":50,"font":"方正像素12","color":"#ffffff","centerY":0,"centerX":40,"anchorY":0.5,"anchorX":0.5},
"nodeParent":3,
"label":"Label",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":7,
"child":[
]
}]
}]
},
{
"x":15,
"type":"Box",
"props":{"y":310,"x":0,"top":310,"right":0,"left":0,"height":120},
"nodeParent":1,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":16,
"child":[
{
"type":"Label",
"props":{"y":110,"x":140,"var":"btnStatistics","text":"UI_Statistics","name":"btnStatistics","fontSize":100,"font":"方正像素12","color":"#ffffff","anchorY":1,"anchorX":0.5},
"nodeParent":16,
"label":"Label(btnStatistics)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":18,
"child":[
]
},
{
"type":"Label",
"props":{"y":110,"x":360,"var":"btnAchievement","text":"UI_Achievement","name":"btnAchievement","fontSize":60,"font":"方正像素12","color":"#ffffff","anchorY":1,"anchorX":0.5},
"nodeParent":16,
"label":"Label(btnAchievement)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":21,
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"x":0,"width":2250,"var":"boxPage","top":450,"name":"boxPage","bottom":80},
"nodeParent":1,
"label":"Box(boxPage)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":8,
"child":[
{
"type":"Box",
"props":{"width":1125,"var":"boxA","top":0,"name":"boxA","left":0,"bottom":0},
"nodeParent":8,
"label":"Box(boxA)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":66,
"child":[
{
"type":"Box",
"props":{"width":1125,"top":0,"height":1125,"centerX":0},
"nodeParent":66,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":25,
"child":[
{
"type":"Image",
"props":{"top":40,"skin":"images/border/border_2@3x.png","right":30,"left":30,"bottom":30},
"nodeParent":25,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":26,
"child":[
],
"$HIDDEN":false
},
{
"type":"Sprite",
"props":{"y":150,"x":100,"width":920,"height":380},
"nodeParent":25,
"label":"Sprite",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":52,
"child":[
{
"type":"Rect",
"props":{"y":-1,"x":460,"width":4,"lineWidth":1,"lineColor":"#1a5459","height":320,"fillColor":"#1a5459"},
"nodeParent":52,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":50,
"child":[
]
},
{
"type":"Rect",
"props":{"y":370,"x":0,"width":920,"lineWidth":1,"lineColor":"#1a5459","height":5,"fillColor":"#1a5459"},
"nodeParent":52,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":51,
"child":[
]
}],
"$HIDDEN":false
},
{
"type":"Box",
"props":{"width":400,"top":150,"left":100,"height":320},
"nodeParent":25,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":28,
"child":[
{
"type":"HBox",
"props":{"y":130,"x":0},
"nodeParent":28,
"label":"HBox",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":54,
"child":[
{
"type":"Label",
"props":{"var":"labRemakeTimes","text":"1","name":"labRemakeTimes","fontSize":70,"font":"方正像素12","color":"#55fffe","bold":true,"anchorY":1,"anchorX":0},
"nodeParent":54,
"label":"Label(labRemakeTimes)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":31,
"child":[
]
},
{
"type":"Label",
"props":{"text":"UI_Times","fontSize":70,"font":"方正像素12","color":"#55fffe","bold":true,"anchorY":1,"anchorX":0},
"nodeParent":54,
"label":"Label",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":53,
"child":[
]
}]
},
{
"type":"Label",
"props":{"y":210,"x":0,"text":"UI_Remake_Times","fontSize":62,"font":"方正像素12","color":"#ffffff","bold":false,"anchorY":1,"anchorX":0},
"nodeParent":28,
"label":"Label",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":32,
"child":[
]
},
{
"type":"Label",
"props":{"y":240,"var":"labRemakeTimesJudge","text":"抽到紫色几率不变","name":"labRemakeTimesJudge","fontSize":42,"font":"方正像素12","color":"#93aaae","bold":false,"anchorY":0,"anchorX":0},
"nodeParent":28,
"label":"Label(labRemakeTimesJudge)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":33,
"child":[
]
}]
},
{
"type":"Box",
"props":{"width":400,"top":150,"right":100,"height":320},
"nodeParent":25,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":29,
"child":[
{
"type":"HBox",
"props":{"y":130},
"nodeParent":29,
"label":"HBox",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":55,
"child":[
{
"type":"Label",
"props":{"var":"labAchievementCount","text":"1","name":"labAchievementCount","fontSize":70,"font":"方正像素12","color":"#55fffe","bold":true,"anchorY":1,"anchorX":0},
"nodeParent":55,
"label":"Label(labAchievementCount)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":56,
"child":[
]
},
{
"type":"Label",
"props":{"text":"UI_Count","fontSize":70,"font":"方正像素12","color":"#55fffe","bold":true,"anchorY":1,"anchorX":0},
"nodeParent":55,
"label":"Label",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":57,
"child":[
]
}]
},
{
"type":"Label",
"props":{"y":210,"x":0,"text":"UI_Achievement_Count","fontSize":62,"font":"方正像素12","color":"#ffffff","bold":false,"anchorY":1,"anchorX":0},
"nodeParent":29,
"label":"Label",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":38,
"child":[
]
},
{
"type":"Label",
"props":{"y":240,"x":0,"var":"labAchievementCountJudge","text":"抽到橙色几率不变","name":"labAchievementCountJudge","fontSize":42,"font":"方正像素12","color":"#93aaae","bold":false,"anchorY":0,"anchorX":0},
"nodeParent":29,
"label":"Label(labAchievementCountJudge)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":39,
"child":[
]
}]
},
{
"type":"Box",
"props":{"right":100,"left":100,"height":450,"bottom":100},
"nodeParent":25,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":30,
"child":[
{
"type":"Box",
"props":{"top":25,"right":0,"left":0,"height":180},
"nodeParent":30,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":41,
"child":[
{
"type":"Label",
"props":{"y":85,"x":0,"text":"UI_Event_Collection_Rate","fontSize":62,"font":"方正像素12","color":"#ffffff","bold":false,"anchorY":1,"anchorX":0},
"nodeParent":41,
"label":"Label",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":42,
"child":[
],
"$HIDDEN":false
},
{
"type":"ProgressBar",
"props":{"y":135,"var":"prgEventRate","value":1,"skin":"images/progress/progress_1@3x.png","right":240,"name":"prgEventRate","left":0,"anchorY":0.5,"anchorX":0},
"nodeParent":41,
"label":"ProgressBar(prgEventRate)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":43,
"child":[
]
},
{
"type":"Label",
"props":{"var":"labEventRate","text":"100%","right":0,"name":"labEventRate","fontSize":110,"font":"方正像素12","color":"#55fffe","centerY":0,"bold":false,"anchorY":0.5,"anchorX":1},
"nodeParent":41,
"label":"Label(labEventRate)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":44,
"child":[
]
}]
},
{
"type":"Box",
"props":{"right":0,"left":0,"height":180,"bottom":30},
"nodeParent":30,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":45,
"child":[
{
"type":"Label",
"props":{"y":85,"x":0,"text":"UI_Talent_Collection_Rate","fontSize":62,"font":"方正像素12","color":"#ffffff","bold":false,"anchorY":1,"anchorX":0},
"nodeParent":45,
"label":"Label",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":46,
"child":[
]
},
{
"type":"ProgressBar",
"props":{"y":135,"var":"prgTalentRate","value":0.73,"skin":"images/progress/progress_1@3x.png","right":240,"name":"prgTalentRate","left":0,"anchorY":0.5,"anchorX":0},
"nodeParent":45,
"label":"ProgressBar(prgTalentRate)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":47,
"child":[
]
},
{
"type":"Label",
"props":{"var":"labTalentRate","text":"73%","right":0,"name":"labTalentRate","fontSize":110,"font":"方正像素12","color":"#55fffe","centerY":0,"bold":false,"anchorY":0.5,"anchorX":1},
"nodeParent":45,
"label":"Label(labTalentRate)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":48,
"child":[
]
}],
"$HIDDEN":false
}]
}]
}]
},
{
"type":"Box",
"props":{"width":1125,"var":"boxB","top":0,"right":0,"name":"boxB","bottom":0},
"nodeParent":8,
"label":"Box(boxB)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":67,
"child":[
{
"type":"List",
"props":{"y":35,"width":1080,"var":"listAchievements","vScrollBarSkin":"images/slider/vslider_1@3x.png","top":35,"name":"listAchievements","centerX":0,"bottom":35},
"nodeParent":67,
"label":"List(listAchievements)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":9,
"child":[
{
"type":"Box",
"props":{"y":0,"x":0,"width":530,"runtime":"ColorFilterItem","renderType":"render","height":460},
"nodeParent":9,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":10,
"child":[
{
"type":"Image",
"props":{"top":20,"skin":"images/border/achievement@3x.png","right":20,"name":"uncomplete","left":20,"bottom":20},
"nodeParent":10,
"label":"Image(uncomplete)",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":11,
"child":[
],
"$HIDDEN":false
},
{
"type":"Image",
"props":{"top":0,"skin":"images/border/achievement_complete@3x.png","right":0,"name":"completed","left":0,"bottom":0},
"nodeParent":10,
"label":"Image(completed)",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":12,
"child":[
],
"$HIDDEN":false
},
{
"type":"Label",
"props":{"text":"霹雳霹雳","name":"name","fontSize":80,"font":"方正像素12","color":"#ffffff","centerY":-30,"centerX":0},
"nodeParent":10,
"label":"Label(name)",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":13,
"child":[
]
},
{
"type":"Label",
"props":{"wordWrap":true,"text":"被第九重雷劫劈死","right":40,"name":"description","left":40,"height":95,"fontSize":42,"font":"方正像素12","color":"#9ca5a9","bottom":25,"align":"center"},
"nodeParent":10,
"label":"Label(description)",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":14,
"child":[
]
}]
}]
}]
}],
"$HIDDEN":false
}],
"animations":[
{
"nodes":[
],
"name":"ani1",
"id":1,
"frameRate":24,
"action":0
}],
"$HIDDEN":false
}

View File

@@ -0,0 +1,113 @@
{
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":10,
"props":{"y":50,"width":570,"sceneColor":"#000000","mouseThrough":true,"mouseEnabled":false,"height":150,"alpha":0.75},
"nodeParent":-1,
"label":"View",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":1,
"child":[
{
"x":15,
"type":"Box",
"props":{},
"nodeParent":1,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":2,
"child":[
{
"type":"Rect",
"props":{"width":570,"lineWidth":1,"height":150,"fillColor":"#55fffe"},
"nodeParent":2,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":4,
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"x":0,"var":"boxBg","name":"boxBg"},
"nodeParent":1,
"label":"Box(boxBg)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":5,
"child":[
{
"type":"Rect",
"props":{"width":560,"lineWidth":1,"height":150,"fillColor":"#272727"},
"nodeParent":5,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":6,
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"width":560,"height":150},
"nodeParent":1,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":8,
"child":[
{
"x":30,
"type":"Image",
"props":{"x":70,"skin":"images/icons/icon_achievement@3x.png","centerY":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":8,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":7,
"child":[
]
},
{
"x":30,
"type":"Label",
"props":{"x":150,"var":"labName","text":"所有人都是我","name":"labName","fontSize":60,"font":"方正像素12","color":"#cccccc","centerY":0},
"nodeParent":8,
"label":"Label(labName)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":9,
"child":[
]
}]
}],
"animations":[
{
"nodes":[
],
"name":"ani1",
"id":1,
"frameRate":24,
"action":0
}]
}

View File

@@ -0,0 +1,205 @@
{
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":87,
"props":{"y":1218,"x":562,"width":1125,"sceneColor":"#000000","runtime":"ViewBase","height":2436,"anchorY":0.5,"anchorX":0.5},
"nodeParent":-1,
"label":"View",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":1,
"child":[
{
"x":15,
"type":"Label",
"props":{"var":"labTitle","text":"UI_Title_Remake","name":"labTitle","fontSize":130,"font":"SimHei","color":"#ffffff","centerY":-260,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Label(labTitle)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":8,
"child":[
]
},
{
"x":15,
"type":"Label",
"props":{"wordWrap":true,"var":"labSubTitle","text":"UI_Title_Subsequent","right":0,"name":"labSubTitle","left":0,"fontSize":70,"font":"SimHei","color":"#999999","centerY":-120,"anchorY":0.5,"anchorX":0.5,"align":"center"},
"nodeParent":1,
"label":"Label(labSubTitle)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":11,
"child":[
]
},
{
"x":15,
"type":"Box",
"props":{"width":600,"var":"btnRemake","runtime":"ColorfulBox","name":"btnRemake","height":150,"centerY":600,"centerX":0},
"nodeParent":1,
"label":"Box(btnRemake)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":85,
"child":[
{
"x":30,
"type":"Label",
"props":{"text":"UI_Remake","name":"label","fontSize":70,"font":"SimHei","centerY":0,"centerX":0},
"nodeParent":85,
"label":"Label(label)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":86,
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"y":200,"x":200,"width":225,"var":"btnThanks","runtime":"ColorfulBox","name":"btnSmall","height":90,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnThanks)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":15,
"child":[
{
"x":30,
"type":"Label",
"props":{"text":"UI_Thanks","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":15,
"label":"Label(label)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":20,
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"y":0,"x":1100,"width":1,"top":0,"runtime":"ColorfulBox","right":0,"height":1},
"nodeParent":1,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":84,
"child":[
{
"x":30,
"type":"Box",
"props":{"y":200,"x":-200,"width":225,"var":"btnAchievement","runtime":"ColorfulBox","name":"btnSmall","height":90,"anchorY":0.5,"anchorX":0.5},
"nodeParent":84,
"label":"Box(btnAchievement)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":21,
"child":[
{
"x":45,
"type":"Label",
"props":{"text":"UI_Achievement","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":21,
"label":"Label(label)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":25,
"child":[
]
}],
"$HIDDEN":false
}]
},
{
"x":15,
"type":"Box",
"props":{"width":1,"left":0,"height":1,"bottom":0},
"nodeParent":1,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":87,
"child":[
{
"x":30,
"type":"Box",
"props":{"y":-175,"x":100,"width":160,"var":"btnGithub","runtime":"ScaleButton","name":"btnGithub","height":160,"anchorY":0.5,"anchorX":0.5},
"nodeParent":87,
"label":"Box(btnGithub)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":82,
"child":[
{
"type":"Image",
"props":{"top":0,"skin":"images/icons/icon_github.png","right":0,"left":0,"bottom":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":82,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":78,
"child":[
]
}]
},
{
"x":30,
"type":"Box",
"props":{"y":-355,"x":100,"width":160,"var":"btnDiscord","runtime":"ScaleButton","name":"btnDiscord","height":160,"anchorY":0.5,"anchorX":0.5},
"nodeParent":87,
"label":"Box(btnDiscord)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":83,
"child":[
{
"type":"Image",
"props":{"top":0,"skin":"images/icons/icon_discord.png","right":0,"left":0,"bottom":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":83,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":79,
"child":[
]
}]
}]
}],
"animations":[
{
"nodes":[
],
"name":"ani1",
"id":1,
"frameRate":24,
"action":0
}]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,964 @@
{
"x":0,
"type":"View",
"selectedBox":21,
"selecteID":22,
"props":{"width":1125,"sceneColor":"#000000","sceneBg":"laya/views/view/CyberTheme/CyberTalent.png","runtime":"ViewBase","height":2436},
"nodeParent":-1,
"label":"View",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":1,
"child":[
{
"x":15,
"type":"Box",
"props":{"var":"pageDrawCard","top":0,"right":0,"name":"pageDrawCard","left":0,"bottom":0},
"nodeParent":1,
"label":"Box(pageDrawCard)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":19,
"child":[
{
"type":"Box",
"props":{"y":1117,"x":562,"width":2,"height":2,"centerY":-100,"centerX":0},
"nodeParent":19,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":4,
"child":[
{
"type":"Animation",
"props":{"y":1,"x":1,"width":100,"source":"view/CyberTheme/animation/lightRotation.ani","height":100,"autoPlay":true},
"nodeParent":4,
"label":"Animation",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":3,
"child":[
]
},
{
"type":"Image",
"props":{"y":585,"skin":"images/border/card@3x.png","scaleY":0.9,"scaleX":0.9,"rotation":15,"centerY":-50,"centerX":0,"anchorY":1.2,"anchorX":0.5,"alpha":0.8},
"nodeParent":4,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":10,
"child":[
],
"$HIDDEN":false
},
{
"type":"Image",
"props":{"y":634,"skin":"images/border/card@3x.png","scaleY":0.9,"scaleX":0.9,"rotation":-15,"centerY":-50,"centerX":0,"anchorY":1.2,"anchorX":0.5,"alpha":0.8},
"nodeParent":4,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":9,
"child":[
],
"$HIDDEN":false
},
{
"type":"Image",
"props":{"y":634,"skin":"images/border/card@3x.png","centerY":-50,"centerX":0,"anchorY":1.2,"anchorX":0.5,"alpha":0.8},
"nodeParent":4,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":8,
"child":[
],
"$HIDDEN":false
},
{
"type":"Image",
"props":{"skin":"images/accessories/cardicon@3x.png","centerY":-30,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":4,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":11,
"child":[
]
}]
},
{
"type":"Button",
"props":{"y":1930,"x":563,"width":657,"var":"btnDrawCard","skin":"images/button/button_main@3x.png","name":"btnDrawCard","labelSize":60,"label":"UI_Talent_Draw","height":192,"centerX":0},
"nodeParent":19,
"label":"Button(btnDrawCard)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":5,
"child":[
{
"type":"Box",
"props":{},
"nodeParent":5,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":56,
"child":[
{
"type":"Animation",
"props":{"y":93,"x":330,"width":0,"source":"view/CyberTheme/animation/circleFlash.ani","scaleX":5,"height":0,"blendMode":"lighter","autoPlay":true},
"nodeParent":56,
"label":"Animation",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":58,
"child":[
]
},
{
"type":"Box",
"props":{"renderType":"mask"},
"nodeParent":56,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":59,
"child":[
{
"type":"Rect",
"props":{"y":37,"x":25,"width":7,"lineWidth":1,"height":116,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":60,
"child":[
]
},
{
"type":"Rect",
"props":{"y":37,"x":625,"width":7,"lineWidth":1,"height":116,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":61,
"child":[
]
},
{
"type":"Rect",
"props":{"y":21,"x":44,"width":569,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":62,
"child":[
]
},
{
"type":"Rect",
"props":{"y":150,"x":171,"width":316,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":63,
"child":[
]
},
{
"type":"Rect",
"props":{"y":163,"x":44,"width":121,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":64,
"child":[
]
},
{
"type":"Rect",
"props":{"y":163,"x":493,"width":120,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":65,
"child":[
]
},
{
"type":"Rect",
"props":{"y":148,"x":29,"width":25,"rotation":40,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":66,
"child":[
]
},
{
"type":"Rect",
"props":{"y":150,"x":487,"width":19,"rotation":55,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":67,
"child":[
]
},
{
"type":"Rect",
"props":{"y":166,"x":160,"width":19,"rotation":-55,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":68,
"child":[
]
},
{
"type":"Rect",
"props":{"y":21,"x":613,"width":25,"rotation":40,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":69,
"child":[
]
},
{
"type":"Rect",
"props":{"y":26,"x":48,"width":25,"rotation":140,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":70,
"child":[
]
},
{
"type":"Rect",
"props":{"y":153,"x":632,"width":25,"rotation":140,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":59,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":71,
"child":[
]
}]
}]
},
{
"type":"Box",
"props":{},
"nodeParent":5,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":57,
"child":[
{
"type":"Box",
"props":{"renderType":"mask"},
"nodeParent":57,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":72,
"child":[
{
"type":"Poly",
"props":{"y":41,"x":35,"points":"0,0,8,-6,8,113,0,107","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"},
"nodeParent":72,
"label":"Poly",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":73,
"child":[
]
},
{
"type":"Poly",
"props":{"y":41,"x":621,"points":"0,0,-8,-6,-8,113,0,107","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"},
"nodeParent":72,
"label":"Poly",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":74,
"child":[
]
},
{
"type":"Poly",
"props":{"y":160,"x":177,"points":"0,0,305,0,311,10,-6,10","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"},
"nodeParent":72,
"label":"Poly",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":75,
"child":[
]
}]
},
{
"type":"Animation",
"props":{"y":172,"x":330,"source":"view/CyberTheme/animation/bottomBreath.ani","scaleX":4,"blendMode":"lighter","autoPlay":true},
"nodeParent":57,
"label":"Animation",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":76,
"child":[
]
}]
}],
"$HIDDEN":false
}],
"$LOCKED":true,
"$HIDDEN":true
},
{
"x":15,
"type":"Box",
"props":{"y":0,"x":0,"var":"pageResult","top":0,"right":0,"name":"pageResult","left":0,"bottom":0},
"nodeParent":1,
"label":"Box(pageResult)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":21,
"child":[
{
"x":30,
"type":"List",
"props":{"width":1085,"var":"listTalents","vScrollBarSkin":" ","top":310,"name":"listTalents","centerX":0,"bottom":370},
"nodeParent":21,
"label":"List(listTalents)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":22,
"child":[
{
"type":"Box",
"props":{"width":537,"renderType":"render","height":352},
"nodeParent":22,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":23,
"child":[
{
"type":"Image",
"props":{"top":0,"skin":"images/border/talent_item@3x.png","right":0,"name":"unselected","left":0,"bottom":0},
"nodeParent":23,
"label":"Image(unselected)",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":24,
"child":[
],
"$HIDDEN":false
},
{
"type":"Image",
"props":{"top":0,"skin":"images/border/talent_item_selected@3x.png","right":0,"name":"selected","left":0,"bottom":3},
"nodeParent":23,
"label":"Image(selected)",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":25,
"child":[
],
"$HIDDEN":false
},
{
"type":"HBox",
"props":{"top":104,"space":15,"name":"hboxTitle","left":66,"height":58},
"nodeParent":23,
"label":"HBox(hboxTitle)",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":26,
"child":[
{
"type":"Box",
"props":{"y":0,"x":0,"width":15,"name":"grades","height":58},
"nodeParent":26,
"label":"Box(grades)",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":108,
"child":[
{
"type":"Box",
"props":{"width":15,"name":"grade1","height":58},
"nodeParent":108,
"label":"Box(grade1)",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":27,
"child":[
{
"type":"Sprite",
"props":{},
"nodeParent":27,
"label":"Sprite",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":28,
"child":[
{
"type":"Rect",
"props":{"width":15,"lineWidth":1,"height":58,"fillColor":"#55fffe"},
"nodeParent":28,
"label":"Rect",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":29,
"child":[
]
}],
"$HIDDEN":false
}]
},
{
"type":"Box",
"props":{"width":15,"name":"grade2","height":58},
"nodeParent":108,
"label":"Box(grade2)",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":105,
"child":[
{
"type":"Sprite",
"props":{},
"nodeParent":105,
"label":"Sprite",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":106,
"child":[
{
"type":"Rect",
"props":{"width":15,"lineWidth":1,"height":58,"fillColor":"#b17cff"},
"nodeParent":106,
"label":"Rect",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":107,
"child":[
]
}],
"$HIDDEN":false
}]
},
{
"type":"Box",
"props":{"width":15,"name":"grade3","height":58},
"nodeParent":108,
"label":"Box(grade3)",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":102,
"child":[
{
"type":"Sprite",
"props":{},
"nodeParent":102,
"label":"Sprite",
"isOpen":true,
"isDirectory":true,
"isAniNode":false,
"hasChild":true,
"compId":103,
"child":[
{
"type":"Rect",
"props":{"width":15,"lineWidth":1,"height":58,"fillColor":"#ffce45"},
"nodeParent":103,
"label":"Rect",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":104,
"child":[
]
}],
"$HIDDEN":false
}]
}]
},
{
"type":"Label",
"props":{"x":1,"text":"Title","name":"labTitle","fontSize":58,"font":"方正像素12","color":"#ffffff"},
"nodeParent":26,
"label":"Label(labTitle)",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":30,
"child":[
]
}]
},
{
"type":"Label",
"props":{"y":205,"wordWrap":true,"text":"description","right":66,"name":"labDescription","left":66,"leading":8,"fontSize":44,"font":"方正像素12","color":"#9dacaf"},
"nodeParent":23,
"label":"Label(labDescription)",
"isDirectory":false,
"isAniNode":false,
"hasChild":false,
"compId":32,
"child":[
]
}]
}],
"$LOCKED":true,
"$HIDDEN":false
},
{
"x":30,
"type":"Box",
"props":{"right":0,"left":0,"height":1,"bottom":0},
"nodeParent":21,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":109,
"child":[
{
"x":45,
"type":"Button",
"props":{"width":1040,"var":"btnNext","skin":"images/button/button_main@3x.png","name":"btnNext","labelSize":60,"label":"UI_Next","height":192,"centerY":-180,"centerX":0},
"nodeParent":109,
"label":"Button(btnNext)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":33,
"child":[
{
"type":"Box",
"props":{},
"nodeParent":33,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":78,
"child":[
{
"type":"Animation",
"props":{"y":96,"x":520,"width":0,"source":"view/CyberTheme/animation/circleFlash.ani","scaleX":7,"height":0,"blendMode":"lighter","autoPlay":true},
"nodeParent":78,
"label":"Animation",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":80,
"child":[
]
},
{
"type":"Box",
"props":{"renderType":"mask"},
"nodeParent":78,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":81,
"child":[
{
"type":"Rect",
"props":{"y":37,"x":25,"width":7,"lineWidth":1,"height":116,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":82,
"child":[
]
},
{
"type":"Rect",
"props":{"y":37,"x":1010,"width":7,"lineWidth":1,"height":116,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":83,
"child":[
]
},
{
"type":"Rect",
"props":{"y":21,"x":44,"width":954,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":84,
"child":[
]
},
{
"type":"Rect",
"props":{"y":150,"x":171,"width":700,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":85,
"child":[
]
},
{
"type":"Rect",
"props":{"y":163,"x":44,"width":121,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":86,
"child":[
]
},
{
"type":"Rect",
"props":{"y":163,"x":877,"width":121,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":87,
"child":[
]
},
{
"type":"Rect",
"props":{"y":148,"x":29,"width":25,"rotation":40,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":88,
"child":[
]
},
{
"type":"Rect",
"props":{"y":150,"x":871,"width":19,"rotation":55,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":89,
"child":[
]
},
{
"type":"Rect",
"props":{"y":166,"x":160,"width":19,"rotation":-55,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":90,
"child":[
]
},
{
"type":"Rect",
"props":{"y":21,"x":998,"width":25,"rotation":40,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":91,
"child":[
]
},
{
"type":"Rect",
"props":{"y":26,"x":48,"width":25,"rotation":140,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":92,
"child":[
]
},
{
"type":"Rect",
"props":{"y":153,"x":1017,"width":25,"rotation":140,"lineWidth":1,"height":6,"fillColor":"#ff0000"},
"nodeParent":81,
"label":"Rect",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":93,
"child":[
]
}]
}]
},
{
"type":"Box",
"props":{},
"nodeParent":33,
"label":"Box",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":79,
"child":[
{
"type":"Box",
"props":{"renderType":"mask"},
"nodeParent":79,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":94,
"child":[
{
"type":"Poly",
"props":{"y":41,"x":35,"points":"0,0,8,-6,8,113,0,107","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"},
"nodeParent":94,
"label":"Poly",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":95,
"child":[
]
},
{
"type":"Poly",
"props":{"y":41,"x":1004,"points":"0,0,-8,-6,-8,113,0,107","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"},
"nodeParent":94,
"label":"Poly",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":96,
"child":[
]
},
{
"type":"Poly",
"props":{"y":160,"x":177,"points":"0,0,687,0,693,10,-6,10","lineWidth":1,"lineColor":"#ff0000","fillColor":"#00ffff"},
"nodeParent":94,
"label":"Poly",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":97,
"child":[
],
"$HIDDEN":false
}]
},
{
"type":"Animation",
"props":{"y":172,"x":520,"source":"view/CyberTheme/animation/bottomBreath.ani","scaleX":6,"blendMode":"lighter","autoPlay":true},
"nodeParent":79,
"label":"Animation",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":98,
"child":[
]
}]
}]
}]
}],
"$LOCKED":true,
"$HIDDEN":true
},
{
"x":15,
"type":"Box",
"props":{"top":40,"right":0,"name":"title","left":0},
"nodeParent":1,
"label":"Box(title)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":20,
"child":[
{
"x":30,
"type":"Image",
"props":{"skin":"images/accessories/titlebar@3x.png","right":0,"left":0},
"nodeParent":20,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":12,
"child":[
],
"$HIDDEN":false
},
{
"x":30,
"type":"HBox",
"props":{"y":160,"x":563,"space":30,"height":70,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":20,
"label":"HBox",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":13,
"child":[
{
"type":"Image",
"props":{"y":10,"x":1,"skin":"images/accessories/title_left@3x.png","name":"left"},
"nodeParent":13,
"label":"Image(left)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":14,
"child":[
]
},
{
"type":"Label",
"props":{"y":0,"x":2,"text":"UI_Title_Talent","fontSize":60,"font":"方正像素12","color":"#ffffff"},
"nodeParent":13,
"label":"Label",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":17,
"child":[
]
},
{
"type":"Image",
"props":{"y":10,"x":3,"skin":"images/accessories/title_right@3x.png","name":"right"},
"nodeParent":13,
"label":"Image(right)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":15,
"child":[
]
}]
}],
"$LOCKED":true,
"$HIDDEN":false
}],
"animations":[
{
"nodes":[
],
"name":"ani1",
"id":1,
"frameRate":24,
"action":0
}],
"$HIDDEN":false
}

View File

@@ -0,0 +1,37 @@
{
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":1,
"props":{"width":1125,"sceneColor":"#000000","runtime":"ViewBase","height":2436},
"nodeParent":-1,
"label":"View",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":1,
"child":[
{
"x":15,
"type":"Button",
"props":{"y":200,"var":"btnBack","skin":"images/button/button_back@3x.png","name":"btnBack","left":30},
"nodeParent":1,
"label":"Button(btnBack)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":2,
"child":[
]
}],
"animations":[
{
"nodes":[
],
"name":"ani1",
"id":1,
"frameRate":24,
"action":0
}]
}

File diff suppressed because it is too large Load Diff

View File

@@ -35,4 +35,5 @@
<item name="images/resource/circle.png" type="Image" compress="0" pack="0" quality="80" props="" picType="0" scale="0"/>
<item name="images/border/talent_item_selected@3x.png" type="Image" compress="0" pack="0" quality="80" props="sizeGrid=106,150,74,150" picType="0" scale="0"/>
<item name="images/accessories/titlebar@3x.png" type="Image" compress="0" pack="0" quality="80" props="sizeGrid=0,348,116,348" picType="0" scale="0"/>
<item name="images/button/button_001.png" type="Button" compress="0" pack="0" quality="80" props="sizeGrid=4,4,4,4@@!@@labelColors=#000000,#ea6c53,#ea6c53" picType="0" scale="0"/>
</res>

View File

@@ -70,7 +70,6 @@
<script type="text/javascript" src="../src/ui/runtime.js"></script>
<script type="text/javascript" src="../src/ui/layaUI.max.all.js"></script>
<script type="text/javascript" src="../src/ui/promisesLaya.js"></script>
<script type="text/javascript" src="../src/ui/uiManager.js"></script>
<script type="text/javascript" src="../src/ui/pluginFunction.js"></script>
<script type="module" src="../src/index.js"></script>
<!--jsfile--endTag-->

View File

@@ -1,4 +1,8 @@
import ViewTypes from './ui/themes/views.js';
import UIManager from './ui/uiManager.js';
globalThis.UIManager =
globalThis.UI =
UIManager;
class App{
constructor(){
@@ -15,13 +19,14 @@ class App{
#initLaya() {
// Laya.init(1125, 2436, Laya.WebGL);
Laya.Config.isAntialias = true;
Laya.init(...this.#fitScreen, Laya.WebGL);
Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE;
Laya.stage.alignH = Laya.Stage.ALIGN_CENTER;
Laya.stage.scaleMode = "showall";
Laya.stage.bgColor = "#04131f";
Laya.stage.bgColor = "#000000";
window.onresize = () => Laya.stage.size(...this.#fitScreen);
}
@@ -67,7 +72,7 @@ class App{
resigterEvent() {
$$on('achievement', achievement => {
UIManager.getInstance().popup(UIManager.getInstance().themes.popup.ACHIEVEMENT, {achievement});
$ui.popup(UI.popups.ACHIEVEMENT, {achievement});
})
}
@@ -76,13 +81,13 @@ class App{
}) {
this.resigterEvent();
this.#initLaya();
const uiManager = UIManager.getInstance();
uiManager.themes = ViewTypes.themes.default;
globalThis.$ui = UIManager.getInstance();
// $ui.theme = 'cyber';
await this.#setLanguage(language);
await uiManager.setLoading(uiManager.themes.LOADING);
await uiManager.switchView(uiManager.themes.LOADING);
await $ui.setLoading(UI.pages.LOADING);
await $ui.switchView(UI.pages.LOADING);
await core.initial(dataSet=>Laya.promises.loader.load(`data/${this.#language}/${dataSet}.json`, null, Laya.Loader.JSON));
await uiManager.switchView(uiManager.themes.MAIN, null, {
await $ui.switchView(UI.pages.MAIN, null, {
load: [
"fonts/方正像素12.ttf",
"images/atlas/images/accessories.atlas",

View File

@@ -93,7 +93,7 @@ function checkProp(property, condition) {
case '!=':
if(Array.isArray(propData))
return !propData.includes(conditionData);
return propData == conditionData;
return propData != conditionData;
case '?':
if(Array.isArray(propData)) {
for(const p of propData)
@@ -121,7 +121,7 @@ function extractMaxTriggers(condition) {
// Not age related, single trigger.
return 1;
}
const age_list = match_object[1].split(",");
return age_list.length;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,3 @@
class ColorFilterItem extends Laya.Image {
constructor() {
super();
@@ -72,6 +70,7 @@ class ScaleButton extends Laya.Button {
}
onMouse(type) {
Laya.Tween.clearAll(this);
switch (type) {
case Laya.Event.MOUSE_DOWN:
Laya.Tween.to(this, { scaleX: 0.9, scaleY: 0.9 }, 100);
@@ -86,3 +85,362 @@ class ScaleButton extends Laya.Button {
}
}
class RGBAItem {
constructor(config={}) {
for(const key in config)
switch(key) {
case 'r':
case 'g':
case 'b':
case 'a':
case 'hex':
case 'hexa':
case 'rgb':
case 'rgba':
this[key] = config[key];
break;
case 'on':
this.on(config[key]);
break;
default:
break;
}
}
#r;
#g;
#b;
#a;
#on = new Set();
on(fn) {
this.#on.add(fn);
}
off(fn) {
this.#on.delete(fn);
}
clear() {
this.#on.clear();
}
#event() {
this.#on.forEach(fn => fn(this));
}
#rgb(v) {
return [
this.#dec(v.slice(1, 3)),
this.#dec(v.slice(3, 5)),
this.#dec(v.slice(5, 7)),
];
}
#rgba(v) {
return [
this.#dec(v.slice(1, 3)),
this.#dec(v.slice(3, 5)),
this.#dec(v.slice(5, 7)),
this.#dec(v.slice(7, 9)),
];
}
#hex(v) {
v = parseInt(v).toString(16);
return v.length == 1 ? '0' + v : v;
}
#dec(v) {
return parseInt(v, 16);
}
get hex() {
return `#${
this.#hex(this.r)
}${
this.#hex(this.g)
}${
this.#hex(this.b)
}`;
}
set hex(v) {
[this.#r, this.#g, this.#b] = this.#rgb(v);
this.#event();
}
get hexa() {
return `#${
this.#hex(this.r)
}${
this.#hex(this.g)
}${
this.#hex(this.b)
}${
this.#hex(this.a)
}`;
}
set hexa(v) {
[this.#r, this.#g, this.#b] = this.#rgba(v);
this.#event();
}
get rgb() {
return [this.r, this.g, this.b];
}
set rgb(v) {
[this.#r, this.#g, this.#b] = v;
this.#event();
}
get rgba() {
return [this.r, this.g, this.b, this.a];
}
set rgba(v) {
[this.#r, this.#g, this.#b, this.#a] = v;
this.#event();
}
get r() {
return this.#r||0;
}
set r(value) {
this.#r = value;
this.#event();
}
get g() {
return this.#g||0;
}
set g(value) {
this.#g = value;
this.#event();
}
get b() {
return this.#b||0;
}
set b(value) {
this.#b = value;
this.#event();
}
get a() {
return this.#a||0;
}
set a(value) {
this.#a = value;
this.#event();
}
cRgb(hex) {
const [r, g, b] = this.#rgb(hex);
return {r, g, b};
}
cRgba(hexa) {
const [r, g, b, a] = this.#rgba(hexa);
return {r, g, b, a};
}
distance(left, right) {
const [lr, lg, lb] = this.#rgb(left);
const [rr, rg, rb] = this.#rgb(right);
const {r, g, b} = this;
const ddr = Math.abs(r - lr);
const ddg = Math.abs(g - lg);
const ddb = Math.abs(b - lb);
const result = (d, a, b) => ((d / Math.abs(b - a)) || 0);
switch(Math.max(ddr, ddg, ddb)) {
case ddr: return result(ddr, lr, rr);
case ddg: return result(ddg, lg, rg);
case ddb: return result(ddb, lb, rb);
default: return 1;
}
}
}
class ColorfulBox extends Laya.Box {
constructor() {
super();
this.on(Laya.Event.MOUSE_OVER, this, this.onMouse, [Laya.Event.MOUSE_DOWN]);
this.on(Laya.Event.MOUSE_DOWN, this, this.onMouse, [Laya.Event.MOUSE_DOWN]);
this.on(Laya.Event.MOUSE_OUT, this, this.onMouse, [Laya.Event.MOUSE_OUT]);
this.on(Laya.Event.MOUSE_UP, this, this.onMouse, [Laya.Event.MOUSE_UP]);
this.#draw();
}
#defaultColor = '#ffffff';
#hoverColor = '#ffffff';
#defaultStroke = '#ffffff';
#hoverStroke = '#ffffff';
#defaultLabel = '#000000';
#hoverLabel = '#000000';
#color = new RGBAItem({hex: this.#defaultColor, on: ()=>this.#draw()});
#stroke = new RGBAItem({hex: this.#defaultStroke, on: ()=>this.#draw()});
#label = new RGBAItem({hex: this.#defaultLabel, on: (hex)=>{
const label = this.getChildByName('label');
if (!label) return;
label.color = hex;
}});
#lineWidth = 0;
#radius = 0;
#animationTime = 200;
#state = 1;
onMouse(type) {
const label = this.getChildByName('label');
const tween = (colorItem, target, last) => {
Laya.Tween.clearAll(colorItem);
Laya.Tween.to(colorItem, colorItem.cRgb(target), colorItem.distance(target, last) * this.#animationTime);
}
switch (type) {
case Laya.Event.MOUSE_OVER:
case Laya.Event.MOUSE_DOWN:
if(this.#state == 2) return;
this.#state = 2;
tween(this.#color, this.#hoverColor, this.#defaultColor);
tween(this.#stroke, this.#hoverStroke, this.#defaultStroke);
if(label) tween(this.#label, this.#hoverLabel, this.#defaultLabel);
break;
case Laya.Event.MOUSE_OUT:
case Laya.Event.MOUSE_UP:
if(this.#state == 1) return;
this.#state = 1;
tween(this.#color, this.#defaultColor, this.#hoverColor);
tween(this.#stroke, this.#defaultStroke, this.#hoverStroke);
if(label) tween(this.#label, this.#defaultLabel, this.#hoverLabel);
break;
default:
break;
}
}
#draw() {
this.graphics.clear();
const w = this.width;
const h = this.height;
const r = Math.min(this.#radius, w / 2, h / 2);
const fillStyle = this.#color.hex;
const strokeStyle = this.#stroke.hex;
const lineWidth = this.lineWidth;
if(r <= 0) {
this.graphics.drawRect(0, 0, w, h, fillStyle, strokeStyle, lineWidth);
return;
}
const a = w + lineWidth;
const b = h + lineWidth;
const c = r + lineWidth;
const d = a - r;
const e = b - r;
const f = -lineWidth;
this.graphics.drawPath(0, 0, [
["moveTo", c, f],
["arcTo", a, f, a, c, c],
["arcTo", a, b, d, b, c],
["arcTo", f, b, f, e, c],
["arcTo", f, f, c, f, c],
["closePath"],
], { fillStyle: strokeStyle });
const x = w - r;
const y = h - r;
this.graphics.drawPath(0, 0, [
["moveTo", r, 0],
["arcTo", w, 0, w, r, r],
["arcTo", w, h, x, h, r],
["arcTo", 0, h, 0, y, r],
["arcTo", 0, 0, r, 0, r],
["closePath"],
], { fillStyle });
}
get width() {
return super.width;
}
set width(value) {
super.width = value;
this.#draw();
}
get height() {
return super.height;
}
set height(value) {
super.height = value;
this.#draw();
}
get defaultColor() {
return this.#defaultColor;
}
set defaultColor(value) {
this.#defaultColor = value;
this.#color.hex = value;
}
get hoverColor() {
return this.#hoverColor;
}
set hoverColor(value) {
this.#hoverColor = value;
}
get defaultStroke() {
return this.#defaultStroke;
}
set defaultStroke(value) {
this.#defaultStroke = value;
this.#stroke.hex = value;
}
get hoverStroke() {
return this.#hoverStroke;
}
set hoverStroke(value) {
this.#hoverStroke = value;
}
get defaultLabel() {
return this.#defaultLabel;
}
set defaultLabel(value) {
this.#defaultLabel = value;
const label = this.getChildByName('label');
if (!label) return;
label.color = value;
}
get hoverLabel() {
return this.#hoverLabel;
}
set hoverLabel(value) {
this.#hoverLabel = value;
}
get animationTime() {
return this.#animationTime;
}
set animationTime(value) {
this.#animationTime = value;
}
get radius() {
return this.#radius||0;
}
set radius(value) {
this.#radius = value;
this.#draw();
}
get lineWidth() {
return this.#lineWidth||0;
}
set lineWidth(value) {
this.#lineWidth = value;
this.#draw();
}
}

View File

@@ -1,7 +1,7 @@
export default class cyberAchievement extends CyberAchievementUI {
export default class CyberAchievement extends CyberAchievementUI {
constructor() {
super();
this.btnBack.on(Laya.Event.CLICK, this, () => UIManager.getInstance().switchView(UIManager.getInstance().themes.MAIN));
this.btnBack.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.MAIN));
const min = Math.min(this.btnAchievement.fontSize, this.btnStatistics.fontSize);
const max = Math.max(this.btnAchievement.fontSize, this.btnStatistics.fontSize);
this.#state = {min, max};
@@ -28,24 +28,6 @@ export default class cyberAchievement extends CyberAchievementUI {
#state;
#tweens;
get colorGrades() {
return [
this.colorGrade0.color,
this.colorGrade1.color,
this.colorGrade2.color,
this.colorGrade3.color,
];
}
get colorFilters() {
return [
this.colorGrade0.text,
this.colorGrade1.text,
this.colorGrade2.text,
this.colorGrade3.text,
]
}
init() {
this.switch('statistics', 0);
@@ -55,11 +37,11 @@ export default class cyberAchievement extends CyberAchievementUI {
this.labRemakeTimes.text = statistics[pt.TMS].value;
this.labRemakeTimesJudge.text = statistics[pt.TMS].judge;
this.labAchievementCountJudge.color = this.colorGrades[statistics[pt.TMS].grade];
this.labAchievementCountJudge.color = $ui.gradeColor(statistics[pt.TMS].grade);
this.labAchievementCount.text = statistics[pt.CACHV].value;
this.labAchievementCountJudge.text = statistics[pt.CACHV].judge;
this.labAchievementCountJudge.color = this.colorGrades[statistics[pt.CACHV].grade];
this.labAchievementCountJudge.color = $ui.gradeColor(statistics[pt.CACHV].grade);
this.labEventRate.text = parseInt(statistics[pt.REVT].value*100)+'%';
this.prgEventRate.value = statistics[pt.REVT].value;
@@ -114,6 +96,6 @@ export default class cyberAchievement extends CyberAchievementUI {
uncomplete.visible = true;
}
box.colorFilter = this.colorFilters[dataSource.grade];
box.colorFilter = $ui.gradeFilter(dataSource.grade);
}
}

View File

@@ -1,6 +0,0 @@
export default class cyberThanks extends CyberThanksUI {
constructor() {
super();
this.btnBack.on(Laya.Event.CLICK, this, ()=>UIManager.getInstance().switchView(UIManager.getInstance().themes.MAIN));
}
}

View File

@@ -1,9 +1,9 @@
export default class cyberMain extends CyberMainUI {
export default class CyberMain extends CyberMainUI {
constructor() {
super();
this.btnRemake.on(Laya.Event.CLICK, this, ()=>UIManager.getInstance().switchView(UIManager.getInstance().themes.TALENT));
this.btnAchievement.on(Laya.Event.CLICK, this, ()=>UIManager.getInstance().switchView(UIManager.getInstance().themes.ACHIEVEMENT));
this.btnThanks.on(Laya.Event.CLICK, this, ()=>UIManager.getInstance().switchView(UIManager.getInstance().themes.THANKS));
this.btnRemake.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.TALENT));
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.on(Laya.Event.RESIZE, this, () => {

View File

@@ -1,23 +1,14 @@
export default class cyberAchievementPopup extends CyberAchievementPopupUI {
export default class CyberAchievementPopup extends CyberAchievementPopupUI {
constructor() {
super();
}
get gradeColors() {
return [
this.colorGrade0.color,
this.colorGrade1.color,
this.colorGrade2.color,
this.colorGrade3.color,
];
}
async popup({achievement}, parent) {
Laya.Tween.clearAll(this);
Laya.Tween.clearAll(this.boxBg);
this.alpha = 0.8;
this.labName.text = achievement.name;
this.labName.color = this.gradeColors[achievement.grade];
this.labName.color = $ui.gradeColor(achievement.grade);
this.x = - this.width;
this.boxBg.x = this.boxBg.width;
await Promise.all([

View File

@@ -1,4 +1,4 @@
export default class cyberProperty extends CyberPropertyUI {
export default class CyberProperty extends CyberPropertyUI {
constructor() {
super();
@@ -60,8 +60,8 @@ export default class cyberProperty extends CyberPropertyUI {
if (this.total < this.#propertyPoints) {
return;
}
UIManager.getInstance().switchView(
UIManager.getInstance().themes.TRAJECTORY,
$ui.switchView(
UI.pages.TRAJECTORY,
{
propertyAllocate: this.#propertyAllocate,
talents: this.listSelectedTalents.array,

View File

@@ -1,4 +1,4 @@
export default class cyberSummary extends CyberSummaryUI {
export default class CyberSummary extends CyberSummaryUI {
constructor() {
super();
this.listSelectedTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false);
@@ -7,34 +7,26 @@ export default class cyberSummary extends CyberSummaryUI {
#selectedTalent;
get gradeFilters() {
return [
this.colorGrade0.text,
this.colorGrade1.text,
this.colorGrade2.text,
this.colorGrade3.text,
];
}
get gradeColors() {
return [
this.colorGrade0.color,
this.colorGrade1.color,
this.colorGrade2.color,
this.colorGrade3.color,
];
}
onAgain() {
core.talentExtend(this.#selectedTalent);
core.times ++;
UIManager.getInstance().switchView(UIManager.getInstance().themes.MAIN);
$ui.switchView(UI.pages.MAIN);
}
init({talents}) {
const {summary, lastExtendTalent} = core;
const gradeFilters = this.gradeFilters;
const gradeColors = this.gradeColors;
const gradeFilters = [
$ui.common.grade0,
$ui.common.grade1,
$ui.common.grade2,
$ui.common.grade3,
];
const gradeColors = [
$ui.common.filter0,
$ui.common.filter1,
$ui.common.filter2,
$ui.common.filter3,
];
const age = summary[core.PropertyTypes.HAGE];
this.labAge.text = ''+age.value;

View File

@@ -40,7 +40,7 @@ export default class CyberTalent extends CyberTalentUI {
}
const talents = [...this.#selected].map(index => this.listTalents.array[index]);
UIManager.getInstance().switchView(UIManager.getInstance().themes.PROPERTY, { talents });
$ui.switchView(UI.pages.PROPERTY, { talents });
}
renderTalent(box, index) {

View File

@@ -0,0 +1,6 @@
export default class CyberThanks extends CyberThanksUI {
constructor() {
super();
this.btnBack.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.MAIN));
}
}

View File

@@ -141,7 +141,7 @@ export default class CyberTrajectory extends CyberTrajectoryUI {
onSummary() {
const talents = this.#talents;
UIManager.getInstance().switchView(UIManager.getInstance().themes.SUMMARY, {talents});
$ui.switchView(UI.pages.SUMMARY, {talents});
}
get speed() {

View File

@@ -0,0 +1,101 @@
export default class Achievement extends AchievementUI {
constructor() {
super();
this.btnBack.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.MAIN));
const min = Math.min(this.btnAchievement.fontSize, this.btnStatistics.fontSize);
const max = Math.max(this.btnAchievement.fontSize, this.btnStatistics.fontSize);
this.#state = {min, max};
this.btnStatistics.on(Laya.Event.CLICK, this, ()=>this.switch('statistics'));
this.btnAchievement.on(Laya.Event.CLICK, this, ()=>this.switch('achievement'));
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;
if(this.boxPage.x < 0) {
this.boxPage.x = - this.width;
}
const renderWidth = this.listAchievements?._itemRender?.props?.width;
if(renderWidth) {
const col = Math.max(Math.floor((this.width - 65) / renderWidth), 1);
this.listAchievements.width = col * renderWidth + (col - 1) * (this.listAchievements.spaceY || 0) + 30;
}
});
}
#state;
#tweens;
init() {
this.switch('statistics', 0);
const {statistics, achievements, PropertyTypes: pt} = core;
this.listAchievements.array = achievements;
this.labRemakeTimes.text = statistics[pt.TMS].value;
this.labRemakeTimesJudge.text = statistics[pt.TMS].judge;
this.labAchievementCountJudge.color = $ui.gradeColor(statistics[pt.TMS].grade);
this.labAchievementCount.text = statistics[pt.CACHV].value;
this.labAchievementCountJudge.text = statistics[pt.CACHV].judge;
this.labAchievementCountJudge.color = $ui.gradeColor(statistics[pt.CACHV].grade);
this.labEventRate.text = parseInt(statistics[pt.REVT].value*100)+'%';
this.prgEventRate.value = statistics[pt.REVT].value;
this.labTalentRate.text = parseInt(statistics[pt.RTLT].value*100)+'%';
this.prgTalentRate.value = statistics[pt.RTLT].value;
}
switch(page, time=300) {
if(this.#tweens) {
this.#tweens.forEach(tween => Laya.Tween.clear(tween));
}
this.#tweens = [];
switch (page) {
case 'statistics':
time = - this.boxPage.x / this.width * time;
this.#tweens.push(
Laya.Tween.to(this.boxPage, {x: 0}, time, Laya.Ease.backOut, Laya.Handler.create(this, () => this.#tweens = null)),
Laya.Tween.to(this.btnStatistics, {fontSize: this.#state.max, anchorX: 0.5, anchorY: 1}, time, Laya.Ease.backOut),
Laya.Tween.to(this.btnAchievement, {fontSize: this.#state.min, anchorX: 0.5, anchorY: 1}, time, Laya.Ease.backOut),
);
break;
case 'achievement':
time = (this.width + this.boxPage.x) / this.width * time;
this.#tweens.push(
Laya.Tween.to(this.boxPage, {x: - this.width}, time, Laya.Ease.backOut, Laya.Handler.create(this, () => this.#tweens = null)),
Laya.Tween.to(this.btnStatistics, {fontSize: this.#state.min, anchorX: 0.5, anchorY: 1}, time, Laya.Ease.backOut),
Laya.Tween.to(this.btnAchievement, {fontSize: this.#state.max, anchorX: 0.5, anchorY: 1}, time, Laya.Ease.backOut),
);
break;
}
}
onRenderAchievement(box, index) {
const dataSource = box.dataSource;
const name = box.getChildByName('name');
const description = box.getChildByName('description');
const completed = box.getChildByName('completed');
const uncomplete = box.getChildByName('uncomplete');
if(dataSource.isAchieved) {
name.text = dataSource.name;
description.text = dataSource.description;
completed.visible = true;
uncomplete.visible = false;
} else {
name.text = dataSource.hide? '???': dataSource.name;
description.text = dataSource.hide? '???': dataSource.description;
completed.visible = false;
uncomplete.visible = true;
}
box.colorFilter = $ui.gradeFilter(dataSource.grade);
}
}

View File

@@ -0,0 +1,16 @@
export default class Main extends MainUI {
constructor() {
super();
this.btnRemake.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.TALENT));
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']);
}
init() {
this.btnDiscord.visible =
this.btnAchievement.visible =
this.btnThanks.visible = !!core.times;
}
}

View File

@@ -0,0 +1,20 @@
export default class achievementPopup extends AchievementPopupUI {
constructor() {
super();
}
async popup({achievement}, parent) {
Laya.Tween.clearAll(this);
Laya.Tween.clearAll(this.boxBg);
this.alpha = 0.8;
this.labName.text = achievement.name;
this.labName.color = $ui.gradeColor(achievement.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}, 3000, Laya.Ease.strongIn);
}
}

View File

@@ -0,0 +1,243 @@
export default class Property extends PropertyUI {
constructor() {
super();
const types =
this.#types = core.PropertyTypes;
this.btnCharmIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.CHR, 1]);
this.btnCharmReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.CHR, -1]);
this.btnIntelligenceIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.INT, 1]);
this.btnIntelligenceReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.INT, -1]);
this.btnStrengthIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.STR, 1]);
this.btnStrengthReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.STR, -1]);
this.btnMoneyIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.MNY, 1]);
this.btnMoneyReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.MNY, -1]);
this.inputCharm.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.CHR]);
this.inputIntelligence.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.INT]);
this.inputStrength.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.STR]);
this.inputMoney.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.MNY]);
const selectAll = ({currentTarget: item}) => { item.text=''; };
this.inputCharm.on(Laya.Event.MOUSE_DOWN, this, selectAll);
this.inputIntelligence.on(Laya.Event.MOUSE_DOWN, this, selectAll);
this.inputStrength.on(Laya.Event.MOUSE_DOWN, this, selectAll);
this.inputMoney.on(Laya.Event.MOUSE_DOWN, this, selectAll);
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, false);
}
#types;
#propertyPoints;
#propertyAllocate;
#propertyAllocateLimit;
init({talents}) {
this.listSelectedTalents.array = talents;
const talentIds = talents.map(talent => talent.id);
// core.talentReplace(talentIds);
this.#propertyPoints = core.getPropertyPoints(talentIds);
this.#propertyAllocateLimit = core.propertyAllocateLimit;
this.labLeftPropertyPoint.text = this.#propertyPoints;
this.#propertyAllocate = {
[this.#types.CHR]: 0,
[this.#types.INT]: 0,
[this.#types.STR]: 0,
[this.#types.MNY]: 0,
[this.#types.TLT]: talentIds,
}
this.updateAllocate();
}
next() {
if (this.total < this.#propertyPoints) {
return;
}
$ui.switchView(
UI.pages.TRAJECTORY,
{
propertyAllocate: this.#propertyAllocate,
talents: this.listSelectedTalents.array,
}
);
}
get total() {
return this.#propertyAllocate[this.#types.CHR]
+ this.#propertyAllocate[this.#types.INT]
+ this.#propertyAllocate[this.#types.STR]
+ this.#propertyAllocate[this.#types.MNY];
}
updateAllocate() {
const charm = this.#propertyAllocate[this.#types.CHR];
const intelligence = this.#propertyAllocate[this.#types.INT];
const strength = this.#propertyAllocate[this.#types.STR];
const money = this.#propertyAllocate[this.#types.MNY];
this.inputCharm.text = ''+charm;
this.inputIntelligence.text = ''+intelligence;
this.inputStrength.text = ''+strength;
this.inputMoney.text = ''+money;
this.labLeftPropertyPoint.text = this.#propertyPoints - this.total;
this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = false;
this.btnCharmReduce.disabled = this.btnCharmReduce.gray = false;
this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = false;
this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = false;
this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = false;
this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = false;
this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = false;
this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = false;
if (this.total >= this.#propertyPoints) {
this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = true;
this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = true;
this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = true;
this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = true;
} else if (this.total <= 0) {
this.btnCharmReduce.disabled = this.btnCharmReduce.gray = true;
this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = true;
this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = true;
this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = true;
}
if (charm <= this.#propertyAllocateLimit[0]) {
this.btnCharmReduce.disabled = this.btnCharmReduce.gray = true;
} else if (charm >= this.#propertyAllocateLimit[1]) {
this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = true;
}
if (intelligence <= this.#propertyAllocateLimit[0]) {
this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = true;
} else if (intelligence >= this.#propertyAllocateLimit[1]) {
this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = true;
}
if (strength <= this.#propertyAllocateLimit[0]) {
this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = true;
} else if (strength >= this.#propertyAllocateLimit[1]) {
this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = true;
}
if (money <= this.#propertyAllocateLimit[0]) {
this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = true;
} else if (money >= this.#propertyAllocateLimit[1]) {
this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = true;
}
}
check(left, right, value) {
if (value < left) return false;
if (value > right) return false;
return true;
}
random() {
let t = this.#propertyPoints;
const arr = new Array(4).fill(this.#propertyAllocateLimit[1]);
while (t > 0) {
const sub = Math.round(Math.random() * (Math.min(t, this.#propertyAllocateLimit[1]) - 1)) + 1;
while(true) {
const select = Math.floor(Math.random() * 4) % 4;
if(arr[select] - sub <0) continue;
arr[select] -= sub;
t -= sub;
break;
}
}
this.#propertyAllocate[this.#types.CHR] = this.#propertyAllocateLimit[1] - arr[0];
this.#propertyAllocate[this.#types.INT] = this.#propertyAllocateLimit[1] - arr[1];
this.#propertyAllocate[this.#types.STR] = this.#propertyAllocateLimit[1] - arr[2];
this.#propertyAllocate[this.#types.MNY] = this.#propertyAllocateLimit[1] - arr[3];
this.updateAllocate();
}
onPropertyAllocate(type, value) {
if (!this.check(
this.#propertyAllocateLimit[0],
this.#propertyAllocateLimit[1],
this.#propertyAllocate[type] + value
)) {
return;
}
if (!this.check(
0,
this.#propertyPoints,
this.total + value
)) {
return;
}
this.#propertyAllocate[type] += value;
this.updateAllocate();
}
onPropertyAllocateInput(type, inputItem) {
let value = parseInt(inputItem.text) || 0;
const total = this.total;
if (total + value < 0) {
value = this.#propertyAllocateLimit[0] * 4 - total;
} else if (total + value > this.#propertyPoints) {
value = this.#propertyPoints - total;
}
if (value < this.#propertyAllocateLimit[0]) {
value = this.#propertyAllocateLimit[0];
} else if (value > this.#propertyAllocateLimit[1]) {
value = this.#propertyAllocateLimit[1];
}
const alter = value - this.#propertyAllocate[type];
if (alter) {
this.onPropertyAllocate(type, alter);
} else {
this.updateAllocate();
}
}
renderTalent(box) {
const dataSource = box.dataSource;
const labTitle = box.getChildByName("labTitle");
const grade1 = box.getChildByName("grade1");
const grade2 = box.getChildByName("grade2");
const grade3 = box.getChildByName("grade3");
const labDescription = box.getChildByName("labDescription");
labTitle.text = dataSource.name;
labDescription.text = dataSource.description;
switch (dataSource.grade) {
case 1:
grade1.visible = true;
grade2.visible = false;
grade3.visible = false;
break;
case 2:
grade1.visible = false;
grade2.visible = true;
grade3.visible = false;
break;
case 3:
grade1.visible = false;
grade2.visible = false;
grade3.visible = true;
break;
default:
grade1.visible = false;
grade2.visible = false;
grade3.visible = false;
break;
}
}
}

View File

@@ -0,0 +1,136 @@
export default class Summary extends SummaryUI {
constructor() {
super();
this.listSelectedTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false);
this.btnAgain.on(Laya.Event.CLICK, this, this.onAgain);
}
#selectedTalent;
onAgain() {
core.talentExtend(this.#selectedTalent);
core.times ++;
$ui.switchView(UI.pages.MAIN);
}
init({talents}) {
const {summary, lastExtendTalent} = core;
const gradeFilters = [
$ui.common.grade0,
$ui.common.grade1,
$ui.common.grade2,
$ui.common.grade3,
];
const gradeColors = [
$ui.common.filter0,
$ui.common.filter1,
$ui.common.filter2,
$ui.common.filter3,
];
const age = summary[core.PropertyTypes.HAGE];
this.labAge.text = ''+age.value;
this.labAgeJudge.text = age.judge;
this.labAgeJudge.color = gradeColors[age.grade];
const sum = summary[core.PropertyTypes.SUM];
this.labTotal.text = ''+sum.value;
this.labTotalJudge.text = sum.judge;
this.labTotalJudge.color = gradeColors[sum.grade];
const chr = summary[core.PropertyTypes.HCHR];
this.labCharm.text = ''+chr.value;
this.prgCharm.value = chr.progress;
this.labCharmJudge.text = chr.judge;
this.labCharmJudge.color = gradeColors[chr.grade];
this.boxCharmGrade.colorFilter = gradeFilters[chr.grade];
const int = summary[core.PropertyTypes.HINT];
this.labIntelligence.text = ''+int.value;
this.prgIntelligence.value = int.progress;
this.labIntelligenceJudge.text = int.judge;
this.labIntelligenceJudge.color = gradeColors[int.grade];
this.boxIntelligenceGrade.colorFilter = gradeFilters[int.grade];
const str = summary[core.PropertyTypes.HSTR];
this.labStrength.text = ''+str.value;
this.prgStrength.value = str.progress;
this.labStrengthJudge.text = str.judge;
this.labStrengthJudge.color = gradeColors[str.grade];
this.boxStrengthGrade.colorFilter = gradeFilters[str.grade];
const mny = summary[core.PropertyTypes.HMNY];
this.labMoney.text = ''+mny.value;
this.prgMoney.value = mny.progress;
this.labMoneyJudge.text = mny.judge;
this.labMoneyJudge.color = gradeColors[mny.grade];
this.boxMoneyGrade.colorFilter = gradeFilters[mny.grade];
const spr = summary[core.PropertyTypes.HSPR];
this.labSpirit.text = ''+spr.value;
this.prgSpirit.value = spr.progress;
this.labSpiritJudge.text = spr.judge;
this.labSpiritJudge.color = gradeColors[spr.grade];
this.boxSpiritGrade.colorFilter = gradeFilters[spr.grade];
talents.sort(({id:a, grade:ag}, {id:b, grade:bg},)=>{
if(a == lastExtendTalent) return -1;
if(b == lastExtendTalent) return 1;
return bg - ag;
});
this.#selectedTalent = talents[0].id;
this.listSelectedTalents.array = talents;
}
renderTalent(box) {
const dataSource = box.dataSource;
const labTitle = box.getChildByName("labTitle");
const grade1 = box.getChildByName("grade1");
const grade2 = box.getChildByName("grade2");
const grade3 = box.getChildByName("grade3");
const labDescription = box.getChildByName("labDescription");
const selected = box.getChildByName("selected");
const unselected = box.getChildByName("unselected");
labTitle.text = dataSource.name;
labDescription.text = dataSource.description;
switch (dataSource.grade) {
case 1:
grade1.visible = true;
grade2.visible = false;
grade3.visible = false;
break;
case 2:
grade1.visible = false;
grade2.visible = true;
grade3.visible = false;
break;
case 3:
grade1.visible = false;
grade2.visible = false;
grade3.visible = true;
break;
default:
grade1.visible = false;
grade2.visible = false;
grade3.visible = false;
break;
}
selected.visible = dataSource.id == this.#selectedTalent;
unselected.visible = !selected.visible;
box.off(Laya.Event.CLICK, this, this.onSelectTalent);
box.on(Laya.Event.CLICK, this, this.onSelectTalent, [dataSource.id]);
}
onSelectTalent(talentId) {
if(talentId == this.#selectedTalent) {
this.#selectedTalent = null;
} else {
this.#selectedTalent = talentId;
}
this.listSelectedTalents.refresh();
}
}

View File

@@ -0,0 +1,111 @@
export default class Talent extends 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, false);
this.listTalents.scrollBar.elasticDistance = 150;
this.on(Laya.Event.RESIZE, this, () => {
const renderWidth = this.listTalents?._itemRender?.props?.width;
if(renderWidth) {
const col = Math.max(Math.floor((this.width - 40) / renderWidth), 1);
this.listTalents.width = col * renderWidth + (col - 1) * (this.listTalents.spaceY || 0);
}
});
}
#selected = new Set();
static load() {
return ['images/background/background_2@3x.png'];
}
init() {
this.pageDrawCard.visible = true;
this.pageResult.visible = false;
this.btnNext.label = 'UI_Talent_Select_Uncomplete';
this.#selected.clear();
}
close() {}
onClickDrawCard() {
this.pageDrawCard.visible = false;
this.pageResult.visible = true;
this.listTalents.array = core.talentRandom();
}
onClickNext() {
if(this.#selected.size < core.talentSelectLimit) {
return;
}
const talents = [...this.#selected].map(index => this.listTalents.array[index]);
$ui.switchView(UI.pages.PROPERTY, { talents });
}
renderTalent(box, index) {
const dataSource = box.dataSource;
const hboxTitle = box.getChildByName("hboxTitle");
const labTitle = hboxTitle.getChildByName("labTitle");
const grades = hboxTitle.getChildByName("grades");
const grade1 = grades.getChildByName("grade1");
const grade2 = grades.getChildByName("grade2");
const grade3 = grades.getChildByName("grade3");
const labDescription = box.getChildByName("labDescription");
const unselected = box.getChildByName("unselected");
const selected = box.getChildByName("selected");
switch (dataSource.grade) {
case 1:
grades.x = 0;
labTitle.x = 1;
grade1.visible = true;
grade2.visible = false;
grade3.visible = false;
break;
case 2:
grades.x = 0;
labTitle.x = 1;
grade1.visible = false;
grade2.visible = true;
grade3.visible = false;
break;
case 3:
grades.x = 0;
labTitle.x = 1;
grade1.visible = false;
grade2.visible = false;
grade3.visible = true;
break;
default:
grades.x = 1;
labTitle.x = 0;
grade1.visible = false;
grade2.visible = false;
grade3.visible = false;
break;
}
labTitle.text = dataSource.name;
labTitle.event(Laya.Event.RESIZE);
labDescription.text = dataSource.description;
unselected.visible = !( selected.visible = this.#selected.has(index) );
box.offAll(Laya.Event.CLICK);
box.on(Laya.Event.CLICK, this, () => {
if(this.#selected.has(index)) {
this.#selected.delete(index);
} else {
if(this.#selected.size >= core.talentSelectLimit) {
return;
}
this.#selected.add(index);
}
this.btnNext.label = this.#selected.size === core.talentSelectLimit
? 'UI_Next'
: 'UI_Talent_Select_Uncomplete';
unselected.visible = !( selected.visible = this.#selected.has(index) );
});
}
}

View File

@@ -0,0 +1,6 @@
export default class Thanks extends ThanksUI {
constructor() {
super();
this.btnBack.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.MAIN));
}
}

View File

@@ -0,0 +1,162 @@
export default class Trajectory extends TrajectoryUI {
constructor() {
super();
let pos1 = [0, 0];
this.panelTrajectory.on(Laya.Event.MOUSE_DOWN, this, e => pos1 = [e.stageX, e.stageY]);
this.panelTrajectory.on(Laya.Event.MOUSE_UP, this, e => {
const distanceX = e.stageX - pos1[0];
const distanceY = e.stageY - pos1[1];
if(Math.sqrt(Math.abs(distanceX) + Math.abs(distanceY)) > 10) {
return;
}
this.onNext();
});
this.btnSummary.on(Laya.Event.CLICK, this, this.onSummary);
this.panelTrajectory.vScrollBar.elasticDistance = 150;
let interval = null;
let timeout = null;
const scroll = alter => {
let value = this.panelTrajectory.vScrollBar.value + alter;
if(value < 0) value = 0;
if(value > this.panelTrajectory.vScrollBar.max) value = this.panelTrajectory.vScrollBar.max;
this.panelTrajectory.scrollTo(0, value);
}
const on = (btn, alter) => {
btn.off(Laya.Event.CLICK, this, scroll);
btn.on(Laya.Event.CLICK, this, scroll, [100*alter]);
timeout = setTimeout(() => {
btn.off(Laya.Event.CLICK, this, scroll);
interval = setInterval(() => scroll(10*alter), 10);
}, 100);
}
const clear = () => {
if(interval) {
clearInterval(interval);
interval = null;
}
if(timeout) {
clearTimeout(timeout);
timeout = null;
}
};
this.btnUp.on(Laya.Event.MOUSE_DOWN, this, on, [this.btnUp, -1]);
this.btnDown.on(Laya.Event.MOUSE_DOWN, this, on, [this.btnDown, 1]);
this.btnUp.on(Laya.Event.MOUSE_UP, this, clear);
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'];
}
static #createComponent = plugin.extractComponents(CyberTrajectory.uiView, ['boxTrajectoryItem']);
#createTrajectoryItem() {
const item = CyberTrajectory.#createComponent('boxTrajectoryItem');
item.labContent = item.getChildByName('labContent');
item.labAge = item.getChildByName('hboxAge').getChildByName('labAge');
return item;
}
#isEnd;
#trajectoryItems;
#talents;
init({propertyAllocate, talents}) {
this.boxSpeed.visible = true;
this.btnSummary.visible = false;
this.#trajectoryItems = [];
this.#isEnd = false;
this.#talents = talents;
core.restart(propertyAllocate);
this.updateProperty();
this.onNext();
}
close() {
this.scbSpeed.value = 0;
this.speed = 0;
this.#trajectoryItems.forEach(item => {
item.removeSelf();
item.destroy();
});
this.#trajectoryItems = null;
}
updateProperty() {
const types = core.PropertyTypes;
const propertys = core.propertys;
this.labCharm.text = propertys[types.CHR];
this.labIntelligence.text = propertys[types.INT];
this.labStrength.text = propertys[types.STR];
this.labMoney.text = propertys[types.MNY];
this.labSpirit.text = propertys[types.SPR];
}
onNext() {
if(this.#isEnd) return;
const { age, content, isEnd } = core.next();
this.#isEnd = isEnd;
if(isEnd) {
this.boxSpeed.visible = false;
this.btnSummary.visible = true;
}
this.renderTrajectory(age, content);
Laya.timer.frameOnce(1, this, () => {
this.panelTrajectory.scrollTo(0, this.panelTrajectory.contentHeight);
});
this.updateProperty();
}
renderTrajectory(age, content) {
const item = this.#createTrajectoryItem();
item.labAge.text = ''+age;
item.labContent.text = content.map(
({type, description, grade, name, postEvent}) => {
switch(type) {
case 'TLT':
return `天赋【${name}】发动:${description}`;
case 'EVT':
return description + (postEvent?`\n${postEvent}`:'');
}
}
).join('\n');
this.vboxTrajectory.addChild(item);
this.#trajectoryItems.push(item);
this.#trajectoryItems.forEach((item, index) => item.y = index);
}
onSummary() {
const talents = this.#talents;
$ui.switchView(UI.pages.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
);
}
}

View File

@@ -1,20 +1,116 @@
const pages = {
LOADING: 'LOADING',
MAIN: 'MAIN',
TALENT: 'TALENT',
PROPERTY: 'PROPERTY',
TRAJECTORY: 'TRAJECTORY',
SUMMARY: 'SUMMARY',
ACHIEVEMENT: 'ACHIEVEMENT',
THANKS: 'THANKS',
};
const popups = {
ACHIEVEMENT: 'POPUP_ACHIEVEMENT',
};
const colors = {
}
const cyber = {
LOADING: "loading",
MAIN: "cyber/cyberMain",
TALENT: "cyber/cyberTalent",
PROPERTY: "cyber/cyberProperty",
TRAJECTORY: "cyber/cyberTrajectory",
SUMMARY: "cyber/cyberSummary",
ACHIEVEMENT: "cyber/cyberAchievement",
THANKS: "cyber/cyberThanks",
popup: {
ACHIEVEMENT: "cyber/popup/cyberAchievementPopup",
pages: {
[pages.LOADING]: "loading",
[pages.MAIN]: "cyber/main",
[pages.TALENT]: "cyber/talent",
[pages.PROPERTY]: "cyber/property",
[pages.TRAJECTORY]: "cyber/trajectory",
[pages.SUMMARY]: "cyber/summary",
[pages.ACHIEVEMENT]: "cyber/achievement",
[pages.THANKS]: "cyber/thanks",
},
popups: {
[popups.ACHIEVEMENT]: "cyber/popup/achievementPopup",
},
common: {
grade0: '#cccccc',
grade1: '#55fffe',
grade2: '#b17cff',
grade3: '#ffce45',
filter0: '#ccccccff',
filter0: '#55fffeff',
filter0: '#b17cffff',
filter0: '#ffce45ff',
},
configs: {
bgColor: '#04131f',
}
}
const themes = {
default: cyber,
cyber,
};
const def = {
pages: {
[pages.LOADING]: "loading",
[pages.MAIN]: "default/main",
[pages.TALENT]: "default/talent",
[pages.PROPERTY]: "default/property",
[pages.TRAJECTORY]: "default/trajectory",
[pages.SUMMARY]: "default/summary",
[pages.ACHIEVEMENT]: "default/achievement",
[pages.THANKS]: "default/thanks",
},
popups: {
[popups.ACHIEVEMENT]: "default/popup/achievementPopup",
},
configs: {
bgColor: '#222831',
common: {
grade0: '#cccccc',
grade1: '#55fffe',
grade2: '#b17cff',
grade3: '#ffce45',
filter0: '#ccccccff',
filter0: '#55fffeff',
filter0: '#b17cffff',
filter0: '#ffce45ff',
},
class: {
btn_main: {
defaultColor: '#393e46',
defaultStroke: '#eeeeee',
hoverColor: '#ff7878',
hoverStroke: '#eeeeee',
defaultLabel: '#eeeeee',
hoverLabel: '#eeeeee',
lineWidth: 2,
radius: 4,
},
btn_small: {
defaultColor: '#5865f2',
defaultStroke: '#eeeeee',
hoverColor: '#1160b0',
hoverStroke: '#eeeeee',
defaultLabel: '#eeeeee',
hoverLabel: '#eeeeee',
lineWidth: 0,
radius: 4,
}
},
pages: {
[pages.MAIN]: {
vars: {
btnRemake: 'btn_main',
labTitle: { color: '#eeeeee' },
labSubTitle: { color: '#eeeeee' },
},
names: {
btnSmall: 'btn_small',
}
}
},
popups: {
export default { themes };
}
}
}
const themes = { default: def, cyber };
export default { themes, pages, popups };

View File

@@ -1,10 +1,13 @@
class UIManager {
import Views from './themes/views.js';
export default class UIManager {
constructor(stage) {
UIManager.#views = Views;
if(!stage) {
stage = Laya.stage;
}
this.#stage = stage;
this.#stage.bgColor = this.#configs.bgColor;
stage.addChild(this.#viewLayer);
this.#viewLayer.zOrder = 1;
@@ -27,6 +30,7 @@ class UIManager {
}
static #instance = {};
static #views;
#stage;
#loading;
#currentView;
@@ -35,22 +39,39 @@ class UIManager {
#popupLayer = new Laya.Panel();
#viewMap = new Map();
#class = new Map();
theme;
#theme = 'default';
static get inst() {
return this.getInstance();
}
static getInstance(name="default") {
return this.#instance[name] || (this.#instance[name] = new UIManager());
}
static get pages() {
return this.#views.pages;
}
static get popups() {
return this.#views.popups;
}
static theme(theme, prop) {
return this.#views.themes[theme][prop];
}
async setLoading(loading) {
const view = await this.getView(loading);
const className = this.#pages[loading];
const view = await this.getView(className, null, null, loading);
view.top = view.bottom = view.left = view.right = 0;
view.zOrder = 4;
this.#loading = view;
}
async switchView(viewName, args, actions) {
const className = this.#pages[viewName];
// get view instance
const view = await this.getView(viewName, args, actions?.load);
const view = await this.getView(className, args, actions?.load, viewName, 'pages');
view.top = view.bottom = view.left = view.right = 0;
// close current view
@@ -70,9 +91,9 @@ class UIManager {
await view.show?.();
}
async getView(viewName, args, preload) {
async getView(className, args, preload, viewName, type) {
// check if view is already loaded
let view = await this.#viewMap.get(viewName);
let view = await this.#viewMap.get(className);
if(this.#loading) {
this.#stage.addChild(this.#loading);
@@ -81,7 +102,7 @@ class UIManager {
if(!view) {
// load view
const ViewClass = await this.loadView(viewName);
const ViewClass = await this.loadView(className);
const resourceList = await ViewClass.load?.(args);
const scanedResourceList = this.#loading? this.scanResource(ViewClass.uiView): [];
if(preload) {
@@ -94,7 +115,7 @@ class UIManager {
// create view
view = new ViewClass();
// add view to map
this.#viewMap.set(viewName, view);
this.#viewMap.set(className, view);
} else {
// load resource
const resourceList = await view.constructor.load?.(args);
@@ -103,15 +124,16 @@ class UIManager {
this.#loading?.removeSelf();
this.#config(view, viewName, type);
// return view
return view;
}
async loadView(viewName) {
async loadView(className) {
// load view
if(this.#class.has(viewName)) return this.#class.get(viewName);
const c = (await import(`./themes/${viewName}.js`)).default;
this.#class.set(viewName, c);
if(this.#class.has(className)) return this.#class.get(className);
const c = (await import(`./themes/${className}.js`)).default;
this.#class.set(className, c);
return c;
}
@@ -126,7 +148,8 @@ class UIManager {
}
async showDialog(dialogName, args, actions) {
const dialog = await this.getView(dialogName, args, actions?.load);
const className = this.#pages[dialogName];
const dialog = await this.getView(className, args, actions?.load, viewName, 'pages');
dialog.init(args);
this.#dialogLayer.addChild(dialog);
@@ -145,7 +168,8 @@ class UIManager {
}
async popup(type, args) {
const popup = await this.getView(type, args);
const className = this.#popups[type];
const popup = await this.getView(className, args, null, type, 'popups');
this.#popupLayer.addChild(popup);
await popup.popup(args, this.#popupLayer);
this.#popupLayer.removeChild(popup);
@@ -155,6 +179,40 @@ class UIManager {
this.#dialogLayer.removeChildren();
}
#config(view, key, type) {
const config = this.#configs?.[type]?.[key];
if(!config) return;
if(view.config) return view.config(config);
const applyConfig = (target, config) => {
if(!target) return;
if(typeof config == 'string') {
config = this.#configs?.class?.[config];
}
for(const key in config) target[key] = config[key];
};
if(config.names)
for(const name in config.names)
this.#deepGetChildsByName(view, name)
.forEach(child => applyConfig(child, config.names[name]));
if(config.vars)
for(const key in config.vars)
applyConfig(view[key], config.vars[key]);
}
#deepGetChildsByName(parent, name) {
const list = [];
if(!parent || !parent._childs) return list;
for(const child of parent._childs) {
if(child.name == name) list.push(child);
if(child._childs) list.push(...this.#deepGetChildsByName(child, name));
}
return list;
}
#cutPath(path) {
path = ''+path;
let index = path.length;
@@ -216,4 +274,31 @@ class UIManager {
get currentView() {
return this.#currentView;
}
get theme() {
return this.#theme;
}
set theme(value) {
this.#theme = value;
this.#stage.bgColor = this.#configs.bgColor;
}
get #pages() {
return UIManager.theme(this.#theme, 'pages');
}
get #popups() {
return UIManager.theme(this.#theme, 'popups');
}
get #configs() {
return UIManager.theme(this.#theme, 'configs');
}
get common() {
return this.#configs?.common;
}
gradeColor(grade) {
return this.common?.['grade'+grade];
}
gradeFilter(grade) {
return this.common?.['filter'+grade];
}
}