UI / LeaderboardItemPanelBase
LeaderboardItemPanelBase<T> Class
The subUI in the main interface of the leaderboard is used to display a record
Type parameters
T | extends ILeaderboardItemView |
---|
Hierarchy
BasePanel
<T
>↳
LeaderboardItemPanelBase
Table of contents
Accessors
playerId(): number other |
---|
The playerId of the currently displayed object |
Methods
onAddToCanvas(playerId : number , rankIndex : number ): void other |
---|
Display on canvas call, please overwrite |
onFieldSet(playerId : number , rankIndex : number , fieldId : number , fieldValue : string number , textBlockIndex : number , textBlock : TextBlock ): void other |
After setting the field content and calling it, please overwrite it |
click
Methods
onAdded(): void other |
---|
Lifecycle - Triggered when added to the parent node, may be called multiple times |
onAwake(): void other |
Life cycle method - the construction panel is automatically triggered and will only be called call |
Construction method
Type parameters
T | extends ILeaderboardItemView <T > |
---|
Parameters
viewClass TypeName <T > | Interface class |
---|
Overrides
Accessors
playerId
• |
---|
The playerId of the currently displayed object Returns |
number |
---|
Methods
onAddToCanvas
• Protected
onAddToCanvas(playerId
, rankIndex
): void
other
Display on canvas call, please overwrite
Parameters
playerId number | Player id range: depending on Player ID type: integer |
---|---|
rankIndex number | Ranking (starting from 0) range: reasonable is sufficient type: integer |
onFieldSet
• Protected
onFieldSet(playerId
, rankIndex
, fieldId
, fieldValue
, textBlockIndex
, textBlock
): void
other
After setting the field content and calling it, please overwrite it
Parameters
playerId number | Player ID range: determined by ID length type: integer |
---|---|
rankIndex number | Ranking index (starting from 0) range: reasonable is sufficient type: integer |
fieldId number | Field index (if it is a ranking field, this parameter is mull) range: reasonable, type: integer |
fieldValue string number | Field display content Range: reasonable is sufficient, no restrictions are imposed Type: integer |
textBlockIndex number | Text widget index range: reasonable, unlimited type: integer |
textBlock TextBlock | Text widget |