lan 3 سال پیش
والد
کامیت
4931c99dff

+ 3 - 3
assets/prefab/child/GuideMainUI.prefab

@@ -1944,7 +1944,7 @@
         "__id__": 88
       }
     ],
-    "_active": false,
+    "_active": true,
     "_components": [],
     "_prefab": {
       "__id__": 91
@@ -2912,14 +2912,14 @@
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0.5,
+      "x": 0,
       "y": 0.5
     },
     "_trs": {
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        222.027,
+        135.046,
         252.732,
         0,
         0,

+ 128 - 512
assets/script/config/SemeGirdCfg.ts

@@ -38,560 +38,176 @@ let SemeCfg = [
         id: 231,
         name: '2-3上学期',
         type: [
-            {
-                name: '色彩能力',
-                id: '23101',
-            },
-            {
-                name: '分类能力',
-                id: '23102',
-            },
-            {
-                name: '图形认知',
-                id: '23103',
-            },
-            {
-                name: '常识认知',
-                id: '23104',
-            },
-            {
-                name: '空间认知',
-                id: '23105',
-            },
-            {
-                name: '数学识字',
-                id: '23106',
-            },
-            {
-                name: '数量认知',
-                id: '23107',
-            },
-            {
-                name: '观察能力',
-                id: '23108',
-            },
-            {
-                name: '趣味路线',
-                id: '23109',
-            },
-            {
-                name: '运笔能力',
-                id: '23110',
-            },
-            {
-                name: '分析能力',
-                id: '23111',
-            },
-            {
-                name: '关联事物',
-                id: '23112',
-            },
-            {
-                name: '分析推理',
-                id: '23113',
-            },
-            {
-                name: '专注能力',
-                id: '23114',
-            },
-            {
-                name: '安全意识',
-                id: '23115',
-            },
-            {
-                name: '行为规范',
-                id: '23116',
-            },
+            {name: '色彩能力', id: '23101', des: '测试'},
+            {name: '分类能力', id: '23102', des: '测试'},
+            {name: '图形认知', id: '23103', des: '测试'},
+            {name: '常识认知', id: '23104', des: '测试'},
+            {name: '空间认知', id: '23105', des: '测试'},
+            {name: '数学识字', id: '23106', des: '测试'},
+            {name: '数量认知', id: '23107', des: '测试'},
+            {name: '观察能力', id: '23108', des: '测试'},
+            {name: '趣味路线', id: '23109', des: '测试'},
+            {name: '运笔能力', id: '23110', des: '测试'},
+            {name: '分析能力', id: '23111', des: '测试'},
+            {name: '关联事物', id: '23112', des: '测试'},
+            {name: '分析推理', id: '23113', des: '测试'},
+            {name: '专注能力', id: '23114', des: '测试'},
+            {name: '安全意识', id: '23115', des: '测试'},
+            {name: '行为规范', id: '23116', des: '测试'},
         ],
     },
     {
         id: 232,
         name: '2-3下学期',
         type: [
-            {
-                name: '色彩能力',
-                id: '23201',
-            },
-            {
-                name: '分类能力',
-                id: '23202',
-            },
-            {
-                name: '图形认知',
-                id: '23203',
-            },
-            {
-                name: '常识认知',
-                id: '23204',
-            },
-            {
-                name: '空间认知',
-                id: '23205',
-            },
-            {
-                name: '数学识字',
-                id: '23206',
-            },
-            {
-                name: '数量认知',
-                id: '23207',
-            },
-            {
-                name: '观察能力',
-                id: '23208',
-            },
-            {
-                name: '趣味路线',
-                id: '23209',
-            },
-            {
-                name: '运笔能力',
-                id: '23210',
-            },
-            {
-                name: '分析能力',
-                id: '23211',
-            },
-            {
-                name: '关联事物',
-                id: '23212',
-            },
-            {
-                name: '分析推理',
-                id: '23213',
-            },
-            {
-                name: '专注能力',
-                id: '23214',
-            },
-            {
-                name: '安全意识',
-                id: '23215',
-            },
-            {
-                name: '行为规范',
-                id: '23216',
-            },
+            {name: '色彩能力', id: '23201', des: '测试'},
+            {name: '分类能力', id: '23202', des: '测试'},
+            {name: '图形认知', id: '23203', des: '测试'},
+            {name: '常识认知', id: '23204', des: '测试'},
+            {name: '空间认知', id: '23205', des: '测试'},
+            {name: '数学识字', id: '23206', des: '测试'},
+            {name: '数量认知', id: '23207', des: '测试'},
+            {name: '观察能力', id: '23208', des: '测试'},
+            {name: '趣味路线', id: '23209', des: '测试'},
+            {name: '运笔能力', id: '23210', des: '测试'},
+            {name: '分析能力', id: '23211', des: '测试'},
+            {name: '关联事物', id: '23212', des: '测试'},
+            {name: '分析推理', id: '23213', des: '测试'},
+            {name: '专注能力', id: '23214', des: '测试'},
+            {name: '安全意识', id: '23215', des: '测试'},
+            {name: '行为规范', id: '23216', des: '测试'},
         ],
     },
     {
         id: 341,
         name: '3-4上学期',
         type: [
-            {
-                name: '分析能力',
-                id: '34101',
-            },
-            {
-                name: '判断能力',
-                id: '34102',
-            },
-            {
-                name: '归纳能力',
-                id: '34103',
-            },
-            {
-                name: '想象能力',
-                id: '34104',
-            },
-            {
-                name: '观察能力',
-                id: '34105',
-            },
-            {
-                name: '判断能力',
-                id: '34106',
-            },
-            {
-                name: '观察能力',
-                id: '34107',
-            },
-            {
-                name: '分类能力',
-                id: '34108',
-            },
-            {
-                name: '记忆能力',
-                id: '34109',
-            },
-            {
-                name: '记忆能力',
-                id: '34110',
-            },
-            {
-                name: '理解能力',
-                id: '34111',
-            },
-            {
-                name: '理解能力',
-                id: '34112',
-            },
-            {
-                name: '组合能力',
-                id: '34113',
-            },
-            {
-                name: '迁移能力',
-                id: '34114',
-            },
-            {
-                name: '关联能力',
-                id: '34115',
-            },
-            {
-                name: '逻辑能力',
-                id: '34116',
-            },
+            {name: '分析能力', id: '34101', des: '测试'},
+            {name: '判断能力', id: '34102', des: '测试'},
+            {name: '归纳能力', id: '34103', des: '测试'},
+            {name: '想象能力', id: '34104', des: '测试'},
+            {name: '观察能力', id: '34105', des: '测试'},
+            {name: '判断能力', id: '34106', des: '测试'},
+            {name: '观察能力', id: '34107', des: '测试'},
+            {name: '分类能力', id: '34108', des: '测试'},
+            {name: '记忆能力', id: '34109', des: '测试'},
+            {name: '记忆能力', id: '34110', des: '测试'},
+            {name: '理解能力', id: '34111', des: '测试'},
+            {name: '理解能力', id: '34112', des: '测试'},
+            {name: '组合能力', id: '34113', des: '测试'},
+            {name: '迁移能力', id: '34114', des: '测试'},
+            {name: '关联能力', id: '34115', des: '测试'},
+            {name: '逻辑能力', id: '34116', des: '测试'},
         ],
     },
     {
         id: 342,
         name: '3-4下学期',
         type: [
-            {
-                name: '分析能力',
-                id: '34201',
-            },
-            {
-                name: '判断能力',
-                id: '34202',
-            },
-            {
-                name: '归纳能力',
-                id: '34203',
-            },
-            {
-                name: '想象能力',
-                id: '34204',
-            },
-            {
-                name: '观察能力',
-                id: '34205',
-            },
-            {
-                name: '判断能力',
-                id: '34206',
-            },
-            {
-                name: '观察能力',
-                id: '34207',
-            },
-            {
-                name: '分类能力',
-                id: '34208',
-            },
-            {
-                name: '记忆能力',
-                id: '34209',
-            },
-            {
-                name: '记忆能力',
-                id: '34210',
-            },
-            {
-                name: '理解能力',
-                id: '34211',
-            },
-            {
-                name: '理解能力',
-                id: '34212',
-            },
-            {
-                name: '组合能力',
-                id: '34213',
-            },
-            {
-                name: '迁移能力',
-                id: '34214',
-            },
-            {
-                name: '关联能力',
-                id: '34215',
-            },
-            {
-                name: '逻辑能力',
-                id: '34216',
-            },
+            {name: '分析能力', id: '34201', des: '测试'},
+            {name: '判断能力', id: '34202', des: '测试'},
+            {name: '归纳能力', id: '34203', des: '测试'},
+            {name: '想象能力', id: '34204', des: '测试'},
+            {name: '观察能力', id: '34205', des: '测试'},
+            {name: '判断能力', id: '34206', des: '测试'},
+            {name: '观察能力', id: '34207', des: '测试'},
+            {name: '分类能力', id: '34208', des: '测试'},
+            {name: '记忆能力', id: '34209', des: '测试'},
+            {name: '记忆能力', id: '34210', des: '测试'},
+            {name: '理解能力', id: '34211', des: '测试'},
+            {name: '理解能力', id: '34212', des: '测试'},
+            {name: '组合能力', id: '34213', des: '测试'},
+            {name: '迁移能力', id: '34214', des: '测试'},
+            {name: '关联能力', id: '34215', des: '测试'},
+            {name: '逻辑能力', id: '34216', des: '测试'},
         ],
     },
     {
         id: 451,
         name: '4-5上学期',
         type: [
-            {
-                name: '观察能力',
-                id: '45101',
-            },
-            {
-                name: '辨别能力',
-                id: '45102',
-            },
-            {
-                name: '分析能力',
-                id: '45103',
-            },
-            {
-                name: '运算能力',
-                id: '45104',
-            },
-            {
-                name: '观察能力',
-                id: '45105',
-            },
-            {
-                name: '想象能力',
-                id: '45106',
-            },
-            {
-                name: '判断能力',
-                id: '45107',
-            },
-            {
-                name: '时序能力',
-                id: '45108',
-            },
-            {
-                name: '观察能力',
-                id: '45109',
-            },
-            {
-                name: '运算能力',
-                id: '45110',
-            },
-            {
-                name: '归纳能力',
-                id: '45111',
-            },
-            {
-                name: '迁移能力',
-                id: '45112',
-            },
-            {
-                name: '辨别能力',
-                id: '45113',
-            },
-            {
-                name: '常识能力',
-                id: '45114',
-            },
-            {
-                name: '关联能力',
-                id: '45115',
-            },
-            {
-                name: '空间能力',
-                id: '45116',
-            },
+            {name: '观察能力', id: '45101', des: '测试'},
+            {name: '辨别能力', id: '45102', des: '测试'},
+            {name: '分析能力', id: '45103', des: '测试'},
+            {name: '运算能力', id: '45104', des: '测试'},
+            {name: '观察能力', id: '45105', des: '测试'},
+            {name: '想象能力', id: '45106', des: '测试'},
+            {name: '判断能力', id: '45107', des: '测试'},
+            {name: '时序能力', id: '45108', des: '测试'},
+            {name: '观察能力', id: '45109', des: '测试'},
+            {name: '运算能力', id: '45110', des: '测试'},
+            {name: '归纳能力', id: '45111', des: '测试'},
+            {name: '迁移能力', id: '45112', des: '测试'},
+            {name: '辨别能力', id: '45113', des: '测试'},
+            {name: '常识能力', id: '45114', des: '测试'},
+            {name: '关联能力', id: '45115', des: '测试'},
+            {name: '空间能力', id: '45116', des: '测试'},
         ],
     },
     {
         id: 452,
         name: '4-5下学期',
         type: [
-            {
-                name: '观察能力',
-                id: '45201',
-            },
-            {
-                name: '辨别能力',
-                id: '45202',
-            },
-            {
-                name: '分析能力',
-                id: '45203',
-            },
-            {
-                name: '运算能力',
-                id: '45204',
-            },
-            {
-                name: '观察能力',
-                id: '45205',
-            },
-            {
-                name: '想象能力',
-                id: '45206',
-            },
-            {
-                name: '判断能力',
-                id: '45207',
-            },
-            {
-                name: '时序能力',
-                id: '45208',
-            },
-            {
-                name: '观察能力',
-                id: '45209',
-            },
-            {
-                name: '运算能力',
-                id: '45210',
-            },
-            {
-                name: '归纳能力',
-                id: '45211',
-            },
-            {
-                name: '迁移能力',
-                id: '45212',
-            },
-            {
-                name: '辨别能力',
-                id: '45213',
-            },
-            {
-                name: '常识能力',
-                id: '45214',
-            },
-            {
-                name: '关联能力',
-                id: '45215',
-            },
-            {
-                name: '空间能力',
-                id: '45216',
-            },
+            {name: '观察能力', id: '45201', des: '测试'},
+            {name: '辨别能力', id: '45202', des: '测试'},
+            {name: '分析能力', id: '45203', des: '测试'},
+            {name: '运算能力', id: '45204', des: '测试'},
+            {name: '观察能力', id: '45205', des: '测试'},
+            {name: '想象能力', id: '45206', des: '测试'},
+            {name: '判断能力', id: '45207', des: '测试'},
+            {name: '时序能力', id: '45208', des: '测试'},
+            {name: '观察能力', id: '45209', des: '测试'},
+            {name: '运算能力', id: '45210', des: '测试'},
+            {name: '归纳能力', id: '45211', des: '测试'},
+            {name: '迁移能力', id: '45212', des: '测试'},
+            {name: '辨别能力', id: '45213', des: '测试'},
+            {name: '常识能力', id: '45214', des: '测试'},
+            {name: '关联能力', id: '45215', des: '测试'},
+            {name: '空间能力', id: '45216', des: '测试'},
         ],
     },
     {
         id: 561,
         name: '5-6上学期',
         type: [
-            {
-                name: '推演能力',
-                id: '56101',
-            },
-            {
-                name: '常识能力',
-                id: '56102',
-            },
-            {
-                name: '运算能力',
-                id: '56103',
-            },
-            {
-                name: '分类能力',
-                id: '56104',
-            },
-            {
-                name: '想象能力',
-                id: '56105',
-            },
-            {
-                name: '分析能力',
-                id: '56106',
-            },
-            {
-                name: '运算能力',
-                id: '56107',
-            },
-            {
-                name: '分析能力',
-                id: '56108',
-            },
-            {
-                name: '观察能力',
-                id: '56109',
-            },
-            {
-                name: '分析能力',
-                id: '56110',
-            },
-            {
-                name: '关联能力',
-                id: '56111',
-            },
-            {
-                name: '迁移能力',
-                id: '56112',
-            },
-            {
-                name: '观察能力',
-                id: '56113',
-            },
-            {
-                name: '抽象能力',
-                id: '56114',
-            },
-            {
-                name: '空间能力',
-                id: '56115',
-            },
-            {
-                name: '分析能力',
-                id: '56116',
-            },
+            {name: '推演能力', id: '56101', des: '测试'},
+            {name: '常识能力', id: '56102', des: '测试'},
+            {name: '运算能力', id: '56103', des: '测试'},
+            {name: '分类能力', id: '56104', des: '测试'},
+            {name: '想象能力', id: '56105', des: '测试'},
+            {name: '分析能力', id: '56106', des: '测试'},
+            {name: '运算能力', id: '56107', des: '测试'},
+            {name: '分析能力', id: '56108', des: '测试'},
+            {name: '观察能力', id: '56109', des: '测试'},
+            {name: '分析能力', id: '56110', des: '测试'},
+            {name: '关联能力', id: '56111', des: '测试'},
+            {name: '迁移能力', id: '56112', des: '测试'},
+            {name: '观察能力', id: '56113', des: '测试'},
+            {name: '抽象能力', id: '56114', des: '测试'},
+            {name: '空间能力', id: '56115', des: '测试'},
+            {name: '分析能力', id: '56116', des: '测试'},
         ],
     },
     {
         id: 562,
         name: '5-6下学期',
         type: [
-            {
-                name: '推演能力',
-                id: '56201',
-            },
-            {
-                name: '常识能力',
-                id: '56202',
-            },
-            {
-                name: '运算能力',
-                id: '56203',
-            },
-            {
-                name: '分类能力',
-                id: '56204',
-            },
-            {
-                name: '想象能力',
-                id: '56205',
-            },
-            {
-                name: '分析能力',
-                id: '56206',
-            },
-            {
-                name: '运算能力',
-                id: '56207',
-            },
-            {
-                name: '分析能力',
-                id: '56208',
-            },
-            {
-                name: '观察能力',
-                id: '56209',
-            },
-            {
-                name: '分析能力',
-                id: '56210',
-            },
-            {
-                name: '关联能力',
-                id: '56211',
-            },
-            {
-                name: '迁移能力',
-                id: '56212',
-            },
-            {
-                name: '观察能力',
-                id: '56213',
-            },
-            {
-                name: '抽象能力',
-                id: '56214',
-            },
-            {
-                name: '空间能力',
-                id: '56215',
-            },
-            {
-                name: '分析能力',
-                id: '56216',
-            },
+            {name: '推演能力', id: '56201', des: '测试'},
+            {name: '常识能力', id: '56202', des: '测试'},
+            {name: '运算能力', id: '56203', des: '测试'},
+            {name: '分类能力', id: '56204', des: '测试'},
+            {name: '想象能力', id: '56205', des: '测试'},
+            {name: '分析能力', id: '56206', des: '测试'},
+            {name: '运算能力', id: '56207', des: '测试'},
+            {name: '分析能力', id: '56208', des: '测试'},
+            {name: '观察能力', id: '56209', des: '测试'},
+            {name: '分析能力', id: '56210', des: '测试'},
+            {name: '关联能力', id: '56211', des: '测试'},
+            {name: '迁移能力', id: '56212', des: '测试'},
+            {name: '观察能力', id: '56213', des: '测试'},
+            {name: '抽象能力', id: '56214', des: '测试'},
+            {name: '空间能力', id: '56215', des: '测试'},
+            {name: '分析能力', id: '56216', des: '测试'},
         ],
     },
 ]

