* Setup after adding to parent * 添加到父容器之后的设置
(buffer: ByteBuffer, beginPos: number)
| 1048 | * 添加到父容器之后的设置 |
| 1049 | */ |
| 1050 | public setup_afterAdd(buffer: ByteBuffer, beginPos: number): void { |
| 1051 | buffer.seek(beginPos, 1); |
| 1052 | |
| 1053 | const str = buffer.readS(); |
| 1054 | if (str) { |
| 1055 | this.tooltips = str; |
| 1056 | } |
| 1057 | |
| 1058 | const groupId = buffer.getInt16(); |
| 1059 | if (groupId >= 0 && this._parent) { |
| 1060 | this.group = this._parent.getChildAt(groupId) as GGroup; |
| 1061 | } |
| 1062 | |
| 1063 | buffer.seek(beginPos, 2); |
| 1064 | |
| 1065 | const cnt = buffer.getInt16(); |
| 1066 | for (let i = 0; i < cnt; i++) { |
| 1067 | let nextPos = buffer.getInt16(); |
| 1068 | nextPos += buffer.pos; |
| 1069 | |
| 1070 | const gearIndex = buffer.readByte(); |
| 1071 | const gear = this.getGear(gearIndex); |
| 1072 | if (gear) { |
| 1073 | gear.setup(buffer); |
| 1074 | } |
| 1075 | |
| 1076 | buffer.pos = nextPos; |
| 1077 | } |
| 1078 | } |
| 1079 | |
| 1080 | // Render data collection | 渲染数据收集 |
| 1081 |
no test coverage detected