+ 7 - 8
assets/script/ui/child/GuideMainUI.ts

@@ -1,8 +1,9 @@
 /** @format */
 import {BaseUI} from '../BaseUI'
 import {ccUtils} from '../../utils/ccUtils'
-import {Mgr} from '../../GameControl'
+import {Data, Mgr} from '../../GameControl'
 import {UI} from '../../enums/UI'
+import {SemeGirdCfg} from '../../config/SemeGirdCfg'
 
 const {ccclass, property} = cc._decorator
 @ccclass
@@ -21,7 +22,8 @@ export class GuideMainUI extends BaseUI {
         this.initInfo()
     }
     initTitle() {
-        let titleLb = '一、这是测试'
+        let cfg = SemeGirdCfg.SemeCfg.find(value => value.id == Data.game.semeID).type[Data.game.gameID - 1]
+        let titleLb = cfg.name
         if (this.titleIndex > 2) {
             this.unscheduleAllCallbacks()
             this.titleIndex = 2
@@ -37,11 +39,8 @@ export class GuideMainUI extends BaseUI {
         )
     }
     initInfo() {
-        ccUtils.setLabel(
-            '测试测试测试测试测试测试测试测试测试测试。\n测试测试测试测试测试测试测试测试',
-            this.infoNode,
-            'info',
-        )
+        let cfg = SemeGirdCfg.SemeCfg.find(value => value.id == Data.game.semeID).type[Data.game.gameID - 1]
+        ccUtils.setLabel(cfg.des, this.infoNode, 'info')
     }
     onToggleClick(event, custom) {
         this.titleNode.active = false
@@ -65,7 +64,7 @@ export class GuideMainUI extends BaseUI {
                 break
             case 4:
                 Mgr.ui.show(UI.GameUI)
-                Mgr.localMsg.sendClassMsg()
+                if (!Data.child.isInClass && Data.child.isTeacher) Mgr.ui.show(UI.ClassUI)
                 this.hide()
                 break
             default:

+ 1 - 1
assets/script/ui/public/GuideUI.ts

@@ -253,7 +253,7 @@ export class GuideUI extends BaseUI {
     }
     onPracticeClick() {
         Mgr.ui.show(UI.GameUI)
-        Mgr.localMsg.sendClassMsg()
+        if (!Data.child.isInClass && Data.child.isTeacher) Mgr.ui.show(UI.ClassUI)
         this.hide()
     }
     onPlayClick() {

+ 1 - 1
assets/script/utils/ccUtils.ts

@@ -191,7 +191,7 @@ class CCUtils {
         children.forEach((value, index) => {
             const toggle = value.getComponent(cc.Toggle)
             if (toggle) {
-                toggle.isChecked = index == index
+                toggle.isChecked = index == checkedIndex
             }
         })
     }